Robots Atlas>ROBOTS ATLAS
Inference

Fractal-64

2026ExperimentalPublished: 9 November 2026Updated: 9 November 2026Published
Key innovation
A block-64 (QK2_0 = 64) two-level non-linear Q2_0 weight-quantization format (~3.75 bits per weight) that quantizes MoE expert tensors whose dimensions are not divisible by 256 โ€” where standard llama.cpp K-/I-quants fall back to Q4_0 โ€” while fusing sub-scale multiplication into a single AVX2 vpmaddwd instruction.
Category
Inference
Abstraction level
Pattern
Operation level
InferenceServingDeployment
Use cases
Quantizing MoE expert tensors whose dimensions are not divisible by 256CPU inference of large MoE models (e.g. Nemotron-3.5-30B-A3B, DeepSeek-V4-Flash 284B) on memory-constrained machinesTranscoding dense MLA and indexer tensors in DeepSeek-V4-Flash to ~3.75 bpwShrinking GGUF file size and VmRSS while preserving quality (100/100 Quality Gate)

How it works

A block (block_q2_0, 30 bytes) encodes 64 weights in an 8ร—8 hierarchy: one FP16 master scale (d) and eight 4-bit sub-scales, one per 8-weight sub-block โ€” twice the spatial resolution of Q3_K/MXFP4 (one sub-scale per 16โ€“32 weights). The raw 4-bit sub-scale codes {0..15} are shifted into a positive window mult = 4 + sc โˆˆ {4..19}, which removes "dead" codes and boosts sub-scale resolution by ~31% at zero bit overhead. The weights themselves are non-linear 3-bit indices decoded through a LUT {-14,-8,-4,-1,+1,+4,+8,+14} via VPSHUFB. The key performance trick: sub-scale multiplication is fused into a single AVX2 vpmaddwd instruction (_mm256_madd_epi16(p01, vmult01)) instead of multiplying by ones, while bit unpacking uses single-cycle variable shifts (_mm256_sllv/srlv_epi32) and _MM_HINT_NTA streaming that bypasses the L3 cache. The dot_q2_0_q8_0 kernel drops from 86.5 ms to 55.8 ms per 10M blocks (+55%). Files are built by build_fractal_moe_gguf.sh (fractal64 profile from BF16 weights); the attention/SSM/output trunk stays in Q8_0.

Problem solved

The inner dimensions of MoE experts (e.g. 1856 = 29ร—64 and 2688 = 42ร—64 in Nemotron-3.5-30B-A3B) are not divisible by QK_K = 256, so standard sub-4-bit K-quants and I-quants in llama.cpp (Q3_K, IQ3_S, IQ3_XXS) lose alignment and fall back to Q4_0 (4.50 bpw). Fractal-64 splits those tensors into blocks of 64 (with zero fallback tensors), reaching ~3.75 bpw while preserving quality (100/100 on the Nemotron-3.5 Quality Gate) and cutting GGUF size and RAM use, enabling large-MoE inference on memory-constrained CPUs.

Components

block_q2_0 (GGML_TYPE_Q2_0, 30 B / 64 weights)Quantized-weight storage unit

Block layout: ggml_half d (FP16 super-block scale, 2 B), scales[4] (eight 4-bit sub-scales, 4 B), qs[16] (lower 2 bits of 64 indices), qh[8] (upper 1 bit of 64 indices). sizeof == 30 bytes โ†’ ~3.75 bits per weight. GGML type id: 40.

8ร—8 hierarchy (64 super-block, 8-weight sub-blocks)Two-level block scaling

A 64-weight super-block split into 8 sub-blocks of 8 weights, with one 4-bit sub-scale per sub-block. It breaks the "QK_K = 256 geometry trap" (1856 = 29ร—64, 2688 = 42ร—64) and doubles the spatial resolution of local-outlier capture versus Q3_K/MXFP4.

Shifted positive sub-scale window (mult = 4 + sc โˆˆ {4..19})Sub-scale encoding

The raw 4-bit sub-scale code sc โˆˆ {0..15} is shifted to mult = 4 + sc โˆˆ {4..19} to eliminate the dead codes {0..3} and raise effective sub-scale resolution by ~31% at zero bit cost.

Official

Non-linear 3-bit LUT + dot_q2_0_q8_0 kernelSIMD decode & compute

Weights are 3-bit non-linear indices decoded via the table {-14,-8,-4,-1,+1,+4,+8,+14} through VPSHUFB. The dot_q2_0_q8_0 dot-product kernel fuses sub-scale multiplication into a single AVX2 vpmaddwd instruction and uses variable shifts _mm256_sllv/srlv_epi32 โ€” a +55% speedup (86.5 ms โ†’ 55.8 ms per 10M blocks).

Implementation

Implementation pitfalls
Runtime incompatibility ("unknown tensor type 40")High

Fractal-64 files use the custom GGML_TYPE_Q2_0 (id 40) and deepseek4/Stockfish-PVS kernels. Unpatched llama.cpp, Ollama and LM Studio reject them with "unknown tensor type 40".

Fix:Use the patched binary (./modchip or the standalone llama-server-modchip-linux-x86_64 from the Hugging Face repos / Release v2.4.0).
Quantizing from already-quantized weightsMedium

The fractal64 profile is designed to transcode from BF16 master weights. Building from an already-quantized Q4_0 (as the mxfp4 profile does) does not exploit the full information of the original.

Fix:For the fractal64 profile, use a BF16 input (--profile fractal64 --input bf16.gguf).

Evolution

2026
Fractal-64 introduced in llama-modchip (v2.1)
Inflection point

Block-64 Q2_0 (3.75 bpw) for the "cold" routed-MoE experts in NVIDIA-Nemotron-3.5-30B-A3B; GGUF 17.59 โ†’ 14.35 GiB, 100/100 Quality Gate.

2026
Extended to DeepSeek-V4-Flash 284B (v2.4.0)

Transcoding dense MLA and indexer tensors (attn_q_b, attn_output_a/b, compressors) to block_q2_0; GGUF 76.87 โ†’ 56.56 GiB, fitting a 284B MoE in 64 GB RAM.

Hyperparameters (configurable axes)

Block size (QK2_0)Critical

Weights per super-block. Fixed at 64 in Fractal-64 (8 sub-blocks of 8 weights).

64
Bits per weightHigh

Effective bits per weight from 30 bytes per 64-weight block.

3.75
Sub-block sizeMedium

Number of weights per 4-bit sub-scale.

8
Trunk precision (attention/SSM/output)Medium

GQA attention layers, ssm_out and output.weight stay in Q8_0, outside Fractal-64 quantization.

Q8_0

Computational complexity

Space complexity: ~3.75 bpw (30 B / 64 weights).

Compute bottleneck

Memory bandwidth (weight streaming)

CPU decode is memory-bandwidth bound โ€” the format cuts the bytes of weights streamed per token (~3.75 bpw) and isolates the L3 cache via _MM_HINT_NTA, which directly lifts decode throughput.

Execution paradigm

Primary mode
Dense

The mode refers to weight-block encode/decode, not to model-level sparsity.

Activation pattern
All paths active
Routing mechanism

Fractal-64 is a weight-encoding format (a dense block), not a routing mechanism. It is, however, applied primarily to routed-MoE expert tensors and to MLA tensors.

Hardware requirements

Primary

The format is built for CPU inference: the dot_q2_0_q8_0 kernel uses AVX2/AVX-512 (variable shifts _mm256_sllv/srlv_epi32, sub-scale fusion in vpmaddwd) and _MM_HINT_NTA cache isolation. The block-64 geometry fits CPU L1D/L2 caches.

Limited

Fractal-64 is a CPU-first format (3.75 bpw). GPU acceleration in the project targets mainly the sibling Fractal-MXFP4 format (native Vulkan shaders), not Fractal-64.