-
Notifications
You must be signed in to change notification settings - Fork 14
Add User Friendly Quantize Type #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ecyht2
wants to merge
2
commits into
mmwillet:main
Choose a base branch
from
ecyht2:feat/user-friendly-quantized-type
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
danielzgtg
requested changes
Jul 22, 2025
danielzgtg
reviewed
Jul 22, 2025
Functionality LGTM. UX see above. The output is a valid gguf for all 4 types. md5sum matches mmwillet2@huggingface for most files. The differences with Dia DAC_F16 and of Kokoro voices being fewer predate this PR. Updated testing script#!/bin/bash
set -e
# If necessary:
# sudo mount -o remount,size=5G "$XDG_RUNTIME_DIR"
# ln -s ~/CLionProjects/llama.cpp/gguf-py/venv gguf_py_venv
[ $# -eq 1 ] || { echo 'Usage: ./quantize_test.sh /path/to/bin/quantize'; exit 1; }
quantize="$1"
[ -x "$quantize" ] || { echo 'Bad binary or path'; exit 1; }
if [ -d gguf_py_venv ]; then
. gguf_py_venv/bin/activate
dumper=gguf-dump
fi
declare -a extra_args
function q {
model_dir="$(dirname "$model")"
log="$(
set -x
"$quantize" -mp "$model" -qt "$1" -qp "$XDG_RUNTIME_DIR"/test.gguf "${extra_args[@]}" 2>&1
)" || echo -n "$log"
md5sum "$XDG_RUNTIME_DIR"/test.gguf
[ -n "$dumper" ] && "$dumper" "$XDG_RUNTIME_DIR"/test.gguf > "$XDG_RUNTIME_DIR"/test.gguf.2.txt 2>/dev/null
unlink "$XDG_RUNTIME_DIR"/test.gguf
md5sum "$model_dir"/"$2"
if [ -n "$dumper" ]; then
"$dumper" "$model_dir"/"$2" > "$XDG_RUNTIME_DIR"/test.gguf.1.txt 2>/dev/null
diff -U3 "$XDG_RUNTIME_DIR"/test.gguf.{1,2}.txt || :
rm "$XDG_RUNTIME_DIR"/test.gguf.{1,2}.txt
fi
}
model=Dia_GGUF/Dia.gguf
extra_args=(-nt 3)
q FP16 Dia_F16.gguf
q Q4_0 Dia_Q4.gguf
q Q5_0 Dia_Q5.gguf
q Q8_0 Dia_Q8.gguf
extra_args=(-nt 3 -df)
q FP16 Dia_F16_DAC_F16.gguf
q Q4_0 Dia_Q4_DAC_F16.gguf
q Q5_0 Dia_Q5_DAC_F16.gguf
q Q8_0 Dia_Q8_DAC_F16.gguf
model=Kokoro_GGUF/Kokoro_espeak.gguf
extra_args=(-nt 3 -nqf)
q FP16 Kokoro_espeak_F16.gguf
q Q4_0 Kokoro_espeak_Q4.gguf
q Q5_0 Kokoro_espeak_Q5.gguf
q Q8_0 Kokoro_espeak_Q8.gguf
model=Kokoro_GGUF/Kokoro_no_espeak.gguf
q FP16 Kokoro_no_espeak_F16.gguf
q Q4_0 Kokoro_no_espeak_Q4.gguf
q Q5_0 Kokoro_no_espeak_Q5.gguf
q Q8_0 Kokoro_no_espeak_Q8.gguf
model=parler-tts-mini-v1-GGUF/parler-tts-mini-v1-fp32.gguf
extra_args=(-nt 3)
q FP16 parler-tts-mini-v1-fp16.gguf
q Q4_0 parler-tts-mini-v1-Q4_0.gguf
q Q5_0 parler-tts-mini-v1-Q5_0.gguf
q Q8_0 parler-tts-mini-v1-Q8_0.gguf Testing results
|
@danielzgtg Can you push the testing script. Maybe I can create a GitHub Action for the test. |
danielzgtg
approved these changes
Jul 22, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims to close #78. Maybe new quantization types can be supported as well, do let me know which ones I should add.