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
8334c39f
Unverified
Commit
8334c39f
authored
Aug 09, 2024
by
Isotr0py
Committed by
GitHub
Aug 08, 2024
Browse files
[Bugfix] Fix new Llama3.1 GGUF model loading (#7269)
parent
e9045767
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
+16
-14
vllm/model_executor/model_loader/weight_utils.py
vllm/model_executor/model_loader/weight_utils.py
+16
-14
No files found.
vllm/model_executor/model_loader/weight_utils.py
View file @
8334c39f
...
...
@@ -435,23 +435,25 @@ def gguf_quant_weights_iterator(
reader
=
gguf
.
GGUFReader
(
gguf_file
)
for
tensor
in
reader
.
tensors
:
weight_type
=
tensor
.
tensor_type
name
=
gguf_to_hf_name_map
[
tensor
.
name
]
if
tensor
.
name
in
gguf_to_hf_name_map
:
weight_type
=
tensor
.
tensor_type
name
=
gguf_to_hf_name_map
[
tensor
.
name
]
if
weight_type
.
name
!=
"F32"
:
weight_type_name
=
name
.
replace
(
"weight"
,
"qweight_type"
)
weight_type
=
torch
.
tensor
(
weight_type
)
yield
weight_type_name
,
weight_type
if
weight_type
.
name
!=
"F32"
:
weight_type_name
=
name
.
replace
(
"weight"
,
"qweight_type"
)
weight_type
=
torch
.
tensor
(
weight_type
)
yield
weight_type_name
,
weight_type
for
tensor
in
reader
.
tensors
:
weight
=
tensor
.
data
weight_type
=
tensor
.
tensor_type
name
=
gguf_to_hf_name_map
[
tensor
.
name
]
if
weight_type
.
name
!=
"F32"
:
name
=
name
.
replace
(
"weight"
,
"qweight"
)
param
=
torch
.
tensor
(
weight
)
yield
name
,
param
if
tensor
.
name
in
gguf_to_hf_name_map
:
weight
=
tensor
.
data
weight_type
=
tensor
.
tensor_type
name
=
gguf_to_hf_name_map
[
tensor
.
name
]
if
weight_type
.
name
!=
"F32"
:
name
=
name
.
replace
(
"weight"
,
"qweight"
)
param
=
torch
.
tensor
(
weight
)
yield
name
,
param
def
kv_cache_scales_loader
(
...
...
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