Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
6eae3453
Unverified
Commit
6eae3453
authored
May 06, 2025
by
Lucas Wilkinson
Committed by
GitHub
May 06, 2025
Browse files
[Misc] Fix ScalarType float4 naming (#17690)
Signed-off-by:
Lucas Wilkinson
<
lwilkinson@neuralmagic.com
>
parent
63ced7b4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
tests/kernels/quantization/test_nvfp4_quant.py
tests/kernels/quantization/test_nvfp4_quant.py
+1
-1
tests/test_scalartype.py
tests/test_scalartype.py
+1
-1
vllm/scalar_type.py
vllm/scalar_type.py
+1
-1
No files found.
tests/kernels/quantization/test_nvfp4_quant.py
View file @
6eae3453
...
...
@@ -17,7 +17,7 @@ PAD_SHAPES = [(90, 64), (150, 64), (128, 48), (128, 80), (150, 80), (90, 48),
SEEDS
=
[
42
]
CUDA_DEVICES
=
[
'cuda:0'
]
FLOAT4_E2M1_MAX
=
scalar_types
.
float4_e2m1f
n
.
max
()
FLOAT4_E2M1_MAX
=
scalar_types
.
float4_e2m1f
.
max
()
FLOAT8_E4M3_MAX
=
torch
.
finfo
(
torch
.
float8_e4m3fn
).
max
# E2M1 to float
...
...
tests/test_scalartype.py
View file @
6eae3453
...
...
@@ -11,7 +11,7 @@ from vllm.scalar_type import scalar_types
(
0
,
15
,
scalar_types
.
uint4
),
(
-
8
,
7
,
scalar_types
.
uint4b8
),
(
-
128
,
127
,
scalar_types
.
uint8b128
),
(
-
6.
,
6.
,
scalar_types
.
float4_e2m1f
n
),
(
-
6.
,
6.
,
scalar_types
.
float4_e2m1f
),
(
-
28.
,
28.
,
scalar_types
.
float6_e3m2f
),
(
torch
.
int8
,
scalar_types
.
int8
),
(
torch
.
uint8
,
scalar_types
.
uint8
),
...
...
vllm/scalar_type.py
View file @
6eae3453
...
...
@@ -333,7 +333,7 @@ class scalar_types:
float6_e3m2f
=
ScalarType
.
float_
(
3
,
2
,
True
,
NanRepr
.
NONE
)
# fp4, https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf
float4_e2m1f
n
=
ScalarType
.
float_
(
2
,
1
,
True
,
NanRepr
.
NONE
)
float4_e2m1f
=
ScalarType
.
float_
(
2
,
1
,
True
,
NanRepr
.
NONE
)
# "gptq" types
uint2b2
=
ScalarType
.
uint
(
2
,
2
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment