unsloth/tests/saving
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
..
language_models tests for additional merge fix unsloth zoo pr 163 (#2719) 2025-06-11 14:08:41 -07:00
non_peft tests for additional merge fix unsloth zoo pr 163 (#2719) 2025-06-11 14:08:41 -07:00
text_to_speech_models tests for additional merge fix unsloth zoo pr 163 (#2719) 2025-06-11 14:08:41 -07:00
vision_models Revert "Revert "Add Qwen2.5-VL-32B-Instruct mapping to fix quantized model me…" (#2990) 2025-07-17 15:37:23 -07:00
test_unsloth_save.py Support model.save_pretrained_torchao (#3111) 2025-08-26 04:53:39 -07:00