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
0d96468e
Commit
0d96468e
authored
Jun 06, 2024
by
Daniël de Kok
Committed by
Daniël de Kok
Jun 06, 2024
Browse files
marlin: support tp>1 when group_size==-1
parent
4594e6fa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
server/text_generation_server/utils/weights.py
server/text_generation_server/utils/weights.py
+7
-1
No files found.
server/text_generation_server/utils/weights.py
View file @
0d96468e
...
...
@@ -513,6 +513,12 @@ class Weights:
"Cannot load `marlin` weight, make sure the model is already quantized, or quantize it with `text-generation-server quantize ORIGINAL_MODEL_ID NEW_MODEL_ID`"
)
num_groups
=
self
.
_get_slice
(
f
"
{
prefix
}
.s"
).
get_shape
()[
0
]
if
num_groups
==
1
:
# The number of groups is 1 when group_size == -1. share
# scales between all shards in this case.
s
=
self
.
get_tensor
(
f
"
{
prefix
}
.s"
)
else
:
s
=
self
.
get_sharded
(
f
"
{
prefix
}
.s"
,
dim
=
0
)
weight
=
MarlinWeight
(
B
=
B
,
s
=
s
)
...
...
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