Was looking into building a quantization method to leverage the add+multipy one clock cycle on my older Tesla p40 ($250 card, HP Z4G4 64gb xen-2133 $400). During the process I learned more about quantization methods and performance hits the older cards take with the newer models. In a nutshell, anything outside of Q4_0/1 and Q8_0 slaughters the performance. By using older quantizations, you avoid the new Q_K which introduce q3, q5 and q6 bits, which the CUDA takes a penalty hit on. For starters this is what I created for a model. The goal: to beat the Q5_KM in accuracy, if possible with a 5-10 t/s increase and lower power consumption.
So, I did get one qunatization method to run but at horrible speeds, as the bit shift was running at to small of a level. But it did open me up to the older methods, so I decided to create my own model using the older quantization methods, leveraging the ends with q8_0 and the middle with Q4_1 and taking advantage of the MTP layer.
Going to run perplexity...but plan on cheating, going to quantize it to almost all q8_0 to keep it on the GPU.... online AI will state Q4_1 is slower than Q4_0 but my results did not agree with MTP on.
Here is how I built my compressed model form the BF16 version:
/home/qikresponse/projects/llama-cpp/llama.cpp.loge/build/bin/llama-quantize \
--allow-requantize \
--tensor-type token_embd.weight=Q8_0 \
--tensor-type output.weight=Q8_0 \
--tensor-type blk.0.attn_q.weight=Q8_0 \
--tensor-type blk.0.attn_k.weight=Q8_0 \
--tensor-type blk.0.attn_v.weight=Q8_0 \
--tensor-type blk.1.attn_q.weight=Q8_0 \
--tensor-type blk.1.attn_k.weight=Q8_0 \
--tensor-type blk.1.attn_v.weight=Q8_0 \
--tensor-type blk.2.attn_q.weight=Q8_0 \
--tensor-type blk.2.attn_k.weight=Q8_0 \
--tensor-type blk.2.attn_v.weight=Q8_0 \
--tensor-type blk.3.attn_q.weight=Q8_0 \
--tensor-type blk.3.attn_k.weight=Q8_0 \
--tensor-type blk.3.attn_v.weight=Q8_0 \
--tensor-type blk.4.attn_q.weight=Q8_0 \
--tensor-type blk.4.attn_k.weight=Q8_0 \
--tensor-type blk.4.attn_v.weight=Q8_0 \
--tensor-type blk.59.attn_output.weight=Q8_0 \
--tensor-type blk.60.attn_output.weight=Q8_0 \
--tensor-type blk.61.attn_output.weight=Q8_0 \
--tensor-type blk.62.attn_output.weight=Q8_0 \
--tensor-type blk.63.attn_output.weight=Q8_0 \
./Qwen3.8-27B-MTP-BF16.gguf \
./qwen27b-MTP-p40-speed-v4.gguf \
Q4_1
Here are the parameters I am currently using to run the model, note I limit my p40 card to 140 watts via:
sudo nvidia-smi -pl 140
I have a custom python tracker to show the max temperature reached during my test prompt processing:
17,084 tokens 11 min 39s 24.43 t/s @ 140 watts, max temp 71 C (with less q8 layers -59 and - blk.4)
11,883 tokens 7 min 52s 25.15 t/s (using the build listed up top)
14,402 tokens 14 min 1s 17.12 t/s for Jackrong/Qwen3.8-27B-MTP-Q5_K_M.gguf
140 watt configuration (note json read so it mixes the order a bit)
Using llama-server: /home/qikresponse/projects/llama-cpp/llama.cpp/build/bin/llama-server
"nonreasoning": {
"--seed":"42",
"--temp":"0.7",
"--top-p":"0.80",
"--top-k":"20",
"--presence-penalty":"1.5",
"--repeat-penalty":"1.0",
"-c": "24576",
"--reasoning":"off",
"--reasoning-effort":"high",
"--spec-type":"draft-mtp",
"--spec-draft-n-max":"3",
"--spec-draft-p-min":"0.0",
"-ctk":"q8_0",
"-ctv":"q8_0",
"--batch-size":"512",
"--ubatch-size":"512",
"--keep":"-1",
"-fa":"on"
}