unsloth/tests
Jerry Zhang 034b637176 Support model.save_pretrained_torchao (#3111)
Summary:
Allow users merge the LoRA weights and then do a post training quantization with torchao

Usage:

```
from torchao.quantization import Int8DynamicActivationInt8WeightConfig
torchao_config = Int8DynamicActivationInt8WeightConfig()
model.save_pretrained_torchao(
    save_path,
    tokenizer=tokenizer,
    torchao_config=torchao_config,
)
```

Test Plan:
python tests/saving/test_unsloth_save.py

Reviewers:

Subscribers:

Tasks:

Tags:
2025-08-26 04:53:39 -07:00
..
qlora Fix typos (#2540) 2025-05-15 04:23:27 -07:00
saving Support model.save_pretrained_torchao (#3111) 2025-08-26 04:53:39 -07:00
utils Fix Typos in Documentation and Comments (#2721) 2025-06-17 04:34:51 -07:00
__init__.py Qwen 3, Bug Fixes (#2445) 2025-04-30 22:38:39 -07:00
test_model_registry.py Qwen 3, Bug Fixes (#2445) 2025-04-30 22:38:39 -07:00