robertalanm / alpaca-weight

Train llama with lora on one 4090 and merge weight of lora to work as stanford alpaca.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

alpaca

Convert llama to alpaca

git clone https://huggingface.co/decapoda-research/llama-7b-hf
git clone https://github.com/clcarwin/alpaca-weight
cd alpaca-weight

# Download alpaca-lora-7b-r4a16.zip from release page and unzip it
python merge_step1_lora2patch.py
python merge_step2_patch2alpaca.py

# copy token config file to alpaca-7b-hf
# ALL DONE

It can run and train on one 4090 24GB GPU

TEST

# change "Tell me about alpacas." to any other instruction.
python generate_alpaca.py

Acknowledgements

This code is based on stanford_alpaca and alpaca-lora

Thanks to Meta AI for releasing LLaMa, a powerful LLM.

About

Train llama with lora on one 4090 and merge weight of lora to work as stanford alpaca.

License:MIT License


Languages

Language:Python 100.0%