Skip to content

Commit

Permalink
Add scripts/convert_gguf.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
yuiseki committed Mar 29, 2024
1 parent 696ebd7 commit 2601681
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions scripts/convert_gguf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

MODEL_NAME=$1
echo $MODEL_NAME

git lfs install

export CUDA_VISIBLE_DEVICES=-1

REPO_URL=https://huggingface.co/yuiseki/$MODEL_NAME
echo $REPO_URL

status_code=$(curl --write-out %{http_code} --silent --output /dev/null $REPO_URL)

if [[ "$status_code" -ne 200 ]] ; then
echo "!!! Model: ${MODEL_NAME} NOT FOUUND !!!"
exit 1
fi

[email protected]:yuiseki/$MODEL_NAME.git


git clone $REPO_PATH
python3 ~/llama.cpp/convert.py $MODEL_NAME
~/llama.cpp/quantize $MODEL_NAME/ggml-model-f16.gguf $MODEL_NAME/$MODEL_NAME-Q4_K_M.gguf Q4_K_M

0 comments on commit 2601681

Please sign in to comment.