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
norm
vllm
Commits
f780504d
Unverified
Commit
f780504d
authored
Jan 16, 2024
by
Chenhui Zhang
Committed by
GitHub
Jan 15, 2024
Browse files
fix weigit loading for GQA with TP (#2379)
parent
bfc072ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
vllm/model_executor/layers/linear.py
vllm/model_executor/layers/linear.py
+4
-1
No files found.
vllm/model_executor/layers/linear.py
View file @
f780504d
...
@@ -423,7 +423,10 @@ class QKVParallelLinear(ColumnParallelLinear):
...
@@ -423,7 +423,10 @@ class QKVParallelLinear(ColumnParallelLinear):
shard_offset
=
shard_offset
//
param
.
pack_factor
shard_offset
=
shard_offset
//
param
.
pack_factor
param_data
=
param_data
.
narrow
(
output_dim
,
shard_offset
,
param_data
=
param_data
.
narrow
(
output_dim
,
shard_offset
,
shard_size
)
shard_size
)
shard_id
=
tp_rank
//
self
.
num_kv_head_replicas
if
loaded_shard_id
==
"q"
:
shard_id
=
tp_rank
else
:
shard_id
=
tp_rank
//
self
.
num_kv_head_replicas
start_idx
=
shard_id
*
shard_size
start_idx
=
shard_id
*
shard_size
loaded_weight
=
loaded_weight
.
narrow
(
output_dim
,
start_idx
,
loaded_weight
=
loaded_weight
.
narrow
(
output_dim
,
start_idx
,
shard_size
)
shard_size
)
...
...
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