Spark-X2.6-4B RCO 3.52 bpw (exact packed GGUF)

Experimental, mixed-precision RCO quantization of XHToken/Spark-X2.6-4B, packed as GGUF with bit-exact RCO codes (no BF16 dequantization step).

This GGUF uses non-standard GGML types RCO2 (43), RCO3 (44), and RCO4 (45). It does not load in stock llama.cpp. Use the patched llama.cpp v0.6.0 runtime included in runtime/, or merge runtime/llama.cpp-v0.6.0-rco.patch into the same upstream version.

Model summary

Item Value
Base model XHToken/Spark-X2.6-4B
Parameters 4.11 B
Quantized parameters 3.775 B
Average linear weight bits 3.521 bpw
Bit distribution 11 x 2-bit, 58 x 3-bit, 111 x 4-bit
GGUF file size 2.291 GiB (2,459,476,672 bytes)
Effective bpw incl. BF16 embedding/norms 4.540
Group size 128
Native context 1,048,576 tokens (model metadata)
Patched runtime default context 32,768 tokens
License Apache-2.0 (base model license)

The quantized linears are stored as RCO2, RCO3, or RCO4. Embedding, norms, and other non-quantized tensors remain BF16/F32. Output embeddings are tied, so the LM head uses the BF16 token embedding and does not need an RCO kernel.

Quick start

1. Build the patched runtime

The patch is against upstream llama.cpp tag v0.6.0:

git clone --depth 1 --branch v0.6.0 https://github.com/ggml-org/llama.cpp
cd llama.cpp
patch -p1 < /path/to/this/repo/runtime/llama.cpp-v0.6.0-rco.patch

# CPU
cmake -B build-cpu -DGGML_CUDA=OFF -DGGML_VULKAN=OFF -DCMAKE_BUILD_TYPE=Release
cmake --build build-cpu -j --target llama-cli llama-server llama-bench llama-perplexity

# AMD ROCm/HIP, adjust GPU_TARGETS for your GPU
cmake -B build-rocm -DGGML_HIP=ON -DGPU_TARGETS=gfx1200 \
  -DGGML_CUDA=OFF -DGGML_VULKAN=OFF -DLLAMA_CURL=OFF -DCMAKE_BUILD_TYPE=Release
cmake --build build-rocm -j --target llama-cli llama-server llama-bench llama-perplexity

See runtime/README.md for details and patch contents.

2. Run

./build-rocm/bin/llama-cli \
  -m spark-x2.6-4b-rco-3.52bpw-exact.gguf \
  -ngl 99 -c 4096 -n 1024 -t 8 \
  --jinja --temp 0.7 --reasoning-budget 512 \
  -p "Write a short explanation of mixed-precision quantization."

For CPU, replace -ngl 99 with -ngl 0 and use the CPU build.

3. Server

./build-rocm/bin/llama-server \
  -m spark-x2.6-4b-rco-3.52bpw-exact.gguf \
  -ngl 99 -c 4096 -t 8 \
  --jinja --temp 0.7 --reasoning-budget 512 \
  --host 0.0.0.0 --port 8080

Thinking / reasoning behavior

Spark-X2.6 is a reasoning model. With --jinja, thinking is enabled by default and consumes the same -n token budget as the final answer.

Recommended settings:

# No thinking: fastest, direct answer.
--reasoning-budget 0 -n 256 --temp 0.7

# Thinking enabled, with a hard cap and room for the answer.
--reasoning-budget 512 -n 1024 --temp 0.7

# Longer reasoning.
--reasoning-budget 1024 -n 2048 --temp 0.7

Avoid --temp 0 or near-zero temperatures while thinking is enabled. In this 3.52 bpw build, greedy decoding can enter a blank/newline loop before reaching the end of the thinking block. Use --reasoning-budget 0 for deterministic short answers, or --temp 0.7 when thinking is enabled.

If generation stops without an answer, the -n budget was exhausted by the thinking block. Increase -n or lower --reasoning-budget. This is not a model load failure.

Quantization

This release uses the RCO (Riemannian Constrained Optimization) mixed-precision pipeline from IST-DASLab/RCO:

  1. Build a multi-bitwidth GPTQ/FastOBQ database for 2/3/4-bit weights.
  2. Run a budget-constrained RCO search over layer bitwidths.
  3. Pack the selected 2/3/4-bit codes directly into GGUF RCO2/3/4 blocks.
  4. Load and execute the packed codes directly on CPU or GPU without a BF16 copy.

Calibration data: Wikitext-2, 36 layers x 64 samples x 512 tokens.

RCO block format

Every 128 weights:

  • d: BF16 scale (2 bytes)
  • z: BF16 zero point (2 bytes)
  • codes: 128 packed 2/3/4-bit integer codes
  • dequantization: y = d * (q - z)
GGML type Block size Stored bytes Effective bpw
RCO2 128 36 2.25
RCO3 128 52 3.25
RCO4 128 68 4.25

The exact per-layer assignment is in metadata/layer_bitwidths.csv and metadata/assign_3.5.json.

Evaluation

Perplexity

Lower is better. The two evaluation setups use different runtimes and should not be compared across rows without noting the method.

Measurement PPL Setup
Base model, HF 41.1354 Wikitext-2, 64 x 512, CPU
This model, HF fake-quant 50.2458 Wikitext-2, 64 x 512, CPU
Base BF16 GGUF 46.3109 llama.cpp, 16 x 512
This GGUF, CPU 57.7329 llama.cpp, direct RCO dot, 16 x 512
This GGUF, ROCm/HIP 58.5095 llama.cpp, native multi-column RCO MMVQ, 16 x 512
BF16-dequant RCO GGUF 58.0960 llama.cpp, 16 x 512

The HF PPL increases from 41.14 to 50.25 (1.22x). The llama.cpp PPL increases from 46.31 to 58.51 (1.26x). The native GPU result closely matches the CPU direct-RCO result, confirming that the HIP dot kernels preserve the packed weights.

Speed and memory

Measured on an AMD Radeon RX 9060 XT 16 GB (gfx1200), ROCm 7.x, llama-bench -ngl 99 -p 512 -n 128 -t 8 -r 3:

GGUF pp512 (t/s) tg128 (t/s) Approx. VRAM
Base BF16 560.46 34.98 ~7.98 GB
RCO, BF16-dequant 559.16 34.99 ~7.98 GB
This exact RCO GGUF 622.88 92.23 ~2.5 GB

Interpretation:

  • Generation is about 2.6x faster than the BF16-dequant version because the packed weights use much less memory bandwidth.
  • VRAM use is about 3x lower.
  • Prompt processing is now about 11% faster than the BF16 baseline: 622.88 vs 560.46 pp512. The multi-column RCO MMVQ kernel decodes each weight block once for 8 Q8_1 columns and uses DP4A on gfx1200. At pp2048 it reaches 618.47 t/s, versus 558.44 t/s for BF16 at the same prompt length.
  • Prompt batches are still split into 8-column chunks and HIP graph capture is disabled for those RCO matmuls. A 16/32-column or MMQ tile path is future work.

CPU memory, default 32k context: about 3.8 GB RSS for the model, context, and compute buffers. With -c 512 on GPU, the model + KV + compute buffers are about 2.5 GB.

Raw benchmark logs are in metadata/benchmarks/. The machine-readable summary is metadata/final_summary.json.

Limitations

  • Custom runtime required. Upstream llama.cpp does not know types 43/44/45. A stock build will reject the file or report an unknown tensor type.
  • This is a lossy 3.52 bpw quantization, not the original BF16 model. PPL is roughly 22-26% higher depending on the evaluation setup, and instruction following, code, long-form writing, and multilingual quality can degrade.
  • Turkish quality is weak in this build, consistent with the quantization evaluation. Prefer the base model when Turkish quality matters.
  • Thinking can be verbose. Use --reasoning-budget to bound it. Avoid --temp 0 while thinking is enabled.
  • GPU benchmark numbers are hardware-specific. The RX 9060 XT / ROCm result is not a guarantee for NVIDIA, other AMD GPUs, or CPU-only systems.
  • Prompt batching is chunked at 8 columns. This is fast on the RX 9060 XT, but HIP graph capture is disabled for RCO matmuls above 8 columns. Other GPUs may need different tuning.
  • Not safety-tuned for high-stakes use. Outputs can be incorrect, biased, or hallucinated. Do not use for medical, legal, financial, or safety-critical decisions without human review.

Files

Path Description
spark-x2.6-4b-rco-3.52bpw-exact.gguf Main model, bit-exact packed RCO GGUF
runtime/llama.cpp-v0.6.0-rco.patch Runtime patch for llama.cpp v0.6.0
runtime/README.md Build and runtime notes
docs/USAGE.md Usage, thinking control, server examples
docs/QUANTIZATION.md RCO format and quantization details
docs/RAPOR.tr.md Full Turkish technical report
docs/RELEASE_NOTES.md Release contents and known issues
metadata/final_summary.json Machine-readable results
metadata/assign_3.5.json Per-layer bitwidth assignment
metadata/layer_bitwidths.csv Readable bitwidth table
metadata/benchmarks/ Raw PPL and llama-bench logs
tokenizer/ Original tokenizer/template files for reference
SHA256SUMS Checksums for release files

The tokenizer and chat template are embedded in the GGUF; the tokenizer/ copy is provided for inspection and tooling.

License and attribution

The base model is licensed Apache-2.0 by the SparkLLM team. This quantized artifact is distributed under the same license; see LICENSE.

The llama.cpp runtime patch is derived from llama.cpp, which is MIT licensed; see runtime/LICENSE.llama.cpp. The RCO reference implementation is Apache-2.0.

You are responsible for complying with the base model license and any applicable usage restrictions.

Citation

@misc{sparkx2.6,
  title  = {Spark-X2.6-4B: Advancing the Frontier of On-Device Agents for Real-World Tasks},
  author = {SparkLLM Team},
  year   = {2026}
}

@article{helcig2026rco,
  title   = {Model Compression with Exact Budget Constraints via Riemannian Manifolds},
  author  = {Helcig, Michael and Alistarh, Dan},
  journal = {arXiv preprint arXiv:2605.00649},
  year    = {2026}
}

Türkçe özet

Spark-X2.6-4B'nin 3.521 bpw ortalama ile RCO kuantizasyonu. 180 lineer katman 11 x 2-bit, 58 x 3-bit ve 111 x 4-bit olarak paketlendi; ağırlıklar BF16'ya açılmadan doğrudan RCO kodlarıyla çalışıyor. GGUF 2.29 GiB. CPU PPL 57.7329, ROCm/HIP PPL 58.5095 (16 x 512). RX 9060 XT üzerinde pp512 622.88 t/s, pp2048 618.47 t/s, tg128 92.23 t/s, yaklaşık 2.5 GB VRAM.

Önemli: Bu dosya standart llama.cpp ile açılmaz. runtime/ altındaki llama.cpp v0.6.0 yamasını uygulayın. Düşünme açıkken --temp 0 kullanmayın; --reasoning-budget 0 ile düşünmeyi kapatabilir veya --reasoning-budget 512 -n 1024 --temp 0.7 ile sınırlayabilirsiniz. Kalite kaybı ve Türkçe zayıflığı nedeniyle yüksek riskli kullanımlar için uygun değildir.

Downloads last month
34
GGUF
Model size
4B params
Architecture
spark2_5
Hardware compatibility
Log In to add your hardware

We're not able to determine the quantization variants.

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for efeisot/spark-x2.6-4b-rco-3.52bpw

Quantized
(71)
this model

Collection including efeisot/spark-x2.6-4b-rco-3.52bpw

Paper for efeisot/spark-x2.6-4b-rco-3.52bpw