How to convert the Llama-3.1 & 3.2 models into gguf compatible format? #9915
Unanswered
ShaileshSardaTTL
asked this question in
Q&A
Replies: 2 comments
-
Have you tried using the one's that are already on huggingface? https://huggingface.co/QuantFactory/Llama-3.2-3B-Instruct-GGUF |
Beta Was this translation helpful? Give feedback.
0 replies
-
One way is downloading the model from official HuggingFace repository, and using the I've made a simple bash function for easier usage of function llama-quantize-raw-model() {
local base_model_dir=$1
local output_quantization=${2:-auto}
local output_gguf_dir=${3:-.}
# base_model_dir should point to a repository, so dir's name should be model's name
local model_name=$(basename $base_model_dir)
if [ ! -d "$base_model_dir" ]; then
echo "Error: Model directory '$base_model_dir' does not exist."
return 1
fi
# Run the conversion command
python $LLAMA_CPP_PATH/convert_hf_to_gguf.py --outtype $output_quantization --outfile $output_gguf_dir/$model_name.$output_quantization.gguf $base_model_dir
# Check if the conversion was successful
if [ $? -eq 0 ]; then
echo "Model '$model_name' successfully quantized to $output_quantization format and saved as $output_gguf_dir/$model_name.$output_quantization.gguf"
else
echo "Error: Failed to quantize model '$base_model_dir'."
fi
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Any Idea?
Beta Was this translation helpful? Give feedback.
All reactions