Views
No views yet
ik_llama.cpp imatrix Quantizations of deepseek-ai/DeepSeek-V3.2-Specialeik_llama.cpp can also run your existing GGUFs from bartowski, unsloth, mradermacher, etc if you want to try it out before downloading my quants.
Q8_0 664.295 GiB (8.504 BPW)
1#!/usr/bin/env bash
2
3custom="
4## Attention [0-60] (GPU)
5# attn_kv_b is only used for PP so keep it q8_0 for best speed and accuracy
6blk\..*\.attn_kv_b\.weight=q8_0
7
8# ideally k_b and v_b are smaller than q8_0 as they are is used for TG with -mla 3
9# https://github.com/ikawrakow/ik_llama.cpp/issues/651
10# blk.*.attn_k_b.weight is not divisible by 256 so only supports iq4_nl or legacy qN_0
11blk\..*\.attn_k_b\.weight=q8_0
12blk\..*\.attn_v_b\.weight=q8_0
13
14# Balance of attn tensors
15blk\..*\.attn_kv_a_mqa\.weight=q8_0
16blk\..*\.attn_q_a\.weight=q8_0
17blk\..*\.attn_q_b\.weight=q8_0
18blk\..*\.attn_output\.weight=q8_0
19
20## First Three Dense Layers [0-2] (GPU)
21blk\..*\.ffn_down\.weight=q8_0
22blk\..*\.ffn_(gate|up)\.weight=q8_0
23
24## Shared Expert (1-60) (GPU)
25blk\..*\.ffn_down_shexp\.weight=q8_0
26blk\..*\.ffn_(gate|up)_shexp\.weight=q8_0
27
28## Routed Experts (1-60) (CPU)
29blk\..*\.ffn_down_exps\.weight=iq6_k
30blk\..*\.ffn_(gate|up)_exps\.weight=iq5_k
31
32## Token embedding and output tensors (GPU)
33token_embd\.weight=q8_0
34output\.weight=q8_0
35"
36
37custom=$(
38 echo "$custom" | grep -v '^#' | \
39 sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
40)
41
42numactl -N ${SOCKET} -m ${SOCKET} \
43./build/bin/llama-quantize \
44 --custom-q "$custom" \
45 --imatrix /mnt/data/models/ubergarm/DeepSeek-V3.2-Speciale-GGUF/imatrix-DeepSeek-V3.2-Speciale-Q8_0.dat \
46 /mnt/data/models/ubergarm/DeepSeek-V3.2-Speciale-GGUF/DeepSeek-V3.2-Speciale-256x20B-safetensors-BF16-00001-of-00030.gguf \
47 /mnt/data/models/ubergarm/DeepSeek-V3.2-Speciale-GGUF/DeepSeek-V3.2-Speciale-IQ5_K.gguf \
48 IQ5_K \
49 1281#!/usr/bin/env bash
2
3custom="
4## Attention [0-60] (GPU)
5blk\..*\.attn_k_b\.weight=q8_0
6blk\..*\.attn_v_b\.weight=q8_0
7
8# Balance of attn tensors
9blk\..*\.attn_kv_a_mqa\.weight=q8_0
10blk\..*\.attn_q_a\.weight=q8_0
11blk\..*\.attn_q_b\.weight=q8_0
12blk\..*\.attn_output\.weight=iq6_k
13
14## First Three Dense Layers [0-2] (GPU)
15blk\.0\.ffn_down\.weight=q8_0
16blk\.0\.ffn_(gate|up)\.weight=q8_0
17blk\..*\.ffn_down\.weight=q8_0
18blk\..*\.ffn_(gate|up)\.weight=iq6_k
19
20## Shared Expert [3-60] (GPU)
21blk\..*\.ffn_down_shexp\.weight=q8_0
22blk\..*\.ffn_(gate|up)_shexp\.weight=iq6_k
23
24## Routed Experts [3-60] (CPU)
25blk\..*\.ffn_down_exps\.weight=iq4_kss
26blk\..*\.ffn_(gate|up)_exps\.weight=iq3_k
27
28## Token embedding and output tensors (GPU)
29token_embd\.weight=iq4_k
30output\.weight=iq6_k
31"
32
33custom=$(
34 echo "$custom" | grep -v '^#' | \
35 sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
36)
37
38numactl -N ${SOCKET} -m ${SOCKET} \
39./build/bin/llama-quantize \
40 --custom-q "$custom" \
41 --imatrix /mnt/data/models/ubergarm/DeepSeek-V3.2-Speciale-GGUF/imatrix-DeepSeek-V3.2-Speciale-Q8_0.dat \
42 /mnt/data/models/ubergarm/DeepSeek-V3.2-Speciale-GGUF/DeepSeek-V3.2-Speciale-256x20B-safetensors-BF16-00001-of-00030.gguf \
43 /mnt/data/models/ubergarm/DeepSeek-V3.2-Speciale-GGUF/DeepSeek-V3.2-Speciale-IQ3_K.gguf \
44 IQ3_K \
45 1281#!/usr/bin/env bash
2
3custom="
4## Attention [0-60] (GPU)
5blk\..*\.attn_k_b\.weight=q8_0
6blk\..*\.attn_v_b\.weight=q8_0
7
8# Balance of attn tensors
9blk\..*\.attn_kv_a_mqa\.weight=q8_0
10blk\..*\.attn_q_a\.weight=iq6_k
11blk\..*\.attn_q_b\.weight=iq6_k
12blk\..*\.attn_output\.weight=iq6_k
13
14## First Three Dense Layers [0-2] (GPU)
15blk\..*\.ffn_down\.weight=iq5_ks
16blk\..*\.ffn_(gate|up)\.weight=iq4_kss
17
18## Shared Expert [3-60] (GPU)
19blk\..*\.ffn_down_shexp\.weight=iq5_ks
20blk\..*\.ffn_(gate|up)_shexp\.weight=iq4_kss
21
22## Routed Experts [3-60] (CPU)
23blk\..*\.ffn_down_exps\.weight=iq2_ks
24blk\..*\.ffn_(gate|up)_exps\.weight=iq2_ks
25
26## Token embedding and output tensors (GPU)
27token_embd\.weight=iq4_k
28output\.weight=iq6_k
29"
30
31custom=$(
32 echo "$custom" | grep -v '^#' | \
33 sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
34)
35
36numactl -N ${SOCKET} -m ${SOCKET} \
37./build/bin/llama-quantize \
38 --custom-q "$custom" \
39 --imatrix /mnt/data/models/ubergarm/DeepSeek-V3.2-Speciale-GGUF/imatrix-DeepSeek-V3.2-Speciale-Q8_0.dat \
40 /mnt/data/models/ubergarm/DeepSeek-V3.2-Speciale-GGUF/DeepSeek-V3.2-Speciale-256x20B-safetensors-BF16-00001-of-00030.gguf \
41 /mnt/data/models/ubergarm/DeepSeek-V3.2-Speciale-GGUF/DeepSeek-V3.2-Speciale-smol-IQ2_KS.gguf \
42 IQ2_KS \
43 1281#!/usr/bin/env bash
2
3custom="
4## Attention [0-60] (GPU)
5blk\..*\.attn_k_b\.weight=q6_0
6blk\..*\.attn_v_b\.weight=iq6_k
7
8# Balance of attn tensors
9blk\..*\.attn_kv_a_mqa\.weight=iq6_k
10blk\..*\.attn_q_a\.weight=iq6_k
11blk\..*\.attn_q_b\.weight=iq6_k
12blk\..*\.attn_output\.weight=iq6_k
13
14## First Three Dense Layers [0-2] (GPU)
15blk\..*\.ffn_down\.weight=iq5_ks
16blk\..*\.ffn_(gate|up)\.weight=iq4_kss
17
18## Shared Expert [3-60] (GPU)
19blk\..*\.ffn_down_shexp\.weight=iq5_ks
20blk\..*\.ffn_(gate|up)_shexp\.weight=iq4_kss
21
22## Routed Experts [3-60] (CPU)
23blk\..*\.ffn_down_exps\.weight=iq1_kt
24blk\..*\.ffn_(gate|up)_exps\.weight=iq1_kt
25
26## Token embedding and output tensors (GPU)
27token_embd\.weight=iq4_k
28output\.weight=iq6_k
29"
30
31custom=$(
32 echo "$custom" | grep -v '^#' | \
33 sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
34)
35
36numactl -N ${SOCKET} -m ${SOCKET} \
37./build/bin/llama-quantize \
38 --custom-q "$custom" \
39 --imatrix /mnt/data/models/ubergarm/DeepSeek-V3.2-Speciale-GGUF/imatrix-DeepSeek-V3.2-Speciale-Q8_0.dat \
40 /mnt/data/models/ubergarm/DeepSeek-V3.2-Speciale-GGUF/DeepSeek-V3.2-Speciale-256x20B-safetensors-BF16-00001-of-00030.gguf \
41 /mnt/data/models/ubergarm/DeepSeek-V3.2-Speciale-GGUF/DeepSeek-V3.2-Speciale-smol-IQ1_KT.gguf \
42 IQ1_KT \
43 128Please note that the DeepSeek-V3.2-Speciale variant is designed exclusively for deep reasoning tasks and does not support the tool-calling functionality. https://huggingface.co/deepseek-ai/DeepSeek-V3.2-Speciale#how-to-run-locally
Exp November release version which seems to work okay thanks to: sszymczyk1# Clone and checkout
2$ git clone https://github.com/ikawrakow/ik_llama.cpp
3$ cd ik_llama.cpp
4
5# Build for hybrid CPU+CUDA
6$ cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON
7$ cmake --build build --config Release -j $(nproc)
8
9# Run Hybrid CPU + 2x CUDA GPUs (48GB VRAM each older RTX A6000 non-PROs)
10## no -sm graph for DeepSeek yet. Is there an easy way to disable thinking or need to prefill response?
11## might be better way to do this with --n-cpu-moe 46 -ts 48,48 etc...
12./build/bin/llama-server \
13 --model "$model" \
14 --alias ubergarm/DeepSeek-V3.2-Speciale-GGUF \
15 --ctx-size 32768 \
16 -ctk q8_0 \
17 -ger \
18 --merge-qkv \
19 -mla 3 -amb 1024 \
20 -ot "blk\.(3|4|5|6|7|8|9|10)\.ffn_(gate|up|down)_exps.*=CUDA0" \
21 -ot "blk\.(52|53|54|55|56|57|58|59|60)\.ffn_(gate|up|down)_exps.*=CUDA1" \
22 --cpu-moe \
23 -ub 4096 -b 4096 \
24 --threads 24 \
25 --host 127.0.0.1 \
26 --port 8080 \
27 --no-mmap \
28 --jinja
29
30# CPU Only
31numactl -N ${SOCKET} -m ${SOCKET} \
32./build/bin/llama-server \
33 --model "$model"\
34 --alias ubergarm/DeepSeek-V3.2-Speciale-GGUF \
35 --merge-qkv \
36 --ctx-size 131072 \
37 -ctk q8_0 \
38 -mla 3 \
39 --parallel 1 \
40 --threads 96 \
41 --threads-batch 128 \
42 --numa numactl \
43 --host 127.0.0.1 \
44 --port 8080 \
45 --no-mmap \
46 --jinja
47
48 # --validate-quants--chat-template-file myTemplate.jinja and might need --special etc.