This commit is contained in:
wassname
2023-04-22 07:50:21 +00:00
parent d149f12704
commit 3410c9cad0
5 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ python scripts/download-model.py tloen/alpaca-lora-7b
python scripts/download-model.py tloen/alpaca-lora-7b
python scripts/download-model.py decapoda-research/llama-7b-hf
# convert
python scripts/export_hf_checkpoint.py ./models/llama-7b-hf -l loras/tloen_alpaca-lora-7b
python scripts/export_hf_checkpoint.py ./data/models/llama-7b-hf -l ./data/loras/tloen_alpaca-lora-7b
# test
python scripts/test_01_delora.py models/tloen_alpaca-lora-7b-delorified
```
View File
+5 -5
View File
@@ -55,10 +55,10 @@ python scripts/download-model.py tloen/alpaca-lora-7b
python scripts/download-model.py decapoda-research/llama-7b-hf
# convert
python scripts/01_export_hf_checkpoint.py ./models/decapoda-research_llama-7b-hf -l loras/tloen_alpaca-lora-7b
python scripts/01_export_hf_checkpoint.py ./models/decapoda-research_llama-13b-hf -l loras/chansung_alpaca-lora-13b # crash! 50GB+ needed
python scripts/01_export_hf_checkpoint.py ./models/decapoda-research_llama-30b-hf -l loras/chansung_alpaca-lora-30b
python scripts/01_export_hf_checkpoint.py ./models/decapoda-research_llama-60b-hf -l loras/chansung_alpaca-lora-60b
python scripts/01_export_hf_checkpoint.py ./data/models/decapoda-research_llama-7b-hf -l ./data/loras/tloen_alpaca-lora-7b
python scripts/01_export_hf_checkpoint.py ./data/models/decapoda-research_llama-13b-hf -l ./data/loras/chansung_alpaca-lora-13b # crash! 50GB+ needed
python scripts/01_export_hf_checkpoint.py ./data/models/decapoda-research_llama-30b-hf -l ./data/loras/chansung_alpaca-lora-30b
python scripts/01_export_hf_checkpoint.py ./data/models/decapoda-research_llama-60b-hf -l ./data/loras/chansung_alpaca-lora-60b
# test
python scripts/test_01_delora.py models/tloen_alpaca-lora-7b-delorified
@@ -66,7 +66,7 @@ python scripts/test_01_delora.py models/chansung_alpaca-lora-13b-delorified
# now compare what was generated during conversion `test_prompts.txt`, to the loaded version
# 4bit...
CUDA_VISIBLE_DEVICES=0 python llama.py ./models/tloen_alpaca-lora-7b-delorified c4 --wbits 4 --true-sequential --act-order --groupsize 128 --save_safetensors ./models/tloen_alpaca-lora-7b-delorified/llama7b-4bit-128g.safetensors
CUDA_VISIBLE_DEVICES=0 python llama.py ./data/models/tloen_alpaca-lora-7b-delorified c4 --wbits 4 --true-sequential --act-order --groupsize 128 --save_safetensors ./data/models/tloen_alpaca-lora-7b-delorified/llama7b-4bit-128g.safetensors
# ggml conversion...
```
@@ -1,4 +1,4 @@
# torch
# torch, I prefer to install from conda
accelerate
bitsandbytes
datasets
@@ -6,6 +6,7 @@ sentencepiece
safetensors
triton
colorama
# to get 4bit working you need some specific versions, see https://github.com/johnsmith0031/alpaca_lora_4bit/blob/main/requirements.txt
git+https://github.com/huggingface/transformers.git@656e869
# git+https://github.com/sterlind/GPTQ-for-LLaMa.git@lora_4bit
git+https://github.com/wassname/peft.git
+1 -1
View File
@@ -164,7 +164,7 @@ def get_download_links_from_huggingface(model, branch, text_only=False):
def get_output_folder(model, branch, is_lora, base_folder=None):
if base_folder is None:
base_folder = 'models' if not is_lora else 'loras'
base_folder = 'data/models' if not is_lora else 'data/loras'
output_folder = f"{'_'.join(model.split('/')[-2:])}"
if branch != 'main':