Instructions to use chainyo/alpaca-lora-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use chainyo/alpaca-lora-7b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("decapoda-research/llama-7b-hf") model = PeftModel.from_pretrained(base_model, "chainyo/alpaca-lora-7b") - Notebooks
- Google Colab
- Kaggle
How to run on CPU?
Hi!
I'm on Windows, when I tried to run it on GPU I got the error: "CUDA out of memory" (GPU memory = 18 GB).
I tried running on CPU doing:
device = "cpu"
input_ids = input_ids.to(device)
model = model.to(device)
Then I get the error: Exception has occurred: NotImplementedError
Cannot copy out of meta tensor; no data!
File "C:\generate_alpaca7B_cpu.py", line 54, in
model = model.to(device)
NotImplementedError: Cannot copy out of meta tensor; no data!
Any solution, please?
Are you using WSL2 on Windows?
I'm not using it, I'll try it, thanks!
Ok, I understand, Windows is not so great to experiment with bitsandbytes and GPU in general (outside gaming). But you should be able to run it on CPU without bitsandbytes if at least you have enough RAM.