File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ # Step 1: Clone the Hugging Face repository if the directory does not exist
5+ if [ ! -d " reduce-llms-for-testing" ]; then
6+ echo " Cloning the Hugging Face repository..."
7+ git clone https://huggingface.co/ltoniazzi/reduce-llms-for-testing
8+ else
9+ echo " Repository already exists. Skipping clone."
10+ fi
11+
12+
13+ run_llama_cli () {
14+ local model_name=$1
15+ local size=$2
16+ local model_size=$3
17+
18+ echo " Running convert_hf_to_gguf.py for $model_name with size $size ..."
19+ python convert_hf_to_gguf.py reduce-llms-for-testing/$model_name /size=$size /base --outtype f32
20+
21+ echo " Running convert_lora_to_gguf.py for $model_name with size $size ..."
22+ python3 convert_lora_to_gguf.py reduce-llms-for-testing/$model_name /size=$size /lora --base reduce-llms-for-testing/$model_name /size=$size /base --outtype f32
23+
24+ echo " Running llama-cli without lora for $model_name with size $size and model size $model_size ..."
25+ llama-cli -m reduce-llms-for-testing/$model_name /size=$size /base/Base-$model_size -F32.gguf -p " <bos>When forty winters shall besiege" -n 50
26+
27+ echo " Running llama-cli with lora for $model_name with size $size and model size $model_size ..."
28+ llama-cli -m reduce-llms-for-testing/$model_name /size=$size /base/Base-$model_size -F32.gguf --lora reduce-llms-for-testing/$model_name /size=$size /lora/Lora-F32-LoRA.gguf -p " <bos>I see a " -n 50
29+
30+ echo " All steps completed for $model_name with size $size and model size $model_size !"
31+ }
32+
33+ # Example usage:
34+ run_llama_cli " Gemma2ForCausalLM" " 64" " 19M"
35+
You can’t perform that action at this time.
0 commit comments