scripts : helper convert script

This commit is contained in:
Georgi Gerganov 2023-08-27 15:24:40 +03:00
parent a6d1189fdd
commit 25423e9185
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
4 changed files with 32 additions and 0 deletions

26
scripts/convert-gg.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
set -e
# LLaMA v1
python3 convert.py ../llama1/7B --outfile models/llama-7b/ggml-model-f16.gguf --outtype f16
python3 convert.py ../llama1/13B --outfile models/llama-13b/ggml-model-f16.gguf --outtype f16
python3 convert.py ../llama1/30B --outfile models/llama-30b/ggml-model-f16.gguf --outtype f16
python3 convert.py ../llama1/65B --outfile models/llama-65b/ggml-model-f16.gguf --outtype f16
# LLaMA v2
python3 convert.py ../llama2/llama-2-7b --outfile models/llama-7b-v2/ggml-model-f16.gguf --outtype f16
python3 convert.py ../llama2/llama-2-13b --outfile models/llama-13b-v2/ggml-model-f16.gguf --outtype f16
python3 convert.py ../llama2/llama-2-70b --outfile models/llama-70b-v2/ggml-model-f16.gguf --outtype f16
# Code Llama
python3 convert.py ../codellama/CodeLlama-7b/ --outfile models/codellama-7b/ggml-model-f16.gguf --outtype f16
python3 convert.py ../codellama/CodeLlama-13b/ --outfile models/codellama-13b/ggml-model-f16.gguf --outtype f16
python3 convert.py ../codellama/CodeLlama-34b/ --outfile models/codellama-34b/ggml-model-f16.gguf --outtype f16
# Falcon
python3 convert-falcon-hf-to-gguf.py ../falcon/falcon-7b 1
mv -v ../falcon/falcon-7b/ggml-model-f16.gguf models/falcon-7b/ggml-model-f16.gguf
python3 convert-falcon-hf-to-gguf.py ../falcon/falcon-40b 1
mv -v ../falcon/falcon-40b/ggml-model-f16.gguf models/falcon-40b/ggml-model-f16.gguf

View File

@ -20,6 +20,8 @@ fi
model="$1" model="$1"
out="../tmp/results-${model}" out="../tmp/results-${model}"
set -e
mkdir -p ${out} mkdir -p ${out}
for q in ${qnt[@]}; do for q in ${qnt[@]}; do

View File

@ -20,6 +20,8 @@ fi
model="$1" model="$1"
out="../tmp/results-${model}" out="../tmp/results-${model}"
set -e
mkdir -p ${out} mkdir -p ${out}
mstr="" mstr=""

View File

@ -17,6 +17,8 @@ if [ ! -z "$3" ]; then
args="$3" args="$3"
fi fi
set -e
model="$1" model="$1"
out="../tmp/results-${model}" out="../tmp/results-${model}"