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 10, 02:45 UTC
[BugFix] Fix `assert x_s.shape[-1] == x_q.shape[-1] // group_shape[1]` in Blackwell Quantized MoE Test (#32362)
Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com> Signed-off-by: Lucas Wilkinson <LucasWilkinson@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Lucas Wilkinson committed
Jan 15, 2026 at 11:19 UTC
c36ba69bda2602a75aeee70f201987e10c2dd238
1 file changed
+2
-2
vllm/model_executor/layers/quantization/utils/quant_utils.py
+2
-2
@@ -247,8 +247,8 @@ def scaled_dequantize(
247
if group_shape is not None:
248
group_shape = _normalize_quant_group_shape(x_q, group_shape)
249
250
- if x_s.ndim == 0: # scalar
251
- x_s = x_s.unsqueeze(-1).unsqueeze(-1) # convert to (1, 1) tensor
250
+ if x_s.numel() == 1: # scalar
251
+ x_s = x_s.reshape(1, 1) # normalize all scalar-like tensors to (1, 1)
252
if x_s.ndim == 1:
253
if group_shape is None:
254
raise AssertionError(