Spark-X2.5-4B — MLX oQ6e (fp16 source)

Model Details

Model Description

oQ6e-quantized MLX build (created by xunlinkx with the omlx pipeline) of XHToken/Spark-X2.5-4B for first-class, all-local serving on Apple Silicon via omlx (the MLX OpenAI-compatible server) and mlx-lm.

Attribution chain: XHToken/Spark-X2.5-4B (official base, Apache-2.0) → xunlinkx's oQ6e quantization (this repo).

This is not a new model — it is a quantization of the existing checkpoint, produced with omlx's quantize_oq_streaming(..., oq_level=6, enhanced=True) pipeline (128×512-block imatrix calibration). The -fp16 suffix records that the quantizer consumed full-precision float16 source weights (best-fidelity input), as opposed to bf16 or already-quantized sources. The mixed-bit per-layer layout is embedded in config.json (quantization / quantization_config) so it is restored automatically on load.

  • Developed by: xunlinkx (oQ6e quantization + MLX build, using omlx)
  • Base model by: XHToken (Spark-X2.5-4B)
  • Shared by: xunlinkx
  • Model type: spark2_5 text-generation decoder (MLX quantized, model_type: spark2_5)
  • Language(s) (NLP): multilingual (base model; Spark-X2.5 pretraining, including English/Chinese coverage)
  • License: Apache 2.0 (inherits the base checkpoint license)

Compatibility — Spark support required (patch it yourself until mainline)

model_type: spark2_5 loads only where native support exists. Native support is still converging (as of 2026-09-15): mlx-lm has not merged #1891, and omlx main carries a vendored patch (#3606) that no tagged release includes yet. Until then:

  • mlx-lm users: checkout ml-explore/mlx-lm#1891 (gh pr checkout 1891 inside a mlx-lm clone, or pip install "mlx-lm @ git+https://github.com/xunlinkx/mlx-lm@spark2_5-native"; ab1806e-era alternative for omlx-scheduler compatibility: .../xunlinkx/mlx-lm@spark2_5-backport).
  • omlx users: spark support is on main since jundot/omlx#3606 (2026-09-14, vendored patch, self-disabling once the native module is present) — but no tagged release includes it yet (latest stable v0.6.4 and the 0.7.0.dev pre-releases all predate it). Run omlx from source main, or apply jundot/omlx#3671 for the oQ rules + mlx-lm pin (gh pr checkout 3671).

Loading this checkpoint with an mlx-lm that predates spark2_5 support fails with an unsupported-model-type error. No other requirements: standard MLX safetensors + config.json, no custom code needed once support is present.

Quantization detail (exact, from config.json)

  • 7.013 weight-bits per parameter average (group_size 64, affine). Embeddings and norms stay fp16; per-group scales add ~0.25 bpw on disk.
  • Layout: 6-bit base; sigmoid head gates (self_attn.g_proj) at 8-bit on 22 of 36 layers (6-bit elsewhere); attention/MLP projections lifted to 8-bit on a handful of sensitive layers each.
  • Sibling levels in this family: oQ4e (5.178 bpw), oQ5e (6.098 bpw), oQ8e (8.653 bpw) — see xunlinkx/Spark-X2.5-4B-oQ{e}-fp16.

Sampling (official, per the XHToken model card)

  • temperature 1.0, top_p 0.95, top_k −1 (disabled); thinking mode default. (Early third-party guides suggesting 0.6–0.7 do not match the official card.)

Usage

mlx_lm.generate --model xunlinkx/Spark-X2.5-4B-oQ6e-fp16 \
  -p "The secret to baking a good cake is" -m 1024 \
  --temp 1.0 --top-p 0.95
omlx serve --host 127.0.0.1 --port 8005
# model id: Spark-X2.5-4B-oQ6e-fp16 (OpenAI-compatible /v1/chat/completions)

License

Apache-2.0, inherited from XHToken/Spark-X2.5-4B.

Downloads last month
124
Safetensors
Model size
4B params
Tensor type
U32
·
F16
·
MLX
Hardware compatibility
Log In to add your hardware

6-bit

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

Model tree for xunlinkx/Spark-X2.5-4B-oQ6e-fp16

Quantized
(55)
this model