CoolFace
Modelpublic

JANGQ-AI/Spark-X2.5-4B-JANG_8M

sourceHugging Faceapache-2.0updated 18d agoView on Hugging Face
1likes469downloads
Model Card

<p align="center"> <img src="./jangq-logo.png" alt="JANGQ" width="220"> </p>

<p align="center"> <a href="https://vmlx.net"><img src="vmlx-app.png" alt="vMLX — run JANG models on Apple Silicon" width="820"></a> </p>

<h3 align="center">⚡ All JANG models are meant to be run in <a href="https://vmlx.net">vMLX</a></h3>

JANGQ-AI/Spark-X2.5-4B-JANG_8M

Spark-X2.5-4B at 4.07 GiB — median KL 0.0017 and 98.72% top-1 against the bf16 source. The fidelity-first bundle of the pair.

A JANG bundle of XHToken/Spark-X2.5-4B — a 4.112B dense reasoning + tool-use model — quantized for Apple Silicon / MLX. Every quantizable tensor is 8-bit with bfloat16 group scales; the per-head attention gate and all norms stay in full precision.

Sibling bundle: OsaurusAI/Spark-X2.5-4B-JANG_6M — 3.41 GiB and ~14% faster decode.

Quality — measured, not estimated

15,839 teacher-forced positions on held-out prompts, versus the bf16 source. Calibration and evaluation prompts come from disjoint corpora, asserted at eval time.

BundleSizebits/weightmedian KL ↓mean KL ↓top-1 ↑decode
Spark-X2.5-4B-JANG_8M4.07 GiB8.5030.00170.005798.72%91.6 tok/s
Spark-X2.5-4B-JANG_6M3.41 GiB7.1260.00480.014397.69%104.7 tok/s

Decode is the median of 4 probes at a fixed condition (512-token prompt, 128 generated), first probe discarded, on an M5 Max. Prefill 5163 tok/s.

The error profile is clean: flips are concentrated where the model was already undecided (8.1% in the lowest-margin bin, falling monotonically to 0.00% at high margin), not spread across confident predictions.

There is no stock-MLX comparison row, and that is not an omission. mlx-lm has no spark2_5 architecture — not in any release, not on main — so no stock MLX quantization of this model can be loaded or scored against it. The runtime ships with vMLX.

Calibration

1,759,492 calibration tokens spanning code, agentic/tool-call transcripts, academic multiple-choice, general chat, Chinese, long-context, science and security prompts. A single capture drives all three of activation-aware scaling, per-channel importance, and the error-corrected weight fit, across all 36 layers.

Running it

This architecture is not in released mlx-lm. Use vMLX or MLX Studio — both ship the spark2_5 runtime.

python
from vmlx_engine.models.spark2_5 import register_spark2_5_runtime
register_spark2_5_runtime()          # must run BEFORE mlx_lm.load()

from mlx_lm import load, generate
from mlx_lm.sample_utils import make_sampler

model, tok = load("JANGQ-AI/Spark-X2.5-4B-JANG_8M")
prompt = tok.apply_chat_template(
    [{"role": "user", "content": "What is 84 * 3 / 2?"}],
    add_generation_prompt=True,
)
print(generate(model, tok, prompt=prompt, max_tokens=512,
               sampler=make_sampler(temp=1.0, top_p=0.95)))

Serving contract

  • —Sampling: temperature=1.0, top_p=0.95, top_k=-1 (-1 = no truncation). Vendor defaults; declared identically in generation_config.json and jang_config.json.
  • —Thinking is ON by default. The chat template opens the rail in the prompt: the generation prompt ends with <|Bot|><think>. With chat_template_kwargs={"enable_thinking": false} it ends <|Bot|></think> instead. A reasoning parser that waits for a literal <think> in the output stream will never see one — use reasoning_parser: qwen3, declared in the bundle.
  • —Tools render into the first system block (## Tools + a <tools> JSON list), so adding or removing a tool rewrites the prompt prefix and forces a full re-prefill — it is not a suffix-only change. Calls come back as <tool_call>NAME<arg_key>k</arg_key><arg_value>v</arg_value></tool_call> with no newlines; tool_parser: spark25 is declared in the bundle.
  • —EOS 1 · BOS 0 · context 131,072 (1M positions native) · text only.
  • —generation_config.json carries upstream's non-standard max_tokens key verbatim and has no max_new_tokens. Pass your own generation cap.

What's in the bundle

  • —181 quantized tensors, each with an explicit per-module quantization entry in config.json — nothing falls back to a top-level default.
  • —109 full-precision passthrough tensors: the per-head attention gate and all norms.
  • —bfloat16 group scales throughout.
  • —Zero misaligned tensor payloads (652/652 verified), so no realigning copy at load.
  • —No auto_map and no remote-code .py files — the runtime comes from vMLX, so loading never stops on a trust_remote_code prompt.

Verified before publishing

gateresult
tensor payload alignment652 / 652, 0 misaligned
per-module quantization coverage181 / 181 against the live model tree
sampling declared in both filesagrees on all four keys
eos / bos / padagree between config.json and generation_config.json
reasoning template on / off / unsetrender distinctly
tool call emitted and parsedround-trips through the declared parser
tools added mid-conversationcorrect call, new system prefix
tools withdrawn mid-conversationanswers in prose, no stray call frame

Quantized and verified by Jinho Jang — eric@jangq.ai. Base model © XHToken, Apache-2.0 (inherited).