unsloth icon indicating copy to clipboard operation
unsloth copied to clipboard

[URGENT] llama.cpp / GGUF breaks on Colab

Open danielhanchen opened this issue 9 months ago • 12 comments

llama.cpp seems to be unable to install - investigating now.

image

danielhanchen avatar May 16 '24 13:05 danielhanchen

Facing the same issue.

Is Unsloth always pulling the latest version of llama.cpp? If yes, would not be safer to lock it? Happy to help with that.

eugeniosegala avatar May 16 '24 13:05 eugeniosegala

Sorry on the issue! Hmm I'm actually unsure what the issue is yet - some installs work, whilst some don't - I'm not sure what is causing it to fail

danielhanchen avatar May 16 '24 14:05 danielhanchen

@eugeniosegala Found the issue - reporting to HuggingFace. It seems like PEFT got an update, weirdly causing stuff to break in Colab.

Please change the installation instructions to

%%capture
# Installs Unsloth, Xformers (Flash Attention) and all other packages!
!pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
!pip install --no-deps "xformers<0.0.26" trl "peft<0.11.0" accelerate bitsandbytes

in the first cell

danielhanchen avatar May 16 '24 16:05 danielhanchen

Did not resolved the issue. I am getting: Screenshot 2024-05-17 at 1 31 14

Tried both: "peft<0.11.0"

And manual reinstallation to "peft==0.10.0"

Did not help. P.S. Yesterday everything was working fine. Some dependencies.

kirilgorbachov avatar May 16 '24 22:05 kirilgorbachov

When run for the first time, tries to re-install llama.cpp Screenshot 2024-05-17 at 1 44 39

kirilgorbachov avatar May 16 '24 22:05 kirilgorbachov

+1 Didn't resolve the issue. I still get the error TypeError: a bytes-like object is required, not 'str' in Colab notebook while running save_pretrained_gguf

gaurav-nelson avatar May 17 '24 02:05 gaurav-nelson

+1 Didn't resolve the issue. I still get the error TypeError: a bytes-like object is required, not 'str' in Colab notebook while running save_pretrained_gguf

the same as you

Jiar avatar May 17 '24 03:05 Jiar

@kirilgorbachov @Jiar @gaurav-nelson So so sorry it was my dumb mistake!! I accidentally did a typo!!

If you're still on Colab, please uninstall unsloth or edit the top cell to

# %%capture
# Installs Unsloth, Xformers (Flash Attention) and all other packages!
!pip uninstall unsloth -y
!pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
!pip install --no-deps "xformers<0.0.26" trl "peft<0.11.0" accelerate bitsandbytes

then restart and run all

Sorry again!

danielhanchen avatar May 17 '24 04:05 danielhanchen

@danielhanche, It's working now! Thanks 🙏

eugeniosegala avatar May 17 '24 07:05 eugeniosegala

Thank you @danielhanchen 🥇 It is working now.

gaurav-nelson avatar May 17 '24 08:05 gaurav-nelson

@danielhanchen I do not actually see your spelling mistake, but it defiantly fixed now and function properly.

I tried to debug it a bit yesterday, seems unsloth installs llama.cpp via git clone ... master of their repo. I actually believe that they had some issue for a while, and now it's resolved. Maybe versioning / release tagging would be a good idea.

@danielhanchen Thanks for your time anyway!

kirilgorbachov avatar May 17 '24 09:05 kirilgorbachov

As an update, the super speedy HF team have isolated the issue and have swiftly found a fix :) Hats off to them for their fabulous speed! https://github.com/huggingface/peft/pull/1739

danielhanchen avatar May 17 '24 10:05 danielhanchen