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
dcbac4cb
Unverified
Commit
dcbac4cb
authored
Apr 28, 2025
by
Simon Mo
Committed by
GitHub
Apr 28, 2025
Browse files
[Model] Qwen3 Dense FP8 Compat Fixes (#17318)
Signed-off-by:
simon-mo
<
xmo@berkeley.edu
>
parent
ed246203
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
vllm/model_executor/layers/linear.py
vllm/model_executor/layers/linear.py
+9
-0
No files found.
vllm/model_executor/layers/linear.py
View file @
dcbac4cb
...
@@ -929,6 +929,15 @@ class QKVParallelLinear(ColumnParallelLinear):
...
@@ -929,6 +929,15 @@ class QKVParallelLinear(ColumnParallelLinear):
shard_offset
=
self
.
_get_shard_offset_mapping
(
loaded_shard_id
)
shard_offset
=
self
.
_get_shard_offset_mapping
(
loaded_shard_id
)
shard_size
=
self
.
_get_shard_size_mapping
(
loaded_shard_id
)
shard_size
=
self
.
_get_shard_size_mapping
(
loaded_shard_id
)
# Note(simon): This is needed for Qwen3's fp8 quantization.
if
isinstance
(
param
,
BlockQuantScaleParameter
):
assert
self
.
quant_method
is
not
None
assert
hasattr
(
self
.
quant_method
,
"quant_config"
)
weight_block_size
=
self
.
quant_method
.
quant_config
.
weight_block_size
block_n
,
_
=
weight_block_size
[
0
],
weight_block_size
[
1
]
shard_offset
=
(
shard_offset
+
block_n
-
1
)
//
block_n
shard_size
=
(
shard_size
+
block_n
-
1
)
//
block_n
param
.
load_qkv_weight
(
loaded_weight
=
loaded_weight
,
param
.
load_qkv_weight
(
loaded_weight
=
loaded_weight
,
num_heads
=
self
.
num_kv_head_replicas
,
num_heads
=
self
.
num_kv_head_replicas
,
shard_id
=
loaded_shard_id
,
shard_id
=
loaded_shard_id
,
...
...
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