DeepSeek-V4.1-Flash-FastRUA

A drop-in replacement for DeepSeek-V4.1-Flash-1017. The target model weights are byte-identical to the original. The only change is the bundled DSpark draft (mtp.0–mtp.2), which has been fine-tuned on agentic computer-use trajectories so that it accepts more drafted tokens.

What changed

Original 1017 FastRUA
Target weights (model-00001 … 00043, 00047, 00048) — identical
Draft weights mtp.* (model-00044 … 00046) original DSpark fine-tuned DSpark, same tensor names, shapes, dtypes and quantization (FP8 attention / MXFP4 experts)
text_config.dspark_block_size (default proposals per step) 5 7

Serve it exactly as you would serve the original model: point --model-path at this repo. SGLang reads the default block size 7 from the config: each step proposes 7 draft tokens and verifies a window of 8 (the 7 proposals plus the bonus position). A verify window of 8 rows is the width the GB200 low-latency kernels in sglang-fastrua are built for: 1260 tokens/s at concurrency 1 on 4× GB200, against 851 on stock SGLang with the same serving settings (TP 4, EP 1, flashmla attention, FP8 KV cache). Pass --speculative-dspark-block-size N to override it. Below, "block N" always means N proposals and a verify window of N+1.

sglang serve --trust-remote-code --model-path <this repo> \
  --tp 4 --ep-size 4 --speculative-algorithm DSPARK

Training

  • Data: the DeepSeek-V4.1-Flash-1017 episodes of the ORA trajectory set (multi-turn tool-calling agent traces with screenshots), rendered with the official V4.1 encoder in thinking mode. Images were kept: hidden states were captured with the full multimodal prompt.
  • Online training with SpecForge. Target hidden states were captured from SGLang and the draft was trained at block size 15 (propose 15, verify 16).
  • LK loss with D-PACE position weighting, LR 3e-4 with cosine decay, 2,881 optimizer steps, 4,096 anchors per step on each of 4 ranks.
  • Only the draft was trained. The embedding and LM head are shared with the target and were left unchanged.

Results

Measured on 240 held-out agent turns (with images, max_new_tokens 8192) using SGLang with TP 4, EP 4, the dsv4 attention backend and the flashinfer_mxfp4 MoE backend on 4× GB200.

Single-request decode throughput (concurrency 1, streaming, a fixed stratified subset of 59 requests; mean / median tokens/s per request):

Configuration greedy speedup T=1.0 speedup
No speculation 217 / 217 1.00x 214 / 215 1.00x
Original draft, block 5 (original default) 611 / 592 2.82x 549 / 534 2.57x
Original draft, block 7 624 / 592 2.88x 573 / 538 2.69x
Original draft, block 8 590 / 549 2.70x 533 / 501 2.48x
Original draft, block 15 441 / 414 2.03x 405 / 385 1.90x
FastRUA draft, block 5 640 / 618 2.93x 576 / 555 2.68x
FastRUA draft, block 7 (default) 686 / 658 3.14x 617 / 587 2.87x
FastRUA draft, block 8 690 / 665 3.15x 612 / 575 2.83x
FastRUA draft, block 15 693 / 624 3.16x 590 / 535 2.73x

Acceptance length (all 240 requests, proposal-weighted, including the bonus token):

Configuration greedy T=1.0
Original draft, block 5 3.51 3.34
Original draft, block 8 3.46 3.30
Original draft, block 15 2.98 2.81
FastRUA draft, block 5 3.67 3.43
FastRUA draft, block 8 4.05 3.75
FastRUA draft, block 15 4.25 3.85

The block-7 acceptance lengths on the 59-request subset are 3.62 / 3.43 for the original draft and 3.93 / 3.70 for the FastRUA draft (greedy / T=1.0).

Long context (FastRUA draft, block 15, greedy; held-out turns with prompts over 128K tokens, 173 distinct requests from two sets, 4.44 overall):

Prompt length requests acceptance length
128K–256K 84 4.33
256K–384K 74 4.54
384K–512K 12 4.49
> 512K 3 6.06

At concurrency 1 on the 61-request long-context subset (median prompt about 200K tokens), FastRUA block 15 decodes at 682 / 651 tokens/s (mean / median) against 219 / 220 without speculation, a 3.11x speedup. Decode speed does not drop with prompt length up to 512K.


The original DeepSeek-V4.1-Flash-1017 model card follows.

DeepSeek-V4.1-Flash-1017 (original card)

DeepSeek-V4.1

Technical Report 👁️

Introduction

DeepSeek-V4.1-Flash-1017 is a minor update to DeepSeek-V4.1-Flash, delivering substantial improvements across reasoning, coding, agentic tasks, and visual benchmarks. Alongside these gains, the model reduces task execution time and output length, enabling users to complete tasks faster and at lower cost and advancing the performance–cost Pareto frontier across multiple agent harnesses.

Benchmark DS-V4.1-Flash-1017 DS-V4.1-Flash K3 GLM-5.3 GPT-5.6 Sol Opus 5
HLE w/o tools 42.6 (44.0†) 36.8 (39.1†) 43.5 42.0† 44.5 56.3
Terminal-Bench 4.0 42.3 31.2 12.6 37.9 39.9 51.8
DeepSWE v1.1 77.0 74.2 67.5 66.9 73.0 74.0
ProgramBench 29.1 20.3 17.5 19.0 23.0 37.0
NL2Repo-Bench 68.2 65.4 58.0 58.0 56.8 75.3
Automation-Bench v1.0.6 60.5 54.8 46.7 48.8 45.8 50.3
Agents’ Last Exam 35.4 31.8 27.6 28.5 26.7 28.6
Apex Bench v1.1 72.1 64.6 47.8 56.6 54.3 65.8
Chartography (w/tools) 83.0 78.9 68.1 — 79.9 84.0
BabyVision (w/tools) 92.5 89.6 85.7 — 88.9 94.1
ZeroBench-main (w/tools) 51.0 49.0 41.0 — 53.0 52.0

† denotes the text-only subset of HLE. We use the Claude Code harness for Terminal-Bench 4.0 and the Mini-SWE-V2 harness for DeepSWE v1.1.

Prompt Encoding

This release does not include a Jinja-format chat template. The encoding folder contains a self-contained Python reference implementation (encoding.py) with test cases for multi-turn conversations, tool calling, thinking mode, numeric reasoning effort, mid-conversation system messages, and interleaved image content.

For production use, we additionally release deepseek-recipe, a set of Rust libraries with Python bindings that provides the same prompt format as a maintained, protocol-aware toolkit. It converts Messages, Chat Completions, and Responses API requests into the Conversation format, encodes them into DeepSeek V4 and V4.1 prompts or token IDs, and parses model output back into complete or streamed responses — covering thinking, tool calls, images, and generation settings. Model inference, tool execution, and HTTP transport are left to the caller.

Minimal Inference

Please refer to the inference folder for instructions on weight conversion and running inference locally.

Recommended sampling parameters:

Parameter Value
temperature 1.0
top_p 1.0
context_window 1M tokens
max_tokens ≥ 256K

License

This repository and the model weights are licensed under the MIT License.

Citation

@misc{deepseekai2026deepseekv41flash,
      title={DeepSeek-V4.1-Flash: Pushing the Limits of KV Cache Compression},
      author={DeepSeek-AI},
      year={2026},
}

Contact

If you have any questions, please raise an issue or contact us at service@deepseek.com.

Downloads last month
95
Safetensors
Model size
763B params
Tensor type
BF16
·
F32
·
F8_E4M3
·
I8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support