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
4f419c00
Unverified
Commit
4f419c00
authored
Aug 22, 2024
by
Flex Wang
Committed by
GitHub
Aug 22, 2024
Browse files
Fix ShardedStateLoader for vllm fp8 quantization (#7708)
parent
a3fce56b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
vllm/model_executor/model_loader/loader.py
vllm/model_executor/model_loader/loader.py
+4
-0
No files found.
vllm/model_executor/model_loader/loader.py
View file @
4f419c00
...
@@ -579,6 +579,10 @@ class ShardedStateLoader(BaseModelLoader):
...
@@ -579,6 +579,10 @@ class ShardedStateLoader(BaseModelLoader):
with
torch
.
device
(
device_config
.
device
):
with
torch
.
device
(
device_config
.
device
):
model
=
_initialize_model
(
model_config
,
self
.
load_config
,
model
=
_initialize_model
(
model_config
,
self
.
load_config
,
lora_config
,
cache_config
)
lora_config
,
cache_config
)
for
_
,
module
in
model
.
named_modules
():
quant_method
=
getattr
(
module
,
"quant_method"
,
None
)
if
quant_method
is
not
None
:
quant_method
.
process_weights_after_loading
(
module
)
rank
=
get_tensor_model_parallel_rank
()
rank
=
get_tensor_model_parallel_rank
()
pattern
=
os
.
path
.
join
(
pattern
=
os
.
path
.
join
(
local_model_path
,
local_model_path
,
...
...
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