mirror of
https://github.com/unslothai/unsloth.git
synced 2026-07-09 15:58:41 +00:00
mirror of https://github.com/unslothai/unsloth
agentaideepseekdeepseek-r1fine-tuninggemmagemma3llamallama3llmllmsloramistralopenaipytorchqwenqwen3text-to-speechttsunsloth
| images | ||
| unsloth | ||
| .gitignore | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
Unsloth
2x faster 50% less memory LLM finetuning on a single GPU.
Installation Instructions
Unsloth currently only supports Linux* and Pytorch >= 2.1.
- Find your CUDA version via
import torch; torch.version.cuda
- For CUDA 11.8:
pip install "unsloth[cu118] @ git+https://github.com/unslothai/unsloth.git"
- For CUDA 12.1:
pip install "unsloth[cu121] @ git+https://github.com/unslothai/unsloth.git"
To update Pytorch to 2.1:
conda install cudatoolkit xformers bitsandbytes pytorch pytorch-cuda=12.1 \
-c pytorch -c nvidia -c xformers -c conda-forge -y
or
pip install --upgrade --force-reinstall --no-cache-dir torch triton \
--index-url https://download.pytorch.org/whl/cu121
Change cu121 to cu118 for CUDA version 11.8 or 12.1. Go to https://pytorch.org/ to learn more.
Then install Unsloth.
For Google Colab and Kaggle instances:
- Try our Colab example:
- Try our Kaggle example:
Future Milestones
Troubleshooting
- Sometimes
bitsandbytesorxformersdoes not link properly. Try running:
!ldconfig /usr/lib64-nvidia
- Windows is not supported as of yet - we rely on Xformers and Triton support, so until both packages support Windows officially, Unsloth will then support Windows.