AMAImedia
/

AMAImedia commited on
Commit
527ef83
·
verified ·
1 Parent(s): 63232a6

Copy files from models/Accio-Lab/occamy-1.0-GGUF

Browse files
Files changed (1) hide show
  1. GGUF/reproduce.sh +15 -0
GGUF/reproduce.sh ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ # Arguments: pinned HF snapshot, pinned llama.cpp checkout/build, new output dir.
4
+ source_model=${1:?Pass the source HF snapshot directory}
5
+ llama_repo=${2:?Pass the llama.cpp checkout directory}
6
+ output_dir=${3:?Pass a new output directory}
7
+ test "$(git -C "$llama_repo" rev-parse HEAD)" = d1d3c3396aa13a5f239109a822666c4870490ad5
8
+ test ! -e "$output_dir"
9
+ mkdir -p "$output_dir/work"
10
+ python "$llama_repo/convert_hf_to_gguf.py" "$source_model" --outtype bf16 --no-mtp --outfile "$output_dir/work/bf16.gguf"
11
+ python "$llama_repo/convert_hf_to_gguf.py" "$source_model" --outtype q8_0 --no-mtp --outfile "$output_dir/work/q8.gguf"
12
+ "$llama_repo/build/bin/llama-quantize" "$output_dir/work/bf16.gguf" "$output_dir/work/q4.gguf" Q4_K_M 12
13
+ python "$llama_repo/gguf-py/gguf/scripts/gguf_new_metadata.py" "$output_dir/work/q8.gguf" "$output_dir/occamy-1.0-Q8_0.gguf" --pre-tokenizer qwen2 --force
14
+ python "$llama_repo/gguf-py/gguf/scripts/gguf_new_metadata.py" "$output_dir/work/q4.gguf" "$output_dir/occamy-1.0-Q4_K_M.gguf" --pre-tokenizer qwen2 --force
15
+ python "$llama_repo/convert_hf_to_gguf.py" "$source_model" --outtype f16 --mmproj --outfile "$output_dir/mmproj-occamy-1.0-F16.gguf"