@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 9480ae24e3
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 14, 05:30 UTC

[Bugfix] Fix packed_factor missing attribute error (#23902)

Signed-off-by: Kyuyeun Kim <kyuyeunk@google.com>

Kyuyeun Kim committed Sep 2, 2025 at 10:56 UTC 9480ae24e38cb73c5b665f5843ebd92c75a2039f
1 file changed +8 -8
vllm/model_executor/layers/linear.py
+8 -8
@@ -722,8 +722,8 @@ class MergedColumnParallelLinear(ColumnParallelLinear):
722 # If quantized, we need to adjust the offset and size to account
723 # for the packing.
724 if packed_dim == output_dim:
725 - shard_size = shard_size // param.pack_factor
726 - shard_offset = shard_offset // param.pack_factor
725 + shard_size = shard_size // param.packed_factor
726 + shard_offset = shard_offset // param.packed_factor
727 # Special case for Marlin.
728 shard_size, shard_offset = adjust_marlin_shard(
729 param, shard_size, shard_offset)
@@ -756,8 +756,8 @@ class MergedColumnParallelLinear(ColumnParallelLinear):
756 # for the packing.
757 packed_dim = getattr(param, "packed_dim", None)
758 if packed_dim == output_dim:
759 - shard_size = shard_size // param.pack_factor
760 - shard_offset = shard_offset // param.pack_factor
759 + shard_size = shard_size // param.packed_factor
760 + shard_offset = shard_offset // param.packed_factor
761 # Special case for Marlin.
762 shard_size, shard_offset = adjust_marlin_shard(
763 param, shard_size, shard_offset)
@@ -1107,8 +1107,8 @@ class QKVParallelLinear(ColumnParallelLinear):
1107 # If quantized, we need to adjust the offset and size to account
1108 # for the packing.
1109 if packed_dim == output_dim:
1110 - shard_size = shard_size // param.pack_factor
1111 - shard_offset = shard_offset // param.pack_factor
1110 + shard_size = shard_size // param.packed_factor
1111 + shard_offset = shard_offset // param.packed_factor
1112
1113 # Special case for Marlin.
1114 shard_size, shard_offset = adjust_marlin_shard(
@@ -1155,8 +1155,8 @@ class QKVParallelLinear(ColumnParallelLinear):
1155 # for the packing.
1156 packed_dim = getattr(param, "packed_dim", None)
1157 if packed_dim == output_dim:
1158 - shard_size = shard_size // param.pack_factor
1159 - shard_offset = shard_offset // param.pack_factor
1158 + shard_size = shard_size // param.packed_factor
1159 + shard_offset = shard_offset // param.packed_factor
1160
1161 # Special case for Marlin.
1162 shard_size, shard_offset = adjust_marlin_shard(