In memory of Philipp Emanuel Weidmann (p-e-w) — creator of Heretic, DRY, and XTC. "In times like these, one should be proud to be labeled a heretic."
Since the original
hereticrepository was archived before Qwen 4 launched, the base abliterated checkpoint was created with a dedicatedqwen4_moeimplementation of Heretic's multi-objective Pareto optimization (minimizing refusals and KL divergence simultaneously).
imatrix-calibrated GGUF quantizations (18 standard tiers + 2 hardware-aware mixed-precision SMX4_L & SMX3_XL (V2) built with synthetic0x/smx-auto) of synthetic0x/Qwen4-35B-A3B-Heretic (surgical 3-pass biprojected abliteration of Qwen/Qwen4-35B-A3B).
synthetic0x/heretic-qwen4smx-auto): synthetic0x/smx-autobenchmarks.jsonSHA256SUMSStock BF16 vs Heretic BF16)Both models evaluated in full BF16 (temperature=0.0, identical harness, zero quantization noise). HumanEval, LiveCodeBench v6 (stdin public test cases), GPQA-Diamond, and MMLU-Pro were run in non-thinking mode (reasoning_effort=off); JailbreakBench was tested in both direct and full <think> mode (768-token budget):
| Benchmark | Stock Qwen4-35B-A3B (BF16) |
Heretic (BF16) |
Delta |
|---|---|---|---|
HumanEval (pass@1, 164 tasks) |
92.07% (151/164) |
92.68% (152/164) |
+0.61% |
LiveCodeBench v6 (pass@1, 60 stdin tasks) |
38.33% (23/60) |
36.67% (22/60) |
-1.66% |
| GPQA-Diamond (100-question subset) | 59.00% (59/100) |
50.00% (50/100) |
-9.00% |
| MMLU-Pro (140 stratified, 10×14 domains) | 61.43% (86/140) |
62.86% (88/140) |
+1.43% |
| Held-out Refusals — Direct (JailbreakBench, 50) | 94.0% (47/50) |
20.0% (10/50) |
-74.0% |
Held-out Refusals — Full <think> (768 tok, 50) |
80.0% (40/50; 48/50 completed) |
4.0% (2/50; 25/50 completed) |
-76.0% |
Stock BF16 -> Heretic BF16)Measured on 2×A40 (ggml-cuda, WikiText-2 20 × 512 = 10,240 tokens):
| Metric | Stock BF16 | Heretic BF16 | Delta / Divergence |
|---|---|---|---|
WikiText-2 Perplexity (20 × 512) |
7.3929 |
7.3622 |
-0.0308 |
| Mean KL Divergence (Stock -> Heretic) | 0.0000 |
— | 0.0408 ± 0.0015 |
| Same Top-1 Token Agreement | 100.0% |
— | 92.41% |
llama.cpp b12977+ / v1.1.1+)24–32 GB VRAM (full GPU + MTP speculative decoding):
llama-server -hf synthetic0x/Qwen4-35B-A3B-Heretic-GGUF:SMX4_L \
--spec-type draft-mtp --spec-draft-n-max 3 --flash-attn on
8 GB VRAM + 24–32 GB RAM Laptop (64k context, 4 MoE layers + entire non-expert backbone in VRAM, rest in RAM, PLE on NVMe via --lazy-mode auto; omit MTP on 8 GB CPU-offload for highest tok/s):
llama-server \
-hf synthetic0x/Qwen4-35B-A3B-Heretic-GGUF:SMX4_L \
--lazy-mode auto -ngl 99 --fit off --no-mmproj-offload \
-ot "token_embd\.weight=CPU,blk\.(0|1|2|3|4|5|6|7|8|9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39)\.ffn_.*_exps\.=CPU" \
-c 65536 -ctk q8_0 -ctv q8_0 --flash-attn on
Note on RAM usage (
--lazy-mode auto): Qwen 4 includes a 20.5B per-layer n-gram embedding table (per_layer_token_embd). Underllama.cpp's default--lazy-mode auto, this table stays on NVMe disk and is read on demand, so Resident RAM is much smaller than disk size. For full262,144context on 8 GB VRAM, offload all 40 MoE layers to CPU and use-c 262144 -ctk q4_0 -ctv q4_0.
Heretic BF16 -> Quant, WikiText-2 20 × 512)All 20 quantizations were calibrated with an in-house imatrix computed directly on the abliterated BF16 checkpoint (64 × 512 chunks) and keep sensitive Qwen 4 tensors (hc_*, ssm_beta, ssm_alpha, ple_conv1d) at BF16.
SMX4_L & SMX3_XL (V2 — Hardware-Aware MILP via smx-auto): generated by scoring all 597 tensors across 21 unpruned GGML formats with imatrix and solving a 3-tier (VRAM / RAM / NVMe) joint MILP using real ggml_mul_mat_id latency profiles measured across Intel AVX-VNNI (i7-13650HX), AMD Zen 3 (R7 5700X Linux + Windows), Intel AVX-512, and NVIDIA RTX 40/50 GPUs. Completely eliminates slow LUT formats (IQ3_S, IQ3_XXS) in favor of universally fast Q3_K, Q4_K, IQ4_XS, Q5_K, Q6_K, and Q8_0.ggml_mul_mat_id hardware benchmarks (averaged across Intel i7-13650HX and AMD R7 5700X Linux/Windows with CPU_REPACK enabled) applied to each GGUF's exact MoE tensor types — showing why avoiding slow IQ3_S/IQ3_XXS LUTs yields up to 1.7× faster CPU MoE decode at lower KLD.Heretic BF16 base PPL 7.3780 and all 20 quants) ran uniformly on ggml-cpu (AVX-512). Stage 1 and Stage 2 KL divergences are non-additive and reported separately.| Quant | Disk Size | Resident RAM | PPL (ΔPPL) | Mean KLD vs Heretic BF16 | Same Top-1 | Notes |
|---|---|---|---|---|---|---|
BF16 |
111.09 GB | ~70.1 GB | 7.3780 (+0.0000) |
0.0000 |
100.00% |
Stage 2 reference (Heretic BF16, ggml-cpu) |
Q8_0 |
59.40 GB | ~37.6 GB | 7.3857 (+0.0077) |
0.0215 ± 0.0009 |
94.04% |
Near-lossless 8-bit (PLE=Q8_0, 64 GB RAM / dual-GPU) |
Q6_K |
51.01 GB | ~29.2 GB | 7.3771 (-0.0010) |
0.0315 ± 0.0010 |
92.63% |
Very high quality 6-bit (PLE=Q8_0, 48 GB RAM / 32 GB VRAM) |
Q5_K_M |
39.56 GB | ~25.0 GB | 7.4919 (+0.1139) |
0.0466 ± 0.0016 |
91.41% |
High quality 5-bit (PLE=Q5_0, 32 GB RAM / 24 GB+ VRAM) |
Q5_K_S |
38.79 GB | ~24.2 GB | 7.4600 (+0.0820) |
0.0486 ± 0.0018 |
91.08% |
Compact 5-bit K-quant (PLE=Q5_0, 32 GB RAM / 24 GB+ VRAM) |
Q4_K_M |
36.01 GB | ~21.9 GB | 7.5294 (+0.1514) |
0.0901 ± 0.0029 |
88.35% |
Standard default 4-bit (PLE=Q5_0, 32 GB RAM / 24 GB VRAM) |
Q4_K_S |
34.70 GB | ~20.9 GB | 7.5334 (+0.1554) |
0.0976 ± 0.0033 |
87.59% |
Smaller 4-bit K-quant (PLE=Q5_0, 24–32 GB RAM / 24 GB VRAM) |
IQ4_NL |
34.62 GB | ~20.6 GB | 7.5833 (+0.2052) |
0.1001 ± 0.0034 |
87.18% |
Non-linear imatrix 4-bit (PLE=Q5_0, 24–32 GB RAM / 24 GB VRAM) |
SMX4_L ★ |
41.28 GB | ~19.5 GB | 7.4737 (+0.1014) |
0.0864 ± 0.0031 |
88.88% |
SMX V2 Hardware-Aware (smx-auto) — beats Q4_K_M at -2.4 GB RAM (Q4_K/IQ4_XS/Q3_K MoE, Q8_0/Q6_K/Q5_K backbone, PLE=Q8_0, zero slow IQ3_S) |
IQ4_XS |
33.58 GB | ~19.5 GB | 7.6157 (+0.2376) |
0.1023 ± 0.0032 |
87.02% |
Compact imatrix 4-bit (PLE=Q5_0, 24 GB VRAM / 32 GB RAM) |
Q3_K_L |
30.43 GB | ~18.5 GB | 7.8098 (+0.4318) |
0.1661 ± 0.0052 |
83.71% |
Large 3-bit K-quant (PLE=Q4_0, 20–24 GB VRAM/RAM) |
Q3_K_M |
29.05 GB | ~17.2 GB | 7.8049 (+0.4269) |
0.1818 ± 0.0056 |
82.98% |
Balanced 3-bit K-quant (PLE=Q4_0, 20–24 GB VRAM/RAM) |
SMX3_XL ★ |
30.90 GB | ~16.8 GB | 7.6669 (+0.2946) |
0.1459 ± 0.0051 |
85.33% |
SMX V2 Hardware-Aware (smx-auto) — beats Q3_K_L/Q3_K_M (Q3_K + sensitive IQ4_XS MoE, Q8_0/Q6_K/Q5_K backbone, PLE=Q5_0, zero slow IQ3_S/IQ3_XXS) |
Q3_K_S |
27.43 GB | ~15.9 GB | 8.0576 (+0.6795) |
0.2650 ± 0.0075 |
79.14% |
Small 3-bit K-quant (PLE=Q4_0, 16–24 GB VRAM/RAM) |
IQ3_M |
27.74 GB | ~15.5 GB | 7.8056 (+0.4275) |
0.1806 ± 0.0054 |
83.00% |
High-efficiency imatrix 3-bit (PLE=Q4_0, shared expert Q4_K, 16–24 GB) |
IQ3_XS |
26.79 GB | ~14.6 GB | 7.9310 (+0.5529) |
0.2157 ± 0.0061 |
80.63% |
Compact imatrix 3-bit (PLE=Q4_0, shared expert Q4_K, 16 GB PC/VRAM) |
IQ3_XXS |
25.94 GB | ~13.6 GB | 8.1690 (+0.7909) |
0.2810 ± 0.0081 |
79.22% |
Ultra-compact imatrix 3-bit (PLE=Q4_0, shared expert Q4_K, 16 GB PC/VRAM) |
Q2_K |
25.27 GB | ~13.2 GB | 8.5070 (+1.1290) |
0.3830 ± 0.0103 |
76.06% |
Standard 2-bit K-quant (PLE=Q4_0, shared expert Q4_K, 16 GB PC/VRAM) |
IQ2_M |
24.06 GB | ~11.8 GB | 8.5312 (+1.1532) |
0.3983 ± 0.0098 |
74.31% |
imatrix 2-bit MoE (PLE=Q4_0, shared expert Q4_K, 12–16 GB VRAM/RAM) |
IQ2_XXS |
21.90 GB | ~10.4 GB | 10.8995 (+3.5215) |
0.7542 ± 0.0153 |
66.35% |
Ultra-small imatrix 2-bit MoE (PLE=Q4_0, shared expert Q4_K, 12 GB VRAM/16 GB RAM) |
IQ1_M |
20.67 GB | ~9.5 GB | 17.4239 (+10.0458) |
1.2773 ± 0.0223 |
55.84% |
Ultra-compact imatrix 1-bit MoE (PLE=Q4_0, shared expert Q4_K, 10–12 GB VRAM/16 GB RAM) |
mmproj-BF16 |
0.90 GB | — | — | — | — | Vision encoder (100% untouched) |
mtp (Q8_0 / Q4_K_M) |
2.01 GB / 1.27 GB | — | — | — | — | Optional 1-layer MTP speculative decoding |
imatrix |
0.39 GB | — | — | — | — | Calibration importance matrix |
To rule out WikiText-2 overfitting, V2 quants were validated head-to-head against legacy V1 and standard quants on an independent 20 × 512 (10,240-token) mixed corpus (~33% Python/C++ code, ~33% Russian technical Wikipedia, ~33% GSM8K math reasoning):
| Quant | Resident RAM | WikiText-2 KLD | WikiText-2 Top-1 | Cross-Domain KLD | Cross-Domain Top-1 | Cross-Domain PPL |
|---|---|---|---|---|---|---|
| Q4_K_M | ~21.9 GB | 0.0899 |
88.00% |
0.0625 |
94.04% |
2.3748 |
SMX4_L (V2) ★ |
~19.5 GB | 0.0864 |
88.88% |
0.0649 |
93.92% |
2.4000 |
SMX4_L (legacy V1) |
~19.4 GB | 0.1001 |
87.92% |
0.0626 |
93.86% |
2.4241 |
| IQ4_XS | ~19.5 GB | 0.1035 |
86.96% |
0.0774 |
93.88% |
2.4119 |
| Q3_K_L | ~18.9 GB | 0.1673 |
84.22% |
0.1281 |
91.82% |
2.4626 |
SMX3_XL (V2) ★ |
~16.8 GB | 0.1459 |
85.33% |
0.0909 |
92.84% |
2.4085 |
SMX3_XL (legacy V1) |
~16.7 GB | 0.1462 |
84.96% |
0.1014 |
93.29% |
2.4387 |
| IQ3_M | ~16.2 GB | 0.1814 |
82.22% |
0.1349 |
91.45% |
2.4992 |
Qwen/Qwen4-35B-A3B