Skip to content

Commit c1ab261

Browse files
committed
Fix initializing GGUF weights for ColumnParallelLinear when using tensor parallel > 1 (vllm-project#13023)
Signed-off-by: SzymonOzog <szymon.ozog@aleph-alpha.com>
1 parent b55d270 commit c1ab261

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vllm/model_executor/layers/linear.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def weight_loader(self, param: Parameter, loaded_weight: torch.Tensor):
363363
# Materialize GGUF UninitializedParameter
364364
if is_gguf_weight and isinstance(param, UninitializedParameter):
365365
final_shape = list(loaded_weight.shape)
366-
if output_dim is not None and not is_sharded_weight:
366+
if output_dim is not None:
367367
tp_size = get_tensor_model_parallel_world_size()
368368
assert final_shape[output_dim] % tp_size == 0
369369
final_shape[output_dim] = final_shape[output_dim] // tp_size

0 commit comments

Comments
 (0)