Downloads · 30 days
92
29% of all-time downloads
nanash66/Spark-X2.5-4B-ROCmFP4-STRIX_LEAN-GGUF
Spark-X2.5-4B-ROCmFP4-STRIX_LEAN-GGUF is a text generation model from nanash66. Use it when you need the model to write or continue text. It is set up for gguf. The card lists the license as apache-2.0.
High-efficiency ROCmFP4 quantization of XHToken/Spark-X2.5-4B to the ROCmFPX GGUF family, hardware-tuned for AMD Strix Point (Ryzen AI 9 HX 370 / Radeon 890M / gfx1150) and AMD Strix Halo (Ryzen AI Max / gfx1151).
Downloads · 30 days
92
29% of all-time downloads
All-time downloads
320
Public
Repo size
2.3 GB
Likes
0
Public
Click a slice to open those files.
.gguf2.3 GB · 100%
From the Hugging Face model README
High-efficiency ROCmFP4 quantization of XHToken/Spark-X2.5-4B to the ROCmFPX GGUF family, hardware-tuned for AMD Strix Point (Ryzen AI 9 HX 370 / Radeon 890M / gfx1150) and AMD Strix Halo (Ryzen AI Max / gfx1151).
[!WARNING] Runtime Requirement: This GGUF runs ONLY on the ROCmFPX llama.cpp fork with
spark2_5architecture support (upstream port PR #113). Stock llama.cpp, Ollama, and LM Studio cannot load it. The HF/GGUF automated parser does not recognise ROCmFP4 quant enums and may mislabel this file as "F16" — the real format isQ4_0_ROCMFP4_STRIX_LEAN(4.39 BPW).
[!IMPORTANT]
🚨 Critical Execution Guidelines for Spark-X2.5 (SWA Architecture)
Spark-X2.5 features Hybrid Attention (3 Sliding-Window Attention : 1 Full Attention, SWA window = 512 tokens). When deploying on
llama-server, you MUST apply the following flags:
- Disable RAM Checkpoint Restores (
--cache-ram 0 --ctx-checkpoints 0):
Upstreamllama-serverhas a known limitation with rolling SWA contexts during slot checkpoint restores (llama.cpp#24411). Disabling RAM checkpoints prevents Attention state corruption, slot crashes, and infinite\ngeneration loops.- Cap Output Tokens (
max_tokens: 1024or2048):
As a 4B reasoning model, Spark-X2.5 may enter recursive deliberation loops (<think>) when presented with complex multi-step prompts. Setting a reasonable output token limit in API payloads prevents runaway thinking loops and forces the model to synthesize the final answer /<tool_call>promptly.- Use Adapted Chat Template:
Use a Jinja chat template withenable_thinking = default(false)to ensure clean OpenAI function calling without role tag syntax errors.
Tested on AMD Ryzen AI 9 HX 370 (Radeon 890M, 16 CUs, ROCm 7.2 Native HIP) with Flash Attention (-fa on) and Q8_0 KV Cache:
llama-bench)| Metric | Measurement | Notes |
|---|---|---|
Prompt Processing (pp2048) | 🏆 661.32 tok/s | Cold TTFT: approx. 810 ms |
| Warm Prefix Cache Processing | 🚀 >4,900 tok/s | Warm TTFT: approx. 0 ms (>100x speedup) |
Text Generation (tg128) | ⚡ 26.88 tok/s | Fast and responsive decode |
| VRAM Footprint (32K Context) | 🧠 approx. 2.8 GiB | Model weights (2.11 GB) + Q8 KV Cache (0.7 GB) |
tool-eval-bench)Evaluated using the standard tool-eval-bench agentic evaluation framework:
| Test Suite | Score | Total Points | Completion Rate | Median Turn Latency | Total Duration |
|---|---|---|---|---|---|
| Core Suite (15 Scenarios, Seed 42) | 🏆 97 / 100 (★★★★★) | 29 / 30 (96.7%) | 100% | 5.1 s | 4.2 min |
| Full Comprehensive Suite (69 Scenarios, Seed 42) | 🏆 83 / 100 (★★★★) | 115 / 138 (83.3%) | 100% (0 crashes/hangs) | 7.0 s | 29.1 min |
100% (6/6)100% (6/6)100% (6/6)100% (6/6)100% (6/6)100% (6/6)88% (7/8)85% (17/20)83% (5/6)83% (5/6)83% (10/12)83% (5/6)80% (8/10)75% (6/8)62% (16/26)| File | Size | Notes |
|---|---|---|
Spark-X2.5-4B-Q4_0_ROCMFP4_STRIX_LEAN.gguf | 2.26 GB (2,260,702,112 bytes) | Single file, GGUF model weights |
Spark-X2.5-4B-Q4_0_ROCMFP4_STRIX_LEAN.imatrix | 3.57 MB | Importance matrix used for this quant (see below) |
spark_chat_template.jinja | 4.89 KB | Adapted robust Jinja template for OpenAI Function Calling & Thinking controls |
SHA256 (Spark-X2.5-4B-Q4_0_ROCMFP4_STRIX_LEAN.gguf):
f3c3a526d5ef7b8e249ca1b1a092878d047bfefc9e3cb432d21643452cf94699
XHToken/Spark-X2.5-4B-GGUF (Spark-X2.5-4B.gguf, 8.23 GB, verified true BF16)Q4_0_ROCMFP4_STRIX_LEAN — 2150.83 MiB, 4.39 bits per weight (smallest-footprint Strix recipe)Q4_0_ROCMFP4 ×36 — fused attn_qkv of every block (dual per-16 scale, Strix attn-K/V quality)Q4_0_ROCMFP4_FAST ×180 — attn_gate, attn_output, ffn_gate/up/downF32 ×73 — all normsQ5_K ×1 — token_embd (tied embeddings)llama-imatrix over approx. 29K tokens sampled from eaddario/imatrix-calibration covering tools_medium, code_medium, and combined_th_small Thai calibration).| Property | Value |
|---|---|
| Model | Spark-X2.5-4B (Dense 4.112B) |
| Architecture | spark2_5 — Hybrid Attention 3×SWA (window 512) : 1×Full, GQA 16/4 heads, head_dim 256 |
| Context Window | 1,048,576 tokens (max_position_embeddings) |
| Vocabulary | 131,072 (tied embeddings), BPE (tokenizer.ggml.pre = spark2_5) |
| Behavior | Thinking model — emits <think>…</think> reasoning before the answer |
| License | Apache-2.0 |
# For Strix Point (Radeon 890M / gfx1150)
$env:HSA_OVERRIDE_GFX_VERSION = "11.5.0"
# (Use "11.5.1" for Strix Halo / gfx1151)
$env:GGML_CUDA_FORCE_MMQ = "1"
$env:PATH = "C:\Program Files\AMD\ROCm\7.2\bin;" + $env:PATH
llama-server.exe `
-m "Spark-X2.5-4B-Q4_0_ROCMFP4_STRIX_LEAN.gguf" `
--port 8085 `
-ngl 99 `
-fa on `
-c 32768 `
-np 1 `
-ctk q8_0 -ctv q8_0 `
-b 2048 -ub 512 `
--cache-ram 0 `
--ctx-checkpoints 0 `
--cache-prompt `
--jinja
docker run -d --name rocmfpx-serve --restart unless-stopped \
--device /dev/kfd --device /dev/dri \
--group-add "$(getent group render | cut -d: -f3)" \
--group-add "$(getent group video | cut -d: -f3)" \
-p 8085:8085 -v /models:/models:ro \
-e HSA_OVERRIDE_GFX_VERSION=11.5.0 \
-e GGML_HIP_ENABLE_UNIFIED_MEMORY=1 \
rocmfpx:server \
-m /models/Spark-X2.5-4B-Q4_0_ROCMFP4_STRIX_LEAN.gguf \
-ngl 99 -fa on -c 32768 -np 1 \
-ctk q8_0 -ctv q8_0 \
-b 2048 -ub 512 \
--cache-ram 0 --ctx-checkpoints 0 \
--cache-prompt --jinja
This is an independent passion project to make local AI run smoothly and fast on AMD hardware. If this ROCmFP4 quantization, the benchmark data, or the SWA execution recipe helped you out or saved you some troubleshooting time, feel free to buy me a cup of coffee! ☕
bc1pm9yqcj5m5jv3jzxkhv4uvrgl2weyq46m2jlzufzyfwyr4fmv8gwq548kw6Every satoshi fuels more late-night tinkering, kernel debugging, and model testing!
Special thanks to the open-source community, researchers, and engineers whose tools and repositories made this native AMD quantization and evaluation possible:
XHToken/Spark-X2.5-4B-GGUF — Official baseline BF16 GGUF used for quantization.spark2_5 hybrid attention graph construction and pre-tokenizer from ggml-org/llama.cpp#27868.llama-imatrix multi-domain importance sampling.gfx1150 and gfx1151.