Find a file
2023-11-30 16:52:05 +11:00
unsloth First upload of Unsloth code 2023-11-30 03:51:54 +11:00
.gitignore Initial commit 2023-11-30 03:50:09 +11:00
LICENSE Initial commit 2023-11-30 03:50:09 +11:00
pyproject.toml Update pyproject.toml 2023-11-30 16:52:05 +11:00
README.md Update README.md 2023-11-30 04:18:16 +11:00
requirements_cu118.txt requirements 2023-11-30 16:50:44 +11:00
requirements_cu121.txt requirements 2023-11-30 16:50:44 +11:00

Unsloth

2x faster 50% less memory LLM finetuning on a single GPU.

Installation Instructions

Unsloth currently only supports Linux* and Pytorch >= 2.1.

  1. Find your CUDA version via
import torch; torch.version.cuda
  1. For CUDA 11.8:
pip install "unsloth[cu118] @ git+https://github.com/unslothai/unsloth.git"
  1. 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:

  1. Try our Colab example:
  2. Try our Kaggle example:

Future Milestones

Troubleshooting

  1. Sometimes bitsandbytes or xformers does not link properly. Try running:
!ldconfig /usr/lib64-nvidia
  1. 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.