Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
d3c04b6a
"vllm/vscode:/vscode.git/clone" did not exist on "1851782dd5d991344df66b247af58b51a988a0ed"
Unverified
Commit
d3c04b6a
authored
Mar 07, 2024
by
TechxGenus
Committed by
GitHub
Mar 07, 2024
Browse files
Add GPTQ support for Gemma (#3200)
parent
4cb3b924
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
vllm/model_executor/models/gemma.py
vllm/model_executor/models/gemma.py
+6
-0
No files found.
vllm/model_executor/models/gemma.py
View file @
d3c04b6a
...
...
@@ -325,11 +325,17 @@ class GemmaForCausalLM(nn.Module):
if
shard_name
not
in
name
:
continue
name
=
name
.
replace
(
shard_name
,
param_name
)
# Skip loading extra bias for GPTQ models.
if
name
.
endswith
(
".bias"
)
and
name
not
in
params_dict
:
continue
param
=
params_dict
[
name
]
weight_loader
=
param
.
weight_loader
weight_loader
(
param
,
loaded_weight
,
shard_id
)
break
else
:
# Skip loading extra bias for GPTQ models.
if
name
.
endswith
(
".bias"
)
and
name
not
in
params_dict
:
continue
# GemmaRMSNorm is different from Llama's in that it multiplies
# (1 + weight) to the output, instead of just weight.
if
"norm.weight"
in
name
:
...
...
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