File tree Expand file tree Collapse file tree 4 files changed +12
-2
lines changed
compressors/quantized_compressors
tests/test_compressors/quantized_compressors Expand file tree Collapse file tree 4 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1414# flake8: noqa
1515
1616from .base import *
17+ from .fp4_quantized import *
1718from .naive_quantized import *
18- from .nvfp4_quantized import *
1919from .pack_quantized import *
Original file line number Diff line number Diff line change @@ -123,6 +123,15 @@ def decompress_weight(
123123 return decompressed_weight
124124
125125
126+ @BaseCompressor .register (name = CompressionFormat .mxfp4_pack_quantized .value )
127+ class MXFP4PackedCompressor (NVFP4PackedCompressor ):
128+ """
129+ Alias for mxfp4 quantized models
130+ """
131+
132+ pass
133+
134+
126135@torch .compile (fullgraph = True , dynamic = True )
127136def pack_fp4_to_uint8 (x : torch .Tensor ) -> torch .Tensor :
128137 """
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ class CompressionFormat(Enum):
3434 marlin_24 = "marlin-24"
3535 mixed_precision = "mixed-precision"
3636 nvfp4_pack_quantized = "nvfp4-pack-quantized"
37+ mxfp4_pack_quantized = "mxfp4-pack-quantized"
3738
3839
3940@unique
Original file line number Diff line number Diff line change 1414
1515import pytest
1616import torch
17- from compressed_tensors .compressors .quantized_compressors .nvfp4_quantized import (
17+ from compressed_tensors .compressors .quantized_compressors .fp4_quantized import (
1818 pack_fp4_to_uint8 ,
1919 unpack_fp4_from_uint8 ,
2020)
You can’t perform that action at this time.
0 commit comments