@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / d3a245138a
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 16, 22:00 UTC

[Bugfix]fix and needs_scalar_to_array logic check (#6238)

Co-authored-by: Robert Shaw <114415538+robertgshaw2-neuralmagic@users.noreply.github.com>

Baoyuan Qi committed Jul 10, 2024 at 07:43 UTC d3a245138acb358c7e1e5c5dcf4dcb3c2b48c8ff
1 file changed +2 -2
vllm/model_executor/layers/linear.py
+2 -2
@@ -387,7 +387,7 @@ class MergedColumnParallelLinear(ColumnParallelLinear):
387 if loaded_shard_id is None:
388 # Loaded weight is already fused on disk (qkv/mlp).
389 if output_dim is None:
390 - if needs_scalar_to_array is not None:
390 + if needs_scalar_to_array:
391 param_data, loaded_weight = adjust_scalar_to_fused_array(
392 param_data, loaded_weight, 0)
393
@@ -549,7 +549,7 @@ class QKVParallelLinear(ColumnParallelLinear):
549 if loaded_shard_id is None:
550 # Loaded weight is already fused on disk (qkv/mlp).
551 if output_dim is None:
552 - if needs_scalar_to_array is not None:
552 + if needs_scalar_to_array:
553 param_data, loaded_weight = adjust_scalar_to_fused_array(
554 param_data, loaded_weight, 0)
555