From 3410c9cad034cbe56547950d66f40debce1b7bf4 Mon Sep 17 00:00:00 2001 From: wassname Date: Sat, 22 Apr 2023 07:50:21 +0000 Subject: [PATCH] tidy --- README.md | 2 +- {models => data}/.gitkeep | 0 mjc_notes.md | 10 +++++----- requirements.txt => requirements/requirements.txt | 3 ++- scripts/download-model.py | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) rename {models => data}/.gitkeep (100%) rename requirements.txt => requirements/requirements.txt (56%) diff --git a/README.md b/README.md index d059f6d..60e0b15 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/models/.gitkeep b/data/.gitkeep similarity index 100% rename from models/.gitkeep rename to data/.gitkeep diff --git a/mjc_notes.md b/mjc_notes.md index 5565460..8696151 100644 --- a/mjc_notes.md +++ b/mjc_notes.md @@ -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... ``` diff --git a/requirements.txt b/requirements/requirements.txt similarity index 56% rename from requirements.txt rename to requirements/requirements.txt index 66c6c13..f7b3587 100644 --- a/requirements.txt +++ b/requirements/requirements.txt @@ -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 diff --git a/scripts/download-model.py b/scripts/download-model.py index b2992d7..639d493 100644 --- a/scripts/download-model.py +++ b/scripts/download-model.py @@ -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':