Skip to content

Commit

Permalink
[Bugfix]fix and needs_scalar_to_array logic check (#6238)
Browse files Browse the repository at this point in the history
Co-authored-by: Robert Shaw <114415538+robertgshaw2-neuralmagic@users.noreply.github.com>
  • Loading branch information
qibaoyuan and robertgshaw2-neuralmagic authored Jul 9, 2024
1 parent 673dd4c commit d3a2451
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vllm/model_executor/layers/linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def weight_loader(self,
if loaded_shard_id is None:
# Loaded weight is already fused on disk (qkv/mlp).
if output_dim is None:
if needs_scalar_to_array is not None:
if needs_scalar_to_array:
param_data, loaded_weight = adjust_scalar_to_fused_array(
param_data, loaded_weight, 0)

Expand Down Expand Up @@ -549,7 +549,7 @@ def weight_loader(self,
if loaded_shard_id is None:
# Loaded weight is already fused on disk (qkv/mlp).
if output_dim is None:
if needs_scalar_to_array is not None:
if needs_scalar_to_array:
param_data, loaded_weight = adjust_scalar_to_fused_array(
param_data, loaded_weight, 0)

Expand Down

0 comments on commit d3a2451

Please sign in to comment.