GitHub - synchopate/llama-modchip: πŸ‹ Run 284B DeepSeek-V4-Flash (<59GiB RAM, 44.4 tok/s pp, 9.1-14.7 tok/s) & 30B MoEs (25-111 tok/s) on a pure 64GB CPU at 256K ctx (0 GPUs). SwiGLU-H2, Stockfish-PVS L3 & 13ms Claude Code restore.

GitHub

23 min read Original article β†—

3.00–3.75 bpw Vector & Dyadic CPU Inference for 284B & 30B Frontier MoE Models

100/100 E2E Quality Parity with BF16 & Q4_0 Β· Zero GPUs Required Β· Up to +24% Faster E2E Throughput

Release License Quality Gate VQ3 Technical Paper PDF Architecture Drafter Submit Benchmark

Quickstart Β· Precision & Speed vs. BF16 & Q4_0 Β· How 3D VQ & Fractal-64 Work Β· Quantization Specs Β· Supported Models Β· Leaderboard Β· Technical Paper (paper/) Β· FAQ

100 / 100
E2E Quality Gate (parity w/ BF16)
99.15% / 97.78%
CosSim vs BF16 (Fractal / VQ3)
56.07 GiB
DeepSeek-V4 284B VQ3 GGUF
13.08 GiB
Nemotron-30B VQ3 (16.0 GiB RAM)
24.2–111.6 tok/s
30B MoE CPU decode
10.4 ms
/dev/shm Claude 40-tool restore
0
GPUs required
Hardware Class System RAM Target Checkpoint Throughput (0 GPUs) Architecture & Memory Notes
Developer laptop / Mini-PC 16–32 GB Nemotron-3.5-30B-A3B-VQ3 (13.08 GiB, 3.00/3.75 bpw) 24.2–60.4 tok/s 16.04 GiB VmRSS; 70.19% Stockfish-PVS acceptance; 100/100 Quality Gate
64 GB Desktop / Server 64 GB DeepSeek-V4-Flash 284B VQ3 (56.07 GiB, 1.69 bpw) 41.1–44.4 tok/s pp Β· 9.1–25.3 tok/s tg Fits in 62.5 GiB usable Linux RAM (58.31 GiB VmRSS) with +16.9% faster raw decode
Hybrid Desktop (CPU + 16 GB GPU) 32–64 GB Nemotron-30B / Qwen3-30B (3.75–4.25 bpw) 80.80 tok/s Hot attention/SSM trunk on GPU (-ngl 99), cold routed MoE experts in CPU RAM
8-Channel Workstation (Threadripper) 128 GB+ DeepSeek-284B / Nemotron-30B 111.62 tok/s (30B) 8-CCD AVX-512BW _1x8 register tiling saturates 8-channel DDR5 bandwidth

Overview: Breaking the Sub-4-Bit CPU Quantization Barrier

Until today, running frontier Mixture-of-Experts (MoE) models on consumer or workstation CPUs forced an agonizing trade-off: either pay the heavy DRAM bandwidth penalty of 4.50-bpw scalar quantization (Q4_0 / Q4_K_M), or drop to standard 2–3 bit scalar quants (Q2_K / Q3_K) that suffer from slow multi-shift bit unpacking and degrade JSON tool-calling schemas.

llama-modchip v2.5.0 eliminates this compromise. By introducing LUT-VQ3-64 (GGML_TYPE_VQ3_0 = 43, 24 bytes / 64 weights = 3.00 bpw)β€”a 3D Lloyd-Max Vector Quantizer decoded directly inside 6 AVX-512 ZMM registers via single-cycle VPERMI2B lookupsβ€”and pairing it with Fractal-64 (GGML_TYPE_Q2_0 = 40, 30 bytes / 64 weights = 3.75 bpw) in a domain-aware hybrid topology:

  1. 100/100 E2E Quality Parity with BF16 & Q4_0 at -33.3% MoE Footprint: On real uncompressed BF16 MoE weights (blk.1.ffn_up_exps.weight), Fractal-64 (3.75 bpw) achieves 17.75 dB SQNR (99.15% Cosine Similarity, beating Q3_K's 16.30 dB by +1.45 dB), while LUT-VQ3-64 (3.00 bpw, 2.333 index bits/weight) achieves 13.57 dB SQNR (97.78% Cosine Similarity, beating Q2_K's 10.15 dB by +3.42 dB). Pairing LUT-VQ3-64 (3.00 bpw) on expansion/gate projections with Fractal-64 (3.75 bpw) on residual output projections preserves 100% E2E quality (100.0 / 100.0) while cutting up_exps DRAM traffic by 33.3% vs. Q4_0.
  2. 284B DeepSeek-V4-Flash in < 59 GiB RAM (+16.9% Faster Pure Decode): DeepSeek-V4-Flash-0731-VQ3 (284.33B total, 13.17B active, all 6 routed experts per layer) shrinks to 56.07 GiB on disk (58.31 GiB VmRSS), boosting pure N=1 decode to 9.05 tok/s (+16.9% over Fractal-64's 7.74 tok/s), prefill to 41.11 tok/s (+8.8%), and agentic tool bursts to 19.4–25.3 tok/s.
  3. 30B Nemotron-3.5-A3B in 16.04 GiB RAM (100/100 Quality Gate): Nemotron-3.5-30B-A3B-VQ3-64 (13.08 GiB on disk) saves -5.67 GiB RAM vs. Q4_0 and -1.23 GiB vs. Fractal-64, runs at 24.18 tok/s E2E (+23.7% vs. Q4_0), lifts Stockfish-PVS speculative acceptance to 70.19% (+11.1% vs. Fractal-64), and scores a perfect 100.0 / 100.0 on benchmarks/eval_quality_and_tools.py.
  4. Instant 10.4 ms Claude Code Slot-0 Restore + HARP-Cache + RouteCrack + Stockfish-PVS: Pre-warms and restores the full 40-tool Claude Code prefix (2,776 tokens) from /dev/shm in 10.4 ms (0.16s E2E TTFT, f_keep = 1.000) on both 30B and 284B models.

llama-modchip v2.5.0 β€” 284.33B DeepSeek-V4-Flash & Nemotron-30B on Pure CPU


πŸ“Š Hard Empirical Evidence: Precision & Speed vs. BF16 and Q4_0

1. Ground-Truth Signal Fidelity on Uncompressed BF16 MoE Weights (libggml-base.so)

Measured directly via quantize_row_*_ref $\to$ dequantize_row_* on the uncompressed 59.0 GiB BF16 master checkpoint (blk.1.ffn_up_exps.weight, $N = 4,194,304$ weights, heavy-tailed kurtosis $\kappa = 3.2–4.8$):

Quantization Format Block Layout & Size Effective bpw Direct BF16 SQNR Cosine Sim vs. BF16 Relative $L_2$ Error SIMD Decode Engine
BF16 (Lossless Reference) 128 B / 64 weights 16.000 bpw $\infty\text{ dB}$ 100.00% 0.00% Native F32/BF16 Dot
Baseline-Q4_0 (Standard) 36 B / 64 weights 4.500 bpw 21.09 dB 99.61% 8.82% Scalar Uniform AVX2/AVX-512
Fractal-64 (GGML_TYPE_Q2_0) 30 B / 64 weights 3.750 bpw 17.75 dB (+1.45 dB vs Q3_K) 99.15% 12.96% Single-Cycle Dyadic VPSHUFB
Standard Q3_K 27.5 B / 64 weights 3.438 bpw 16.30 dB 98.84% 15.32% Multi-Shift Q3_K Unpack
LUT-VQ3-64 (GGML_TYPE_VQ3_0) 24 B / 64 weights 3.000 bpw 13.57 dB (+3.42 dB vs Q2_K) 97.78% 20.97% Single-Cycle 3D VQ VPERMI2B
Standard Q2_K 21 B / 64 weights 2.625 bpw 10.15 dB 95.37% 31.08% Multi-Shift Q2_K Unpack

2. End-to-End Model Benchmarks (benchmarks/eval_quality_and_tools.py + llama-bench)

Measured on 16-Core AMD Zen 5 (CT 100, --cpu-range 0-15 --cpu-strict 1, Transparent HugePages enabled; full report in benchmarks/QUALITY_GATE_VQ3_64.md).

A. NVIDIA-Nemotron-3.5-Lightning-30B-A3B

Metric / Suite Reference BF16 Standard Q4_0 Fractal-64 (v2.4.0) LUT-VQ3-64 Hybrid (v2.5.0) Delta vs. Q4_0
GGUF File Size on Disk 59.00 GiB 19.86 GiB 14.35 GiB 13.08 GiB -6.78 GiB (-34.1%)
Resident RAM (VmRSS) 59.40 GiB 21.71 GiB 17.27 GiB 16.04 GiB -5.67 GiB (-26.1%)
Raw Pure Decode (tg128, $N=1$) 7.82 tok/s 19.54 tok/s 22.25 tok/s 22.44 tok/s +14.8%
E2E Decode (Stockfish-PVS) 7.82 tok/s 19.54 tok/s 25.02 tok/s 24.18 tok/s +23.7%
Stockfish-PVS Spec Acceptance 62.50% 66.67% 59.09% 70.19% +3.52% (+11.10% vs Fractal)
1. Agentic Tool-Calling (30 pts) 30.0 / 30.0 30.0 / 30.0 30.0 / 30.0 30.0 / 30.0 100.0% Bit-Exact Schema
2. Executable Code Gen (30 pts) 30.0 / 30.0 30.0 / 30.0 30.0 / 30.0 30.0 / 30.0 100.0% Unit-Test Pass
3. Long-Context Needle & Math (20 pts) 20.0 / 20.0 20.0 / 20.0 20.0 / 20.0 20.0 / 20.0 100.0% Exact Retrieval
Total Quality Gate Score 100.0 / 100.0 100.0 / 100.0 100.0 / 100.0 100.0 / 100.0 βœ… Verified Parity

B. DeepSeek-V4-Flash-0731 284B (284.33B Total / 13.17B Active, Top-6 Routing)

Metric / Suite Reference BF16 Standard Q4_0 Fractal-64 (v2.4.0) LUT-VQ3-64 Hybrid (v2.5.0) Delta vs. Fractal-64
GGUF File Size on Disk 568.6 GiB 162.4 GiB 56.56 GiB 56.07 GiB -0.49 GiB
Peak Resident RAM (VmRSS) OOM on 64GB OOM on 64GB 58.80 GiB 58.31 GiB Fits in 64 GB Host RAM
Prompt Prefill (pp128 / pp512) N/A N/A 37.79 tok/s 41.11 tok/s +8.8% faster
Raw Pure Decode (tg64, $N=1$) N/A N/A 7.74 tok/s 9.05 tok/s +16.9% faster
E2E Agentic Tool Burst Throughput N/A N/A 14.7–21.2 tok/s 19.4–25.3 tok/s +20.1% faster
Agentic Tool-Calling & Needle Gate 100.0% 100.0% 100.0% 100.0% (30/30 & 20/20) Zero Schema Regressions

🧠 How Domain-Aware LUT-VQ3-64 + Fractal-64 Hybrid Retains 100% E2E Quality

1. Why 3D Sphere Packing (LUT-VQ3-64) Beats Scalar 2–3 Bit Grids (+3.42 dB vs. Q2_K)

Scalar uniform quantizers quantize each coordinate $w_i \in [-M, +M]$ independently across the 3D Cartesian bounding cube $[-M, +M]^3$ of volume $8M^3$. However, heavy-tailed MoE weights (kurtosis $\kappa = 3.2–4.8$) have an isotropic radial/ellipsoidal joint density $p(\mathbf{w}) \propto \exp(-|\mathbf{w}|_p^\alpha / \sigma^\alpha)$ concentrated inside the inscribed $L_2$ sphere ($\text{Vol} = \frac{4}{3}\pi M^3 \approx 4.189 M^3$, leaving $47.64%$ of the cube empty) or $L_1$ cross-polytope ($\text{Vol} = \frac{4}{3}M^3 \approx 1.333 M^3$, leaving $83.33%$ of the cube empty).

LUT-VQ3-64 discards the Cartesian grid and packs 128 3D Lloyd-Max centroids ($7\text{ bits} / 3\text{ weights} = 2.333\text{ bpw}$, antipodally symmetric $\mathbf{c}_{127-k} = -\mathbf{c}_k$) directly onto the populated spherical/cross-polytope shell, paired with:

  • 2 bytes: FP16 super-block scale $d$.
  • 2 bytes: Four 4-bit unsigned sub-scales ($s_b = 4 + u_b \in {4..19}$) for the four 16-weight sub-blocks.
  • 20 bytes: 21 7-bit 3D indices (147 bits) + 1 tail 4-bit scalar index (4 bits) = 151 bits inside 160 bits (24 bytes / 64 weights = 3.00 bpw).

2. Single-Cycle AVX-512 VBMI VPERMI2B Register Lookup + Domain-Aware Split

The entire 128-entry 3D codebook occupies $128 \times 3 = 384\text{ bytes}$, fitting permanently inside 6 AVX-512 ZMM registers (zmm26..zmm31). The AVX-512 VBMI VPERMI2B (_mm512_permutex2var_epi8) instruction resolves 64 centroids per instruction in 1 clock cycle directly in registers with zero L1/L2 cache reads. By encoding expansion/gate projections (ffn_up_exps, ffn_gate_shexp, attn_q_b, attn_output_a) in LUT-VQ3-64 (3.00 bpw, 97.78% CosSim) and preserving residual-stream output projections (ffn_down_exps, attn_output_b, attn_kv) in Fractal-64 (3.75 bpw, 17.75 dB SQNR, 99.15% CosSim), the model achieves 100% E2E quality parity (100/100) with BF16 and Q4_0 while cutting memory traffic by 20%–33%.


Quantization & Memory Breakdown

To answer the most common technical question upfrontβ€”exact bit-widths (bpw), base checkpoints, and what is compressed in each GGUF:

Checkpoint Total / Active Params Base Source Disk Size (GiB / GB) Effective bpw Layer-by-Layer Tensor Allocation
Nemotron-3.5-30B-A3B-Q4_0 30.2B / 3.0B BF16 Official 17.59 GiB (18.89 GB) 4.50 bpw Standard Q4_0 across MoE + attention; F32 norms & SSM conv/decay
Nemotron-3.5-30B-A3B-MXFP4 30.2B / 3.0B BF16 Official 15.95 GiB (17.13 GB) 4.25 bpw GGML_TYPE_MXFP4 (E2M1 + shared exponent) on routed MoE; Q4_0/Q8_0 trunk
Nemotron-3.5-30B-A3B-Fractal-64 30.2B / 3.0B BF16 Official 14.35 GiB (15.41 GB) 3.75 bpw Attention, Mamba-2 SSM & shared experts in Q4_0/Q8_0/F32; cold routed MoE experts in Fractal-64 (Q2_0, 30B/64W). Scores 100/100 on benchmarks/eval_quality_and_tools.py.
Nemotron-3.5-30B-A3B-VQ3-64 30.2B / 3.0B BF16 Official 13.30 GiB (14.28 GB) 3.00 / 3.75 bpw Surgical Hybrid (scripts/build_nemotron_vq3.py): Anchor MoE layers (blk.1, 3, 49, 51) + all 23 blk.*.ffn_down_exps.weight in Fractal-64 (3.75 bpw); 19 interior blk.6..47.ffn_up_exps.weight (pre-ReLUΒ²) encoded from BF16 into LUT-VQ3-64 (GGML_TYPE_VQ3_0 = 43, 3.00 bpw, 24B/64W). Scores 100/100 with 70.19% Stockfish-PVS acceptance in 16.04 GiB RAM.
DeepSeek-V4-Flash-0731-VQ3 284.33B / 13.17B DeepSeek-V4-Flash 56.45 GiB (60.61 GB) 1.69 bpw Surgical Hybrid (scripts/build_dsv4_vq3.py):
β€’ 100% of MLA Attention Projections (attn_q_b, attn_output_a, attn_output_b, attn_kv, compressor_*): Preserved untouched in Fractal-64 (3.75 bpw, zero double-quantization)
β€’ 68 Interior Shared-Expert Pre-SiLU Projections (blk.5..38 ffn_gate_shexp & ffn_up_shexp): Encoded in LUT-VQ3-64 (3.00 bpw); anchor shared experts (blk.0..4, 39..42) & all ffn_down_shexp preserved in Q5_K/Q6_K
β€’ 256 Routed MoE Experts: SwiGLU-H2 IQ1_S / IQ1_M / IQ2_XXS.

Note on MoE Expert Routing (Top-K): By default (Lossless), DeepSeek-V4-Flash evaluates all 6 routed experts + 1 shared expert (Top-6) per layer with zero expert dropping (1.00000 logit cosine similarity vs the unpatched runtime on the same checkpoint). Setting LLAMA_MOE_TOP_K=5 or 4 is an optional runtime flag for users who want to trade a small perplexity delta for higher decode throughput.


Quickstart

Linux & macOS (Automated Setup & Chat)

git clone https://github.com/synchopate/llama-modchip.git
cd llama-modchip
./modchip chat

Direct Run (Pre-Compiled Linux x86_64 Binary + Hugging Face .gguf)

Compatibility Note (GGML_TYPE_Q2_0 = 40 & GGML_TYPE_VQ3_0 = 43): Fractal-64 and LUT-VQ3-64 Surgical Hybrid models use custom block-64 BF16-scale tensors (GGML_TYPE_Q2_0 = 40, GGML_TYPE_VQ3_0 = 43) and deepseek4 / Stockfish-PVS kernels. Unpatched llama.cpp, Ollama, or LM Studio binaries will reject them with unknown tensor type 40/43. Use ./modchip above or the standalone pre-compiled binary (llama-server-modchip-linux-x86_64, zero external .so dependencies) included in the Hugging Face repositories and GitHub Release v2.5.0 (prebuilt static Windows .exe binaries are also available at v2.4.0-windows-cpu):

# 1A. 30B Nemotron-3.5-A3B Surgical Hybrid VQ3-64 + Fractal-64 (13.30 GiB β€” 16 GB RAM at 24.2–60.4 tok/s):
hf download Synchopate/NVIDIA-Nemotron-3.5-30B-A3B-VQ3-64-CPU-GGUF \
  llama-server-modchip-linux-x86_64 NVIDIA-Nemotron-3.5-30B-A3B-VQ3-64.gguf --local-dir .
chmod +x llama-server-modchip-linux-x86_64
./llama-server-modchip-linux-x86_64 -m NVIDIA-Nemotron-3.5-30B-A3B-VQ3-64.gguf -c 262144 -t 16 --port 8080

# 1B. 30B Nemotron-3.5-A3B Pure Fractal-64 (14.35 GiB β€” 16–32 GB RAM at 25.0–60.4 tok/s):
hf download Synchopate/NVIDIA-Nemotron-3.5-30B-A3B-Fractal-64-CPU-GGUF \
  llama-server-modchip-linux-x86_64 NVIDIA-Nemotron-3.5-30B-A3B-Fractal-64.gguf --local-dir .

# 2A. 284B DeepSeek-V4-Flash Surgical Hybrid VQ3-64 + Fractal-64 (56.45 GiB β€” fits in 64 GB RAM):
hf download Synchopate/DeepSeek-V4-Flash-0731-VQ3-64GB-CPU-GGUF --local-dir ./dsv4-vq3
chmod +x ./dsv4-vq3/llama-server-modchip-linux-x86_64
./dsv4-vq3/llama-server-modchip-linux-x86_64 -m ./dsv4-vq3/DeepSeek-V4-Flash-0731-VQ3-00001-of-00003.gguf -c 32768 -t 16 -fa on --port 8080

# 2B. 284B DeepSeek-V4-Flash Pure Fractal-64 (56.56 GiB β€” fits in 64 GB RAM):
hf download Synchopate/DeepSeek-V4-Flash-0731-Fractal-64GB-CPU-GGUF --local-dir ./dsv4

Windows 10/11 (Hybrid GPU + CPU MoE Pack)

Open windows/ and run windows/AVVIA_MODCHIP.bat (or ./modchip start in Git Bash). It detects physical CPU cores, free RAM, and GPU VRAM (nvidia-smi), downloads llama.cpp CUDA 12.4 / Vulkan binaries, computes the --n-cpu-moe split, and launches the Web Chat UI (http://127.0.0.1:8080).

./modchip Command Description
./modchip chat Interactive terminal chat with live tok/s, TTFT, and Stockfish-PVS acceptance telemetry
./modchip web Opens the Dark-Mode Web Chat & Live Telemetry HUD (http://127.0.0.1:8787)
./modchip bench Runs a 30-second 2-stage speed test and prints a shareable CPU Benchmark Scorecard
./modchip claude Launches Claude Code CLI (40 tools) wired to the local 256K engine (18.9–32.6 ms warm restore)
./modchip eval Runs the reproducible 100-Point Quality, Tool-Calling, Coding & 8.5K Needle Gate
./modchip quantize Transcodes BF16/Q4_0/UD-IQ1_S GGUFs into Fractal-64 (3.75 bpw) or Fractal-MXFP4 (4.25 bpw)
./modchip status / stop Inspects CPU readiness, 2MB HugePages, and /dev/shm IPC, or stops background services

Hardware Readiness Check (Zero Model Download Required)

curl -sL https://raw.githubusercontent.com/synchopate/llama-modchip/main/scripts/check_cpu_readiness.py | python3

Submit your terminal scorecard via a GitHub Benchmark Issue or GitHub Discussions to add your CPU to the leaderboard below.


Supported Models & Model-Specific Optimizations

Each model family has a dedicated technical guide with mathematical derivations, operator-level latency profiles, and quality gate benchmarks:

Model Family Total / Active Params Disk (GGUF) & 256K RAM (VmRSS) Key Optimizations Implemented Verified Speed (16C Zen 5 / Hybrid) Detailed Guide
NVIDIA-Nemotron-3.5-30B-A3B
(Fractal-64 / MXFP4 / Q4_0)
30.2B / 3.0B
(23 SSM + 23 MoE + 6 GQA)
14.35 – 17.59 GiB
(15.4 – 21.7 GiB RSS)
β€’ Block-64 Fractal-64 (3.75 bpw) & MXFP4 (4.25 bpw) (100/100 Quality Gate)
β€’ Stockfish-PVS v2 (M=7) + RouteCrack (1.64 MB L2/L3 Zobrist TT)
β€’ 432 MB 256K EAKV (Q8_0/Q4_0) + _MM_HINT_NTA L3 isolation
β€’ 18.9 ms /dev/shm Slot-0 Restore (~6,800x faster warm turns)
25.0 – 60.4 tok/s (0 GPU)
80.8 tok/s (Vulkan Hybrid)
111.6 tok/s (Threadripper)
Nemotron Guide
DeepSeek-V4-Flash-0731-Fractal
(SwiGLU-H2 + Fractal-64)
284.33B / 13.17B
(43L MLA + 256+1s MoE)
56.56 GiB (-20.3 GiB)
(58.9 GiB RSS β€” fits in 64 GB)
β€’ Analytical 2nd-Order SwiGLU-H2 MoE + Fractal-64 MLA Transcoding
β€’ 4-Level Register (ZMM AVX-512BW) + L1D (32KB) + L2 (1MB) + L3 (64MB) Multi-Column ({8,4,3,2}) Prefill Tiling (25.0 -> 44.36 tok/s, +77%)
β€’ Register-Stationary AVX-512 MQA8 FlashAttention (2.0x) + AVX-512 quantize_row_q8_K
β€’ Optional $L_2$-Quadrature MoE Pruning + L1-Local Gate-First SwiGLU (10.74 tok/s)
β€’ SVD of wo_b * wo_a (99.82% CosSim at -25% rank) & $O(1)$ Rollback Fix
43.2–44.4 tok/s (Prefill)
9.06–9.95 tok/s (Lossless Top-6)
9.87–10.15 tok/s (Top-5 L2)
10.41–10.74 tok/s (Top-4+SwiGLU)
11.5–14.7 tok/s (PVS)
DeepSeek-V4 Guide
Qwen3-30B-A3B & Qwen3-14B
(Q3_K_M / Q4_K_M)
30.5B / 3.3B -> 1.7B
(48L GQA, 128 exp)
13.70 – 17.28 GiB
(14.5 – 19.4 GiB RSS)
β€’ Norm-Preserving Dynamic MoE Top-K (8 -> 4, +38.5% decode)
β€’ 3:1 Interleaved SWA Safety Lock (LLAMA_SWA_STRIDE=4)
β€’ Windows 11 GB VRAM + 16 GB RAM Hybrid Split (--n-cpu-moe N)
34.80 tok/s (0 GPU Top-4)
50–58 tok/s (14B RTX 2080 Ti)
Architecture Β§3.9
NVIDIA-Nemotron-H-8B-128K
(Q8_0 / Q4_K_M)
8.0B Dense
(48 SSM + 4 GQA)
4.60 – 8.00 GiB
(210 MB KV @ 128K)
β€’ 48-Layer Mamba-2 SSM Constant-Memory Backbone
β€’ 100% GPU VRAM Residency on 8–11 GB Cards (0 GB System RAM)
100+ tok/s (RTX 2080 Ti)
147.6 tok/s (CPU pp512)
Nemotron Guide

Supported Chips & Processor-Specific Optimizations

Microarchitectural details and tuning flags for each processor and GPU hybrid are documented in docs/HARDWARE_OPTIMIZATIONS.md:

Processor / Platform Verified Hardware Hardware-Specific Optimizations Active Platform Guide & Scripts
AMD Zen 5 (Desktop / Mobile / Server) Ryzen 9 9955HX, 9950X, EPYC 9005 Turin β€’ Single-cycle 512-bit AVX-512 (VPDPBUSD, VPRORVQ, VBMI, BF16)
β€’ 48 KB L1D 3D Tiling (TILE_I0=64) on multi-head wo_a projections
β€’ _MM_HINT_NTA Victim-L3 Isolation (64 MB) + 2MB THP (6.14 GB L2 STLB)
Hardware Guide Β§2.1
install.sh
AMD Zen 4 Multi-CCD (Threadripper / EPYC) Threadripper PRO 7985WX (64C/128T, 8 CCDs, 256 MB L3) β€’ Dynamic sysfs L3 CCD Topology Discovery (scripts/llama_modchip.py)
β€’ Deterministic 4C/CCD Stride (-t 32): avoids Infinity Fabric saturation (+54% faster than -t 64)
Hardware Guide Β§2.2
Issue #1
AMD 3D V-Cache + Radeon Vulkan Hybrid Ryzen 9 7945HX3D (128 MB L3) + RX 9070 XT 16GB (RADV) β€’ Tensor-Role Splitting (-ngl 99 --n-cpu-moe N --load-mode none)
β€’ Native Vulkan SSM_SCAN + Fractal-MXFP4 (15.2 GB) GPU Shaders (80.8 tok/s at 256K)
Hardware Guide Β§2.3
FAQ.md Q8
Intel / AMD + NVIDIA RTX (Windows 10/11) Core i9-9900K / 14900K + RTX 2080 Ti 11GB / 3090 / 4090 β€’ Single-Cycle AVX2 vpsllvd + vpmaddwd Sub-Scale Fusion
β€’ Live-VRAM --n-cpu-moe Solver (550 MB WDDM Reserve) + _WIN32 CreateFileMappingA
Windows Guide
windows/modchip_win.ps1
Apple Silicon (M1 / M2 / M3 / M4 / M5) Apple M5 Max (18C CPU, 48 GB), M4 Max (16C+40C, 64 GB; 14C+32C, 36 GB), M4 Pro (14C+20C, 24 GB) β€’ Zero-Copy Unified Memory Metal Shaders + ARM64 NEON/AMX (286.5 GB/s CPU DRAM BW on M5 Max, #21; 1,040.2 tok/s Q4_0 & 979.9 tok/s Fractal-64 llama-bench pp512 on M4 Max)
β€’ Native Fractal-64 (Q2_0) Metal shaders (72.5 tok/s tg128 vs 80.3 Q4_0, 14.35 GiB / -18.4%, #16) + NEON SDOT 1Γ—{8,4,3,2} tiling
Apple Silicon Guide
#8 Β· #16 Β· #21
ARM64 Cloud & Edge (AWS Graviton / Ampere) AWS Graviton3 m7g.2xlarge (8 vCPU Neoverse-V1, 32 MB L3) β€’ ARMv8.4-A DotProd (SDOT) + 256-Bit SVE + 1-vCPU-per-core pinning (-t 8)
β€’ 32 MB System Level Cache (SLC) retention (44.97 tok/s decode)
Hardware Guide Β§1
Issue #2
AMD Zen 4 Compact Mini-PC (Linux) Ryzen 7 8745H / 8745HS (8C/16T, 16 MB L3 + Radeon 780M) β€’ AVX-512 VNNI + 16 MB L3 window auto-tuning (19.48–23.38 tok/s on 96 GB DDR5-5600)
β€’ Optional Radeon 780M UMA iGPU offload
Fedora Guide
Issue #9

Headline Benchmarks: Pure CPU & Hybrid Summary

1. DeepSeek-V4-Flash 284B (13.17B Active) on a 64 GB Zen 5 CPU (AMD Ryzen 9 9955HX, 0 GPUs)

Operator-level profiling and mathematical derivations in docs/DEEPSEEK_V4_OPTIMIZATIONS.md (probabilities and KL-divergence measured relative to the unpatched Top-6 execution on the 56.56 GiB Fractal checkpoint):

Runtime Configuration (DeepSeek-V4-Flash, 256K Context) Prefill (pp512) Pure Decode (N=1) With Stockfish-PVS Logit Cosine Sim KL-Divergence ($\Delta$ PPL) Top-1 / Top-3 Match
Unpatched UD-IQ1_S (76.87 GiB / 82.5 GB) OOM / Swap on 64 GB 5.91 tok/s (169.3 ms) N/A (Rollback Bug) 1.00000 (Ref) 0.0000 (0.00%) 100% / 100%
1. v2.4.0 Lossless (Top-6 All Layers, Default, 56.56 GiB) 43.16 – 44.36 tok/s (+77.1%) 9.06 – 9.95 tok/s 11.5 – 14.7 tok/s 1.00000 0.0000 (0.00% Bit-Exact) 100% / 100%
2. v2.4.0 Sweet-Spot (Top-5 on il >= 3, $L_2$ Quadrature) 43.16 – 44.36 tok/s 9.68 – 9.87 tok/s 12.2 – 15.1 tok/s 0.99714 0.0042 nats (+0.42% PPL) 95.8% / 100%
3. v2.4.0 Top-5 L2 + Gate-First SwiGLU (80/128 $L_2$) 43.16 – 44.36 tok/s 10.15 tok/s (98.5 ms) 12.8 – 15.6 tok/s 0.99385 0.0531 nats 100% / 100%
4. v2.4.0 Turbo 10+ (Top-4 L2 + Gate-First SwiGLU) 43.16 – 44.36 tok/s 10.12 – 10.74 tok/s (93.2 ms) 13.0 – 16.0 tok/s 0.99126 0.0281 – 0.0694 nats 100% / 100%

2. NVIDIA-Nemotron-3.5-30B-A3B (3.0B Active) at 256K Context (AMD Ryzen 9 9955HX, 0 GPUs)

Full ablation tables and 100/100 Quality Gate report in docs/NEMOTRON_OPTIMIZATIONS.md:

Quantization Profile Disk Size Idle VmRSS (256K) Quality Gate (100 pts) Prefill (pp512) Base Decode (N=1) Stockfish-PVS v2 (M=7) Refactoring
Baseline-Q4_0 (4.50 bpw Official GGUF) 17.59 GiB 21.41 GiB 100.0 / 100.0 241.0 – 306.8 tok/s 19.54 tok/s 40.91 avg / 45.43 peak tok/s
Fractal-MXFP4 (4.25 bpw) 15.95 GiB 17.46 GiB 100.0 / 100.0 241.0 – 306.8 tok/s 26.08 tok/s (+33.5%) 48.39 avg / 60.40 peak tok/s (80.8 Vulkan)
Fractal-64-BF16 (3.75 bpw) 14.35 GiB 15.40 GiB (-6.01 GiB) 100.0 / 100.0 241.0 – 306.8 tok/s 25.02 tok/s (+28.0%) 48.39 avg / 60.40 peak tok/s (96.4% acc)

3. DeepSeek-V4-Flash 284B (13.17B Active) on Apple Silicon (Apple M5 Max, 64 GB Unified Memory)

  • Prefill Throughput (pp512): 169.4 Β± 29.6 tok/s (Apple Metal accelerated)
  • Decode Throughput (tg128): 27.0 Β± 0.4 tok/s in llama-bench
  • Real Served Generation (llama-server): 20.7 – 23.6 tok/s across realistic coding (code_edit: 20.7 tok/s, code_new: 23.3 tok/s, free_text: 23.6 tok/s) with 0 swapouts (iogpu.wired_limit_mb=57344)
  • Architecture & Placement: Apple M5 Max (18-Core CPU + 40-Core Metal GPU), 64 GB LPDDR5X. 5 pure-IQ1_S MoE layers offloaded to CPU (blk.(10|12|14|16|18).ffn_.*_exps.=CPU), remainder on Metal.
  • Driver & Patches: patches/apple-silicon/0001 (Fractal-64 Q2_0 NEON/Metal), 0002 (Metal tensor run mapping), 0003 (Metal register unpack). Built via apple-silicon/build-dsv4-engine.sh and launched with apple-silicon/run-dsv4.sh. Contributed by Bobby Grayson (@notactuallytreyanastasio). Full report: apple-silicon/results/dsv4-m5max.md.

Community CPU & Hybrid Leaderboard

Run ./modchip bench (or windows\BENCHMARK_PC.bat on Windows) and Submit Your Scorecard (GitHub Issue) (pure-CPU entries sorted by Refactor decode):

Hardware Platform (CPU / SoC / Hybrid) Cores / Cache Memory Prefill (tok/s) Decode β€” Prose / C++20 Decode β€” Stockfish M=7 Burst Config & Contributor
AMD Threadripper PRO 7985WX (Zen 4) 64C/128T (8 CCDs, 256 MB L3) 256 GB 8-Ch DDR5-6000 (0 GPU) 386.00 (-t 32) 73.84 – 80.14 tok/s (70.0% acc) 111.62 tok/s warm / 80.14 cold (-t 32 4C/CCD) @aifartist (Issue #1)
AMD Ryzen 9 7945HX3D + RX 9070 XT (Hybrid) 16C/32T (128 MB 3D V-Cache) + 16 GB Vulkan 94 GB DDR5 + 16 GB VRAM 563.00 (256K ctx) 75.10 tok/s (MXFP4 15.2GB) 80.80 tok/s (Vulkan SSM_SCAN + MXFP4 MoE) Community (RADV/Vulkan) (FAQ.md)
AMD Ryzen 9 9955HX (Zen 5) 16C/32T (2 CCDs, 64 MB L3) 64 GB DDR5 (0 GPU) 241.0 (Peak 306.8) 25.02 – 34.5 tok/s (Fractal-64 / MXFP4) 48.39 avg / 60.40 peak (len 6.90) @synchopate (docs/NEMOTRON_OPTIMIZATIONS.md)
Apple M4 Max (14C+32C Metal Β· Q4_0) ARM64 NEON + Metal 36 GB LPDDR5X-8533 (Unified) 860.13 (1,040.2 pp512) 77.23 tok/s (C++20, 203 ms TTFT; 80.34 tg128) 77.95 tok/s (81.0 short; Nemotron 30B PPL 2.086 Β± 0.037, Gate 100/100) @khairullinr (Issue #16)
Apple M4 Max (14C+32C Metal Β· Fractal-64) ARM64 NEON + Metal 36 GB LPDDR5X-8533 (Unified) 615.89 (979.9 pp512) 71.60 tok/s (C++20, 47 ms TTFT; 72.47 tg128) 71.31 tok/s (vs Q4_0 ref, code: Top-1 94.35%, KLD 0.0566 nats, Gate 100/100) @khairullinr (Issue #16)
Apple M5 Max (DeepSeek-V4 284B Β· 56.56 GiB) 18C CPU + 40C Metal 64 GB LPDDR5X (286.5 GB/s BW) 169.40 (pp512) 27.00 tok/s (llama-bench tg128) 20.70 – 23.60 tok/s (llama-server, 0 swapouts) @notactuallytreyanastasio (dsv4-m5max.md)
Apple M4 Max (16C CPU + 40C GPU) 16C (ARM64 NEON + 40C Metal) 64 GB LPDDR5X-8533 (238.9 GB/s BW) ~451.0 (Audit) 49.2 – 57.7 tok/s (Prose / Code) 70.9 – 120.0 tok/s (Agent / Refactor) @jbeckman1974 (Issue #8)
Apple M4 Pro (14-Core SoC) 14C CPU + 20C Metal 24 GB Unified (0 Swap) 256.0 – 549.0 47.0 – 48.0 tok/s (128K) 49.0+ tok/s @jarorosFork (apple-silicon/)
AWS Graviton3 m7g.2xlarge (ARM64 Neoverse-V1) 8 vCPU (32 MB L3, SVE-256) 31 GB DDR5 (0 GPU) 101.67 (-t 8) 41.05 tok/s (C++20) 44.97 tok/s (Refactoring) @gerchik (Issue #2)
AMD EPYC 7402P (Zen 2 Rome Β· AVX2-only) 24C/48T (8 CCDs, 128 MB L3) 128 GB 8-Ch DDR4 (0 GPU) 158.73 (-t 24) 27.29 tok/s (C++20, 567 ms TTFT) 31.22 tok/s (Cold Run 1, 66.7% acc) @AdamKlob (Issue #6)
AMD Ryzen 9 9950X (Zen 5 Desktop) 16C/32T (2 CCDs, 64 MB L3) 64 GB DDR5-6800 (0 GPU) 135.64 (v2.1 Q4_0) 20.78 tok/s (C++20, 526 ms TTFT) 24.67 tok/s (Cold Run 1, 66.5% acc) @nadams (Issue #5)
AMD Ryzen 7 8745H w/ Radeon 780M (Zen 4) 8C/16T (16 MB L3, AVX-512) 96 GB DDR5-5600 (0 GPU, Arch) 128.81 (-t 8) 19.48 tok/s (C++20, 686 ms TTFT) 23.38 tok/s (69.8% PVS acc) @arch-btw (Issue #9)
AMD Ryzen 5 5600X (Zen 3 Desktop Β· Fractal-64) 6C/12T (32 MB L3, AVX2) 32 GB DDR4-3200 (XMP/DOCP, 0 GPU) 63.90 (2MB THP) 19.04 tok/s (C++20, 1070 ms TTFT) 21.58 tok/s (65.3% PVS acc) @alexander-jung (Issue #17)
AMD Ryzen 7 5700X (Zen 3 Desktop Β· Q4_0) 8C/16T (32 MB L3, AVX2) 64 GB DDR4-3600 (0 GPU, Ubuntu 26.04) 101.93 (-t 8) 16.04 tok/s (C++20, 856 ms TTFT) 19.66 tok/s (67.9% PVS acc) @germanpsycho (Issue #23)
AMD Ryzen 5 5600X (Zen 3 Desktop Β· Q4_0) 6C/12T (32 MB L3, AVX2) 32 GB DDR4-3200 (XMP/DOCP, 0 GPU) 86.96 (88.77 w/ THP) 14.95 tok/s (C++20, 968 ms TTFT) 18.07 tok/s (64.5% PVS acc) @alexander-jung (Issue #17)
Intel Core Ultra 5 125H (Meteor Lake-H) 4P+8E+2LP-E (18 MB L3, AVX-VNNI, LP-E excl.) 32 GB DDR5 (50.2 GB/s, 0 GPU) 55.19 (-t 12; 60.53 on 4P) 14.63 tok/s (C++20, 1313 ms TTFT) 16.61 tok/s (67.9% PVS acc) @xma (Issue #18)
AMD Ryzen 5 7430U (Zen 3 Mobile 15W) 6C/12T (16 MB L3, AVX2) 32 GB DDR4-3200 (0 GPU, Pop!_OS) 59.03 (-t 6) 13.03 tok/s (C++20, 2072 ms TTFT) 15.57 tok/s (68.3% PVS acc) @armadillu (Issue #12)
AMD Ryzen 7 PRO 6850U (ThinkPad T14s Gen 3) 8C/16T (16 MB L3, AVX2) 32 GB LPDDR5-4800 (0 GPU, Debian 13) 62.74 (-t 8) 12.61 tok/s (C++20, 1204 ms TTFT) 14.67 tok/s (66.0% PVS acc) @mkesper (Issue #15)
AMD Ryzen 7 5700U (Zen 2 Mobile 15W Β· Q4_0) 8C/16T (8 MB L3, AVX2) 64 GB DDR4 (0 GPU, Debian) 43.93 (v2.4 -t 8) 13.04 tok/s (C++20, 1722 ms TTFT) 14.48 tok/s (66.5% PVS acc) @JamesStallings (#10 β†’ #20)
AMD Ryzen 7 5700U (Zen 2 Mobile 15W Β· Fractal-64) 8C/16T (8 MB L3, AVX2) 64 GB DDR4 (0 GPU, Debian) 32.48 (v2.1 Fractal-64) 13.55 tok/s (C++20, 2233 ms TTFT) 13.52 tok/s (64.9% PVS acc) @JamesStallings (Issue #19)
Intel Core i9-11950H (Tiger Lake-H) 8C/16T (24 MB L3, AVX-512) 128 GB DDR4-3200 (0 GPU, Fedora) 85.39 (-t 8) 10.76 tok/s (C++20, 1106 ms TTFT) 13.37 tok/s (69.8% PVS acc) @ELO-I (Issue #11)
Dual Intel Xeon E5-2670 (Sandy Bridge-EP 2012) 16C/32T (2Γ—20 MB L3, AVX-only) 94 GB RAM (0 GPU, Ubuntu 24.04) 47.31 (-t 16) 10.69 tok/s (C++20, 2014 ms TTFT) 11.47 tok/s (65.0% PVS acc, 3.0x floor) @Mammux (Issue #14)
AMD Ryzen 5 2600X (Zen+ Desktop Β· Q4_0) 6C/12T (16 MB L3, AVX2) 32 GB DDR4-3200 (29.4 GB/s, Win11+WSL2) 21.06 (-t 6) 7.60 tok/s (C++20) 10.42 tok/s (68.9% PVS acc) @lawsochi (Issue #26)
Windows 11 Hybrid (i9-9900K + RTX 2080 Ti 11GB) 8C/16T (16 MB L3) + 11 GB CUDA 16 GB DDR4 + 11 GB GDDR6 Auto CUDA 12.4 50–58 tok/s (14B) / 30B Hybrid 100+ tok/s (Nemotron-H-8B 128K) windows/
AMD Ryzen 7 8745HS (GEEKOM A8) 8C/16T (16 MB L3) 64 GB DDR5-5600 Verified Fedora 44 Verified (ngram) Verified (CPU & 780M) @jarorosFork (fedora/)
DeepSeek-V4-Flash 284B on Ryzen 9 9955HX 16C/32T (2 CCDs, 64 MB L3) 64 GB DDR5 (58.9 GiB RSS @ 256K) 43.16 – 44.36 tok/s (32.6 ms Slot-0) 9.06 – 10.74 tok/s (13.17B active) 11.50 – 14.69 tok/s (94.5% PVS acc) @synchopate (docs/DEEPSEEK_V4_OPTIMIZATIONS.md)
DeepSeek-V4-Flash 284B on Ryzen 7 9800X3D (Win11) 8C/16T (96 MB 3D V-Cache, AVX-512) 64 GB DDR5 (56.56 GiB Fractal, 1M ctx) 21.30 – 22.60 tok/s (pp512) 6.35 – 8.04 tok/s (Top-6 / Top-4 tg128) 8.04+ tok/s (Native Win11, 1M ctx verified) @MR1KRAKEN (PR #27, Issue #28)
Repository Structure & Manual CMake Build Instructions
llama-modchip/
β”œβ”€β”€ modchip                                    # Unified CLI (setup | start | chat | bench | eval | quantize | web | claude | stop)
β”œβ”€β”€ install.sh                                 # Automated Installer (Linux)
β”œβ”€β”€ README.md / ARCHITECTURE.md / FAQ.md       # Overview, Full Mathematical Paper & Engineering FAQ
β”œβ”€β”€ RELEASE_NOTES.md                           # v2.4.0 Release Notes
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ NEMOTRON_OPTIMIZATIONS.md              # Deep-dive on Nemotron-3.5-30B-A3B & Nemotron-H-8B optimizations
β”‚   β”œβ”€β”€ DEEPSEEK_V4_OPTIMIZATIONS.md           # Deep-dive on DeepSeek-V4-Flash 284B profiling, SVD & L2-quadrature MoE
β”‚   β”œβ”€β”€ HARDWARE_OPTIMIZATIONS.md              # Chip-by-chip optimizations (Zen 5, Threadripper, Vulkan, CUDA, Metal, ARM64)
β”‚   └── WINDOWS_PORT.md                        # Native Windows 11 patched-engine build & Ryzen 7 9800X3D 1M-context report
β”œβ”€β”€ patches/
β”‚   β”œβ”€β”€ apple-silicon/                         # Apple Silicon engine patches (Fractal-64 Q2_0 NEON/Metal, host-ptr run mapping, register unpack)
β”‚   β”œβ”€β”€ deepseek-v4-flash-fractal-256k.patch   # Unified v2.4.0 patch (DeepSeek-V4-Flash 284B + Nemotron-3.5 30B, Linux/macOS/Windows)
β”‚   β”œβ”€β”€ dsv4-64gb-cpu.patch                    # DeepSeek-V4-Flash 284B CPU engine patch (llama.cpp d2f83055 base)
β”‚   └── zen5-nemotron-256k-optimizations.patch # Standalone ggml/llama core patch for Nemotron-3.5
β”œβ”€β”€ windows/                                   # Windows 10/11 Hybrid GPU+CPU MoE Pack (AVVIA_MODCHIP.bat, modchip_win.ps1)
β”œβ”€β”€ apple-silicon/                             # Apple Silicon M4/M5 setup scripts (build-dsv4-engine.sh, run-dsv4.sh, M5 Max benchmarks & docs)
β”œβ”€β”€ fedora/                                    # Fedora 44 / AMD Ryzen 7 8745HS (GEEKOM A8) all-in-one script
β”œβ”€β”€ speculative/                               # RouteCrack + Stockfish-PVS v2 (rc_stockfish.h, ngram-map.cpp)
β”œβ”€β”€ benchmarks/                                # eval_quality_and_tools.py (100-pt Quality Gate) & results/*.json
β”œβ”€β”€ gateway/sse_gateway.py                     # Agentic SSE Proxy + Compact Tool Table + Dark-Mode Web Chat HUD (:8787)
└── scripts/                                   # build_fractal_moe_gguf.sh, transcode_dsv4.{c,py}, chat.py, llama_modchip.py