Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
text-generation-inference
Commits
08b8eec1
Unverified
Commit
08b8eec1
authored
Jul 20, 2023
by
Nicolas Patry
Committed by
GitHub
Jul 20, 2023
Browse files
fix(server): Fixing non parameters in quantize script `bigcode/starcoder` was an example. (#661)
parent
362883f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
server/text_generation_server/utils/gptq/quantize.py
server/text_generation_server/utils/gptq/quantize.py
+4
-1
No files found.
server/text_generation_server/utils/gptq/quantize.py
View file @
08b8eec1
...
@@ -812,10 +812,13 @@ def load_weights_pre_hook(module_name, weights, recursive=False):
...
@@ -812,10 +812,13 @@ def load_weights_pre_hook(module_name, weights, recursive=False):
tensor
=
weights
.
get_tensor
(
tensor_name
)
tensor
=
weights
.
get_tensor
(
tensor_name
)
setdeepattr
(
module
,
local_param
,
nn
.
Parameter
(
tensor
))
setdeepattr
(
module
,
local_param
,
nn
.
Parameter
(
tensor
))
else
:
else
:
tensor
=
current_tensor
.
to
(
device
=
torch
.
device
(
"cuda:0"
))
if
current_tensor
.
requires_grad
:
tensor
=
nn
.
Parameter
(
tensor
)
setdeepattr
(
setdeepattr
(
module
,
module
,
local_param
,
local_param
,
nn
.
Parameter
(
current_tensor
.
to
(
device
=
torch
.
device
(
"cuda:0"
))),
tensor
)
)
return
inner
return
inner
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment