From 5edae1cd797dab26f80646d79d1895b3410a57de Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Sun, 18 Feb 2024 18:21:54 +1100 Subject: [PATCH] readme --- README.md | 27 +++++++++++++++------------ unsloth/__init__.py | 2 +- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 66f4c55646..0dc7a708ba 100644 --- a/README.md +++ b/README.md @@ -86,9 +86,12 @@ All notebooks are **beginner friendly**! Add your dataset, click "Run All", and ### Conda Installation Select either `pytorch-cuda=11.8` for CUDA 11.8 or `pytorch-cuda=12.1` for CUDA 12.1. If you have `mamba`, use `mamba` instead of `conda` for faster solving. See this [Github issue](https://github.com/unslothai/unsloth/issues/73) for help on debugging Conda installs. ```bash -conda install pytorch torchvision torchaudio pytorch-cuda=<12.1/11.8> -c pytorch -c nvidia +conda create --name unsloth_env python=3.10 +conda activate unsloth_env -conda install xformers -c xformers -y +conda install pytorch cudatoolkit torchvision torchaudio pytorch-cuda=<12.1/11.8> -c pytorch -c nvidia + +conda install xformers -c xformers pip install bitsandbytes @@ -110,8 +113,8 @@ pip install --upgrade --force-reinstall --no-cache-dir torch==2.1.0 triton \ ```bash pip install "unsloth[cu118] @ git+https://github.com/unslothai/unsloth.git" pip install "unsloth[cu121] @ git+https://github.com/unslothai/unsloth.git" -pip install "unsloth[cu118ampere] @ git+https://github.com/unslothai/unsloth.git" -pip install "unsloth[cu121ampere] @ git+https://github.com/unslothai/unsloth.git" +pip install "unsloth[cu118_ampere] @ git+https://github.com/unslothai/unsloth.git" +pip install "unsloth[cu121_ampere] @ git+https://github.com/unslothai/unsloth.git" ``` 3. For Pytorch 2.1.1: Use the `"ampere"` path for newer RTX 30xx GPUs or higher. ```bash @@ -119,10 +122,10 @@ pip install --upgrade --force-reinstall --no-cache-dir torch==2.1.1 triton \ --index-url https://download.pytorch.org/whl/cu121 ``` ```bash -pip install "unsloth[cu118torch211] @ git+https://github.com/unslothai/unsloth.git" -pip install "unsloth[cu121torch211] @ git+https://github.com/unslothai/unsloth.git" -pip install "unsloth[cu118amperetorch211] @ git+https://github.com/unslothai/unsloth.git" -pip install "unsloth[cu121amperetorch211] @ git+https://github.com/unslothai/unsloth.git" +pip install "unsloth[cu118_torch211] @ git+https://github.com/unslothai/unsloth.git" +pip install "unsloth[cu121_torch211] @ git+https://github.com/unslothai/unsloth.git" +pip install "unsloth[cu118_ampere_torch211] @ git+https://github.com/unslothai/unsloth.git" +pip install "unsloth[cu121_ampere_torch211] @ git+https://github.com/unslothai/unsloth.git" ``` 4. For Pytorch 2.2.0: Use the `"ampere"` path for newer RTX 30xx GPUs or higher. ```bash @@ -130,10 +133,10 @@ pip install --upgrade --force-reinstall --no-cache-dir torch==2.2.0 triton \ --index-url https://download.pytorch.org/whl/cu121 ``` ```bash -pip install "unsloth[cu118torch220] @ git+https://github.com/unslothai/unsloth.git" -pip install "unsloth[cu121torch220] @ git+https://github.com/unslothai/unsloth.git" -pip install "unsloth[cu118amperetorch220] @ git+https://github.com/unslothai/unsloth.git" -pip install "unsloth[cu121amperetorch220] @ git+https://github.com/unslothai/unsloth.git" +pip install "unsloth[cu118_torch220] @ git+https://github.com/unslothai/unsloth.git" +pip install "unsloth[cu121_torch220] @ git+https://github.com/unslothai/unsloth.git" +pip install "unsloth[cu118_ampere_torch220] @ git+https://github.com/unslothai/unsloth.git" +pip install "unsloth[cu121_ampere_torch220] @ git+https://github.com/unslothai/unsloth.git" ``` 5. If you get errors, try the below first, then go back to step 1: ```bash diff --git a/unsloth/__init__.py b/unsloth/__init__.py index b290b690bd..3b3a553bbd 100644 --- a/unsloth/__init__.py +++ b/unsloth/__init__.py @@ -77,7 +77,7 @@ except: except: raise ImportError("Unsloth: CUDA is not linked properly.\n"\ "We tried running `ldconfig /usr/lib64-nvidia` ourselves, but it didn't work.\n"\ - "You need to run in your terminal `ldconfig /usr/lib64-nvidia` yourself, then import Unsloth.") + "You need to run in your terminal `sudo ldconfig /usr/lib64-nvidia` yourself, then import Unsloth.") pass from .models import *