Unsloth is a local UI for training and running Gemma 4, Qwen3.6, DeepSeek, Kimi, GLM and other models.
https://unsloth.ai/docs
agent
deepseek
fine-tuning
gemma
gemma3
gpt-oss
llama
llama3
llm
llms
mistral
openai
qwen
reinforcement-learning
self-hosted
text-to-speech
tts
ui
unsloth
- Python 71.5%
- TypeScript 22.7%
- Shell 1.9%
- PowerShell 1.6%
- Rust 1.5%
- Other 0.7%
| unsloth | ||
| .gitignore | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
Unsloth
2x faster 50% less memory LLM finetuning on a single GPU.
!pip install "unsloth[cu118] @ git+https://github.com/unslothai/unsloth.git"
!pip install "unsloth[cu121] @ git+https://github.com/unslothai/unsloth.git"
Google Colab examples
Installation instructions
In Google Colab:
!ldconfig /usr/lib64-nvidia
!pip install xformers --index-url https://download.pytorch.org/whl/cu118
!pip install git+https://github.com/danielhanchen/unsloth.git
!ldconfig /usr/lib64-nvidia is necessary (for now) to link CUDA with Python. Possibly a Google Colab linking bug.
For general installations:
- Install Xformers OR Flash Attention. Choose 1. Old GPUs use Xformers. New use Flash Attention.
- For Xformers, find your Pytorch CUDA version via
torch.version.cudaornvidia-smi.- If you have Conda,
conda install xformers -c xformers - If you have CUDA 11.8,
pip install xformers --index-url https://download.pytorch.org/whl/cu118 - If you have CUDA 12.1,
pip install xformers --index-url https://download.pytorch.org/whl/cu121 - Go to https://github.com/facebookresearch/xformers for other issues.
- You must have Pytorch 2.1 installed for Xformers. If not, try Flash Attention.
- Xformers supports all GPUs (Tesla T4 etc).
- If you have Conda,
- For Flash Attention, you must have a Ampere, Ada, Hopper GPU (A100, RTX 3090, RTX 4090, H100).
- Install Flash Attention via
pip uninstall -y ninja && pip install ninjathenpip install flash-attn --no-build-isolation. - Xformers has native support for Flash Attention, so technically installing Xformers is enough.
- Install Flash Attention via
- Then install Unsloth:
pip install git+https://github.com/danielhanchen/unsloth.git