Views
No views yet
ik_llama.cpp imatrix Quantizations of Qwen/Qwen3.5-35B-A3Bik_llama.cpp can also run your existing GGUFs from bartowski, unsloth, mradermacher, etc if you want to try it out before downloading my quants. Only a couple quants in this collection are compatible with mainline llamma.cpp/LMStudio/KoboldCPP/etc as mentioned in the specific description, all others require ik_llama.cpp.
BF16 64.602 GiB (16.010 BPW)
Q8_0 34.358 GiB (8.515 BPW)
1#!/usr/bin/env bash
2
3custom="
4# 60 Repeating Layers [0-59]
5
6## Gated Attention/Delta Net [Blended 0-59]
7blk\..*\.attn_gate\.weight=q8_0
8blk\..*\.attn_qkv\.weight=q8_0
9blk\..*\.attn_output\.weight=q8_0
10blk\..*\.attn_q\.weight=q8_0
11blk\..*\.attn_k\.weight=q8_0
12blk\..*\.attn_v\.weight=q8_0
13blk\..*\.ssm_alpha\.weight=f32
14blk\..*\.ssm_beta\.weight=f32
15blk\..*\.ssm_out\.weight=q8_0
16
17# Shared Expert Layers [0-59]
18blk\..*\.ffn_down_shexp\.weight=q8_0
19blk\..*\.ffn_(gate|up)_shexp\.weight=q8_0
20
21# Routed Experts Layers [0-59]
22blk\..*\.ffn_down_exps\.weight=iq5_ks
23blk\..*\.ffn_(gate|up)_exps\.weight=iq4_ks
24
25# Non-Repeating Layers
26token_embd\.weight=q8_0
27output\.weight=q8_0
28"
29
30custom=$(
31 echo "$custom" | grep -v '^#' | \
32 sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
33)
34
35 #--dry-run \
36numactl -N ${SOCKET} -m ${SOCKET} \
37./build/bin/llama-quantize \
38 --custom-q "$custom" \
39 --imatrix /mnt/data/models/ubergarm/Qwen3.5-35B-A3B-GGUF/imatrix-Qwen3.5-35B-A3B-BF16.dat \
40 /mnt/data/models/ubergarm/Qwen3.5-35B-A3B-GGUF/Qwen3.5-35B-A3B-BF16-00001-of-00002.gguf \
41 /mnt/data/models/ubergarm/Qwen3.5-35B-A3B-GGUF/Qwen3.5-35B-A3B-IQ4_KS.gguf \
42 IQ4_KS \
43 1281#!/usr/bin/env bash
2
3custom="
4# 60 Repeating Layers [0-59]
5
6## Gated Attention/Delta Net [Blended 0-59]
7blk\..*\.attn_gate\.weight=q8_0
8blk\..*\.attn_qkv\.weight=q8_0
9blk\..*\.attn_output\.weight=q8_0
10blk\..*\.attn_q\.weight=q8_0
11blk\..*\.attn_k\.weight=q8_0
12blk\..*\.attn_v\.weight=q8_0
13blk\..*\.ssm_alpha\.weight=q8_0
14blk\..*\.ssm_beta\.weight=q8_0
15blk\..*\.ssm_out\.weight=q8_0
16
17# Shared Expert Layers [0-59]
18blk\..*\.ffn_down_shexp\.weight=q8_0
19blk\..*\.ffn_(gate|up)_shexp\.weight=q8_0
20
21# Routed Experts Layers [0-59]
22blk\..*\.ffn_down_exps\.weight=q4_1
23blk\..*\.ffn_(gate|up)_exps\.weight=q4_0
24
25# Non-Repeating Layers
26token_embd\.weight=q4_1
27output\.weight=q8_0
28"
29
30custom=$(
31 echo "$custom" | grep -v '^#' | \
32 sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
33)
34
35 #--dry-run \
36numactl -N ${SOCKET} -m ${SOCKET} \
37./build/bin/llama-quantize \
38 --custom-q "$custom" \
39 --imatrix /mnt/data/models/ubergarm/Qwen3.5-35B-A3B-GGUF/imatrix-Qwen3.5-35B-A3B-BF16.dat \
40 /mnt/data/models/ubergarm/Qwen3.5-35B-A3B-GGUF/Qwen3.5-35B-A3B-BF16-00001-of-00002.gguf \
41 /mnt/data/models/ubergarm/Qwen3.5-35B-A3B-GGUF/Qwen3.5-35B-A3B-Q4_0.gguf \
42 Q4_0 \
43 1281# 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# Download Desired Quants
10$ pip install huggingface_hub
11$ hf download --local-dir ./ --include=*IQ4_KS.gguf ubergarm/Qwen3.5-35B-A3B-GGUF
12
13# Full GPU Offload
14# NOTE: https://github.com/ikawrakow/ik_llama.cpp/pull/1198
15./build/bin/llama-server \
16 --alias Qwen3.5-35B-A3B \
17 --model "$model" \
18 -c 131072 \
19 -ctk f16 -ctv q8_0 \
20 -fa on \
21 -cuda fa-offset=0 \
22 -ub 1024 -b 2048 \
23 --merge-qkv \
24 -muge \
25 -ngl 999 \
26 --no-mmap \
27 --parallel 1 \
28 --threads 1 \
29 --host 127.0.0.1 \
30 --port 8080 \
31 --jinja \
32 --ctx-checkpoints 8-sm graph.-khad -ctk q6_0 -ctv q6_0 for full 256k context in 24GB VRAM. Always keep the k-cache better quality than the v-cache if possible.-ub 512 -b 2048 for a little more VRAM space at the cost of PP.-ub 4096 -b 4096 for more PP, but need over 24GB VRAM due to buffer size.--mmproj "$mmproj"ssm_(alpha|beta) to f32