unsloth icon indicating copy to clipboard operation
unsloth copied to clipboard

add bash script to install packages

Open tohrnii opened this issue 1 year ago • 7 comments

This PR adds a simple bash script to install unsloth and it's dependencies.

tohrnii avatar Mar 14 '24 06:03 tohrnii

seems like colab updated torch version so putting this PR in draft mode for now.

tohrnii avatar Mar 14 '24 08:03 tohrnii

OOO I like this bash script!! Ye I'm working on fixing Colab for now :(

danielhanchen avatar Mar 14 '24 09:03 danielhanchen

@danielhanchen I checked and this script works for conda and pip for torch versions before 2.2.1. What changes would required to support 2.2.1? Maybe the instructions can be added to readme as well if the fix is stable.

tohrnii avatar Mar 16 '24 12:03 tohrnii

@tohrnii It's mainly torch 2.2.1 causing issues for multiple packages. I found:

# RTX 3090, 4090 Ampere GPUs:
pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
pip install --no-deps packaging ninja einops flash-attn xformers trl peft accelerate bitsandbytes

# Pre Ampere RTX 2080, T4, GTX 1080 GPUs:
pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
pip install --no-deps xformers trl peft accelerate bitsandbytes

to work

danielhanchen avatar Mar 16 '24 15:03 danielhanchen

Also changed the naming slightly. colab-new -> colab-221

tohrnii avatar Mar 20 '24 19:03 tohrnii

@bet0x Thanks, I'm not sure what you mean? Doesn't torch.cuda.get_device_capability()[0] work? Have you tried running this bash script and faced any problems using it?

tohrnii avatar Mar 22 '24 19:03 tohrnii

@tohrnii

Never mind, I got confused with another PR. I was also conducting verification and working towards the replacement of NVCC (including detection and related processes).

bet0x avatar Mar 22 '24 19:03 bet0x