Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e212a84
add int4tensor support for safetensors
liangel-02 Sep 24, 2025
7c82d4d
Update on "add int4tensor support for safetensors"
liangel-02 Sep 24, 2025
bbeaf52
Update on "add int4tensor support for safetensors"
liangel-02 Sep 24, 2025
0200ad1
Update on "add int4tensor support for safetensors"
liangel-02 Sep 24, 2025
60c5de9
Update on "add int4tensor support for safetensors"
liangel-02 Sep 24, 2025
6e31683
Update on "add int4tensor support for safetensors"
liangel-02 Sep 24, 2025
86d7fcf
Update on "add int4tensor support for safetensors"
liangel-02 Sep 24, 2025
512f9ed
Update base for Update on "add int4tensor support for safetensors"
liangel-02 Sep 25, 2025
f7b8068
Update on "add int4tensor support for safetensors"
liangel-02 Sep 25, 2025
9395b3f
add int4preshuffledtensor to safetensors
liangel-02 Sep 25, 2025
585afe2
Update on "add int4preshuffledtensor to safetensors"
liangel-02 Sep 25, 2025
87d2e18
add int4tilepackedto4dtensor subclass to safetensors
liangel-02 Sep 25, 2025
6007af3
Update on "add int4tilepackedto4dtensor subclass to safetensors"
liangel-02 Sep 25, 2025
ce346e7
add IntxUnpackedToInt8Tensor to safetensors
liangel-02 Sep 25, 2025
b53afbe
Update base for Update on "add IntxUnpackedToInt8Tensor to safetensors"
liangel-02 Sep 25, 2025
7eda61b
Update on "add IntxUnpackedToInt8Tensor to safetensors"
liangel-02 Sep 25, 2025
bc69d4f
Update base for Update on "add IntxUnpackedToInt8Tensor to safetensors"
liangel-02 Sep 25, 2025
ae4ffdc
Update on "add IntxUnpackedToInt8Tensor to safetensors"
liangel-02 Sep 25, 2025
4914d68
Update base for Update on "add IntxUnpackedToInt8Tensor to safetensors"
liangel-02 Sep 25, 2025
9c0b4de
Update on "add IntxUnpackedToInt8Tensor to safetensors"
liangel-02 Sep 25, 2025
5884d16
Update base for Update on "add IntxUnpackedToInt8Tensor to safetensors"
liangel-02 Sep 26, 2025
13768b1
Update on "add IntxUnpackedToInt8Tensor to safetensors"
liangel-02 Sep 26, 2025
7e1857c
Update base for Update on "add IntxUnpackedToInt8Tensor to safetensors"
liangel-02 Sep 26, 2025
4ebc5cd
Update on "add IntxUnpackedToInt8Tensor to safetensors"
liangel-02 Sep 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions test/prototype/safetensors/test_safetensors_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
from torchao.quantization.quant_api import (
Float8DynamicActivationFloat8WeightConfig,
Int4WeightOnlyConfig,
Int8DynamicActivationIntxWeightConfig,
IntxWeightOnlyConfig,
)
from torchao.utils import is_sm_at_least_89

Expand All @@ -46,6 +48,8 @@ class TestSafeTensors(TestCase):
(Int4WeightOnlyConfig(), False),
(Int4WeightOnlyConfig(), True),
(Int4WeightOnlyConfig(int4_packing_format="tile_packed_to_4d"), False),
(IntxWeightOnlyConfig(), False),
(Int8DynamicActivationIntxWeightConfig(), False),
],
)
def test_safetensors(self, config, act_pre_scale=False):
Expand Down
3 changes: 3 additions & 0 deletions torchao/prototype/safetensors/safetensors_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
Float8Tensor,
Int4Tensor,
Int4TilePackedTo4dTensor,
IntxUnpackedToInt8Tensor,
)
from torchao.quantization.quantize_.common import KernelPreference
from torchao.quantization.quantize_.workflows import QuantizeTensorToFloat8Kwargs
Expand All @@ -18,6 +19,7 @@
"Float8Tensor": Float8Tensor,
"Int4Tensor": Int4Tensor,
"Int4TilePackedTo4dTensor": Int4TilePackedTo4dTensor,
"IntxUnpackedToInt8Tensor": IntxUnpackedToInt8Tensor,
"Float8MMConfig": torchao.float8.inference.Float8MMConfig,
"QuantizeTensorToFloat8Kwargs": QuantizeTensorToFloat8Kwargs,
"PerRow": torchao.quantization.PerRow,
Expand All @@ -29,6 +31,7 @@
"Float8Tensor",
"Int4Tensor",
"Int4TilePackedTo4dTensor",
"IntxUnpackedToInt8Tensor",
]

__all__ = [
Expand Down
Loading