unsloth icon indicating copy to clipboard operation
unsloth copied to clipboard

Problem with installation

Open freQuensy23-coder opened this issue 1 year ago • 4 comments

I'v tried to install unsloth to my server using pip, but pip can't found required version:

%pip install "unsloth[cu121_ampere_torch211] @ git+https://github.com/unslothai/unsloth.git"
Defaulting to user installation because normal site-packages is not writeable
WARNING: Ignoring invalid distribution -orch (/home/jupyter/.local/lib/python3.10/site-packages)
Collecting unsloth@ git+https://github.com/unslothai/unsloth.git (from unsloth[cu121_ampere_torch211]@ git+https://github.com/unslothai/unsloth.git)
  Cloning https://github.com/unslothai/unsloth.git to /tmp/pip-install-xq40609d/unsloth_4df7771e59764f7ba34b2a93e5cc6d01
  Running command git clone --filter=blob:none --quiet https://github.com/unslothai/unsloth.git /tmp/pip-install-xq40609d/unsloth_4df7771e59764f7ba34b2a93e5cc6d01
  Resolved https://github.com/unslothai/unsloth.git to commit a030e802030d4619ba247d45c5819fb59e9addb3
  Preparing metadata (pyproject.toml) ... done
  WARNING: Generating metadata for package unsloth produced metadata for project name unknown. Fix your #egg=unsloth fragments.
Discarding git+https://github.com/unslothai/unsloth.git: Requested unknown from git+https://github.com/unslothai/unsloth.git (from unsloth@ git+https://github.com/unslothai/unsloth.git) has inconsistent name: expected 'unsloth', but metadata has 'unknown'
ERROR: Could not find a version that satisfies the requirement unsloth (unavailable) (from versions: none)
ERROR: No matching distribution found for unsloth (unavailable)
unsloth

Env config:

!nvidia-smi
Sat Feb 17 11:12:30 2024       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.154.05             Driver Version: 535.154.05   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA A100-SXM4-80GB          On  | 00000000:8C:00.0 Off |                    0 |
| N/A   32C    P0              75W / 500W |      9MiB / 81920MiB |      0%      Default |
|                                         |                      |             Disabled |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      1158      G   /usr/lib/xorg/Xorg                            4MiB |
+---------------------------------------------------------------------------------------+
version__

torch and cuda

import torch; torch.version.cuda, torch.__version__ # ('12.1', '2.2.0+cu121')

can you tell me what the problem might be?

freQuensy23-coder avatar Feb 17 '24 11:02 freQuensy23-coder

@freQuensy23-coder Oh my apologies!! I forgot to change the name of the installation paths. Ie change cu121_ampere_torch211 to cu121amperetorch211 with no underscores - hope that works! Sorry again!

danielhanchen avatar Feb 17 '24 13:02 danielhanchen

The same problem((

%pip install "unsloth[cu121amperetorch220] @ git+https://github.com/unslothai/unsloth.git"

Defaulting to user installation because normal site-packages is not writeable
WARNING: Ignoring invalid distribution -orch (/home/jupyter/.local/lib/python3.10/site-packages)
Collecting unsloth@ git+https://github.com/unslothai/unsloth.git (from unsloth[cu121amperetorch220]@ git+https://github.com/unslothai/unsloth.git)
  Cloning https://github.com/unslothai/unsloth.git to /tmp/pip-install-fsri0ks2/unsloth_39f3e526fdc44ce9afa6b5b468ab19b1
  Running command git clone --filter=blob:none --quiet https://github.com/unslothai/unsloth.git /tmp/pip-install-fsri0ks2/unsloth_39f3e526fdc44ce9afa6b5b468ab19b1
  Resolved https://github.com/unslothai/unsloth.git to commit a030e802030d4619ba247d45c5819fb59e9addb3
  Preparing metadata (pyproject.toml) ... done
  WARNING: Generating metadata for package unsloth produced metadata for project name unknown. Fix your #egg=unsloth fragments.
Discarding git+https://github.com/unslothai/unsloth.git: Requested unknown from git+https://github.com/unslothai/unsloth.git (from unsloth@ git+https://github.com/unslothai/unsloth.git) has inconsistent name: expected 'unsloth', but metadata has 'unknown'
ERROR: Could not find a version that satisfies the requirement unsloth (unavailable) (from versions: none)
ERROR: No matching distribution found for unsloth (unavailable)````

freQuensy23-coder avatar Feb 17 '24 18:02 freQuensy23-coder

@freQuensy23-coder Sorry on the delay!! If you join our Discord server at https://discord.gg/u54VK8m8tk - it'll be an async discussion.

But maybe try pip install --upgrade pip to update pip

Also maybe try installing Unsloth through a forced method ie pip install --upgrade --force-reinstall --no-cache-dir "unsloth[cu121_ampere_torch211] @ git+https://github.com/unslothai/unsloth.git"

Also I noticed the underscores are fine!!

danielhanchen avatar Feb 18 '24 15:02 danielhanchen

@freQuensy23-coder I just updated Unsloth's pyproject.toml - so maybe it might work better.

I suggest:

pip install --upgrade pip
pip install --upgrade --force-reinstall --no-cache-dir "unsloth[cu121_ampere_torch211] @ git+https://github.com/unslothai/unsloth.git"

danielhanchen avatar Feb 20 '24 17:02 danielhanchen