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
0bb491f8
Commit
0bb491f8
authored
Dec 11, 2024
by
王敏
Browse files
更新medusa权重转换脚本
parent
44e3ca68
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/medusa/medusa_weight_converter.py
examples/medusa/medusa_weight_converter.py
+2
-2
No files found.
examples/medusa/medusa_weight_converter.py
View file @
0bb491f8
...
...
@@ -369,7 +369,7 @@ def main(args):
os
.
makedirs
(
args
.
output_dir
,
exist_ok
=
True
)
save_model
(
medusa_model
,
os
.
path
.
join
(
args
.
output_dir
,
"model.safetensors"
))
medusa_choices
=
ast
.
literal_eval
(
args
.
medusa_choices
)
medusa_choices
=
ast
.
literal_eval
(
args
.
medusa_choices
)
if
args
.
medusa_choices
is
not
None
else
None
to_save_config
=
CustomMedusaConfig
(
name_or_path
=
os
.
path
.
join
(
args
.
output_dir
,
"config.json"
),
hidden_size
=
args
.
hidden_size
,
num_heads
=
medusa_head_num
,
...
...
@@ -403,7 +403,7 @@ if __name__ == "__main__":
parser
.
add_argument
(
'--medusa_choices'
,
type
=
str
,
required
=
Tru
e
,
default
=
Non
e
,
help
=
"Medusa choice to use, if not none, will use Medusa decoding."
" E.g.: [[0, 0, 0, 0], [0, 1, 0], [1, 0], [1, 1]] for 9 medusa tokens."
)
...
...
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