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 15, 12:15 UTC
[Misc] Fix ScalarType float4 naming (#17690)
Signed-off-by: Lucas Wilkinson <lwilkinson@neuralmagic.com>
Lucas Wilkinson committed
May 6, 2025 at 04:07 UTC
6eae34533a893d26b5f6d178c3b5885aa229e520
3 files changed
+3
-3
tests/kernels/quantization/test_nvfp4_quant.py
+1
-1
@@ -17,7 +17,7 @@ PAD_SHAPES = [(90, 64), (150, 64), (128, 48), (128, 80), (150, 80), (90, 48),
17
SEEDS = [42]
18
CUDA_DEVICES = ['cuda:0']
19
20
-FLOAT4_E2M1_MAX = scalar_types.float4_e2m1fn.max()
20
+FLOAT4_E2M1_MAX = scalar_types.float4_e2m1f.max()
21
FLOAT8_E4M3_MAX = torch.finfo(torch.float8_e4m3fn).max
22
23
# E2M1 to float
tests/test_scalartype.py
+1
-1
@@ -11,7 +11,7 @@ from vllm.scalar_type import scalar_types
11
(0, 15, scalar_types.uint4),
12
(-8, 7, scalar_types.uint4b8),
13
(-128, 127, scalar_types.uint8b128),
14
- (-6., 6., scalar_types.float4_e2m1fn),
14
+ (-6., 6., scalar_types.float4_e2m1f),
15
(-28., 28., scalar_types.float6_e3m2f),
16
(torch.int8, scalar_types.int8),
17
(torch.uint8, scalar_types.uint8),
vllm/scalar_type.py
+1
-1
@@ -333,7 +333,7 @@ class scalar_types:
333
float6_e3m2f = ScalarType.float_(3, 2, True, NanRepr.NONE)
334
335
# fp4, https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf
336
- float4_e2m1fn = ScalarType.float_(2, 1, True, NanRepr.NONE)
336
+ float4_e2m1f = ScalarType.float_(2, 1, True, NanRepr.NONE)
337
338
# "gptq" types
339
uint2b2 = ScalarType.uint(2, 2)