Instructions to use Capicua25x/GLM-5.3-Flash-DSpark with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Capicua25x/GLM-5.3-Flash-DSpark with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("Capicua25x/GLM-5.3-Flash-DSpark") model = AutoModel.from_pretrained("Capicua25x/GLM-5.3-Flash-DSpark", device_map="auto") - Notebooks
- Google Colab
- Kaggle
A block-parallel speculative-decoding drafter for zai-org/GLM-5.3-Flash, free for
commercial use. DSpark-style (after DeepSeek's published MTP work), trained from scratch —
no other drafter's weights were used at any stage.
- Draft: 2.52 B params · 5 layers · block_size 7 · embeddings/lm_head tied from the target
- Target: GLM-5.3-Flash (328 GB, natively fp8,
glm5_next) - License: Apache-2.0 (weights and the full training recipe)
- Corpus: https://huggingface.co/datasets/Capicua25x/glm53-flash-dspark-corpus-200k — the exact 200k on-policy corpus this was trained on (Apache-2.0)
- Recipe: https://github.com/Capicua25x/glm53-dspark — corpus → capture → train → gate, with every failure mode mapped
Accept rate (measured, DeepSpec evaluator, rejection sampling vs the real target)
| dataset | #propose | accept_len | verify_rate |
|---|---|---|---|
| mt-bench (n=80) | 7.00+1 | 1.95 | 0.2439 |
| alpaca (n=52) | 7.00+1 | 1.97 | — |
Per-position acceptance (pos 0→6): 0.493 · 0.237 · 0.115 · 0.056 · 0.028 · 0.015 · 0.008 — the expected geometric decay of a healthy block-parallel drafter.
Measured 2026-08-30: DeepSpec eval.py, max-new 1024, seed 980406, target sharded eager
(device_map=auto) across 2×B200, confidence_threshold 0 (always propose 7). mt-bench is
the complete 80-sample pass; alpaca is the running mean over the first 52 of 200 samples
(~26,000 verification steps — the mean moved 0.002 across the last 35 samples; the full pass
prices at ~9 GPU-hours on this harness and was stopped as settled).
Serving status — read this before deploying. This checkpoint is validated offline against the unquantized fp8 target (numbers above). It is not yet usable in any public serving stack, for a structural reason worth knowing before you try:
- Upstream vLLM ships a working
dsparkspeculator (DeepSeek V4, Qwen3, Kimi, Gemma4) but does not ship theglm5_nextarchitecture at all — verified directly:pip install -U vllmthen a registry check givesno glm5_next. - The GB10/DGX-Spark forks that do add
glm5_nextwere built and validated against DFlash2 drafters, not DSpark. - So
glm5_nexttarget + a DSpark drafter is a pairing that has never been exercised. Each half is correct; they do not compose. Measured on 2× DGX Spark (vLLM TP2, EXL3-4bpw target, k=7): the engine assembles the draft block correctly — distinct slots, consecutive positions,[anchor, MASK×6]— and the drafter's backbone then returns hidden states identical to within one bf16 ULP across all seven slots, so only slot 0 can ever be right. Accept length ~1.0; net throughput below no-speculation.
Twelve alternative explanations were tested and eliminated (prompts, temperature,
draft_sample_method, causality, hc-stream reduction, tap indices, fc/hidden_norm
ordering, checkpoint naming, Markov support, attention config, prefix caching, vLLM version).
The full ledger, the 10-boot GB10 config minefield, and the raw trace are in the recipe
repo's SERVE-SPARKS.md. Closing this needs a glm5_next-aware DSpark integration in a fork
that owns both halves — engine work, not a config change, and not a defect in these weights.
(Prose is the honest test for a drafter; structured output saturates for everyone.)
Why this exists
The only previously available drafter for this target is licensed non-commercial. Businesses — including very small ones — need speculative decoding too. This one, and the recipe that produces it, are Apache-2.0 so that anyone can use, serve, retrain, and build on them, commercially, without asking permission.
Structural note worth measuring on your stack
MTP-lineage drafting keeps per-position state only — no full-context drafter KV, no tree buffers. On serving stacks where an EAGLE-lineage drafter costs multiple GiB of KV-pool headroom, that trade may matter more than raw accept rate. Measure per workload; this card makes no comparative claims.
Train your own (any target, any lineage)
The recipe repo reproduces this drafter end-to-end for ~$40–60 of rented GPU + API credits, and its capture pipeline (target hidden-state recording at 300+ GB scale) works for any drafter family — EAGLE-style included. Naming note: build anything from these artifacts; please don't use this project's name for non-open derivatives.
Method credit: DeepSeek's DSpark/MTP publications and the MIT-licensed DeepSpec harness. Target credit: Z.ai's GLM-5.3-Flash (MIT).
- Downloads last month
- -
Model tree for Capicua25x/GLM-5.3-Flash-DSpark
Base model
zai-org/GLM-5.3-Flash