Instructions to use botdevhq/dspark-delta-DeepSeek-V4.1-Flash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use botdevhq/dspark-delta-DeepSeek-V4.1-Flash with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("botdevhq/dspark-delta-DeepSeek-V4.1-Flash") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use botdevhq/dspark-delta-DeepSeek-V4.1-Flash with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "botdevhq/dspark-delta-DeepSeek-V4.1-Flash" --prompt "Once upon a time"
- Atomic Chat
dspark-delta-DeepSeek-V4.1-Flash
A 137 MiB distilled LoRA draft-head adapter (schema: dspark-delta-v1, rank-16 gated LoRA, block_size=7) for the DSpark speculative drafter inside DeepSeek-V4.1-Flash-1017, built for botdevhq/mlx-serve (--dspark-delta).
This is a lossless speculative draft adapter, not a standalone language model: all proposed tokens are verified against the exact target model (--verify-exact served,fused), guaranteeing 0 greedy token diffs vs. drafting-off plain decode.
What's inside
.
βββ LICENSE # MIT License (bot.dev Labs + DeepSeek notice)
βββ README.md
βββ SHA256SUMS
βββ dspark-delta-gated-lora-b7.safetensors # 137 MiB (143,609,040 B), 57 tensors, rank-16 gated LoRA (block_size=7)
Safetensors metadata (dspark-delta-v1)
base_model:deepseek_v41(dim=5120,vocab_size=129280,n_stages=3)head_type:gated(markov_rank=256,selector_top_k=16,selector_decode=greedy)train_mode:lora(lora_rank=16,lora_alpha=16,block_size=7, 71.8M trainable params)
Training provenance (100% public open-source corpus)
This checkpoint was distilled strictly on 100% public open-source code and technical documentation (589,824 tokens total across 16 train / 3 held-out eval shards; 257 training documents, 114,808 training anchors, 60,946 held-out eval anchors; 0 private tokens):
- Public code (60%): Go stdlib, Zig stdlib, Python 3.11 stdlib,
mlx-serve(Zig/Metal),llama.cpp(C++/Metal), AppleMLX(C++/Python),Traefik(Go),Gitea(Go/TS). - Public technical docs & prose (40%): Linux manpages,
Traefik,oauth2-proxy,mlx-serve,llama.cpp, andStrataMarkdown docs, and standard open-source license texts. - Teacher: Exact lossless DeepSeek-V4.1-Flash-1017 trunk hidden states (target layers 37β39) and top-64 logit distributions.
- Training budget: 900 optimizer steps (
grad_accum=4,lr=1.5e-4, cosine decay,slot_weight_decay=0.9, 246 s on Apple M5 Ultra,13.1 GiBpeak memory).
Measured results (Apple M5 Ultra, 512 GB)
Offline held-out public eval (60,946 anchors, block_size=7)
| Metric | Stock DSpark (b=7) |
dspark-delta-gated-lora-b7 |
Delta |
|---|---|---|---|
| Eval KL divergence | 2.1509 |
1.6153 |
-24.9% (-0.5356) |
Mean strict accept (tok/round) |
2.9552 |
3.0504 |
+0.0952 |
Mean greedy accept (tok/round) |
3.0041 |
3.1009 |
+0.0968 |
Code mean greedy accept (36,621 anchors) |
3.64 |
3.7624 |
+0.12 (slot-6 code accept +13.54 pts) |
| Confidence calibration Brier score | 0.1174 |
0.1085 |
-7.6% |
| Simulated 512 policy throughput | 115.19 tok/s |
117.46 tok/s |
+2.0% (+4.2% vs stock b=5) |
Live end-to-end 512 GB M5 Ultra screen (botdevhq/mlx-serve, lossless native pack)
Measured on the lossless 512 GB DeepSeek-V4.1-Flash-1017 pack (--verify-exact served,fused, greedy T=0, 1 user) comparing stock DSpark vs. --dspark-delta:
| Prompt kind | Drafting off (plain) | Stock DSpark | With --dspark-delta |
Greedy diffs vs. plain |
|---|---|---|---|---|
| Reasoning (512 tok out) | 61.5 tok/s |
115.9 tok/s |
118.1 tok/s (+1.9%) |
0 |
| Code (256 tok out) | 61.3 tok/s |
140.0 tok/s |
140.3 tok/s (+0.2%) |
0 |
| Edit (700 tok out) | 61.3 tok/s |
170.1 tok/s |
169.7 tok/s (-0.2%) |
0 |
| Prose (256 tok out) | 61.4 tok/s |
78.9β80.1 tok/s |
77.7β78.5 tok/s (-1.8%) |
0 |
8-stream concurrent (N=8, plain batched) |
β | 153.6 tok/s |
154.4 tok/s |
0 (exact) |
| Wired memory footprint | β | 303.02 GiB |
303.40 GiB (+0.38 GiB) |
β |
Research checkpoint note: This is an initial Stage-1 public-data distillation checkpoint trained on ~590K public tokens. On live reasoning and code prompts it delivers modest lossless speedups (
+1.9%on reasoning, bit-exact0diffs across all prompts) while adding only0.38 GiBwired memory, and serves as a clean, reproducible public reference artifact forbotdevhq/mlx-serve's--dspark-deltaloader.
Usage with botdevhq/mlx-serve
hf download botdevhq/dspark-delta-DeepSeek-V4.1-Flash --local-dir ./dspark-delta
./zig-out/bin/mlx-serve \
--model ./native \
--serve \
--verify-exact served,fused \
--dspark-delta ./dspark-delta/dspark-delta-gated-lora-b7.safetensors
Pair with --dspark-grow / --dspark-grow-policy on botdevhq/mlx-serve to enable dynamic block widths up to B=7.
License & Credits
- License: MIT (
LICENSE), including DeepSeek's MIT notice. - Base model: DeepSeek-V4.1-Flash-1017 (
deepseek-ai/DeepSeek-V4.1-Flash-1017, MIT). - Inference engine:
botdevhq/mlx-serve(fork of David Dalcu'sddalcu/mlx-serve). - Published by: bot.dev (
@botdevhq, Chatlio LLC).
- Downloads last month
- -
Quantized
Model tree for botdevhq/dspark-delta-DeepSeek-V4.1-Flash
Base model
deepseek-ai/DeepSeek-V4.1-Flash-1017