DeepSeek-V4-Flash
| Tier | Input | Output | Cached input |
|---|---|---|---|
PriorityLearn more | 52.5 | 105 | 10.5 |
FlexLearn more | 25.92 | 51.9 | 5.19 |
DeepSeek V4 Flash carries 284 billion parameters and activates 13 of them per token, against a context window of one million. What makes that window usable rather than nominal is a hybrid attention stack — Compressed Sparse Attention paired with Heavily Compressed Attention — designed specifically to break the quadratic cost that stops long context from being economical. Reasoning depth is a per-request choice across three modes, and the span between them is wider than most model generations: competition mathematics roughly doubles from the fastest setting to the deepest. It ships MIT-licensed, pre-trained on over 32 trillion tokens, with a published technical report.

DeepSeek V4 Flash
284B parameters. 13B active per token. One million tokens of context.
Preview release, 24 April 2026. Technical report: arXiv:2606.19348.
What the Architecture Is Actually Solving
The published framing is unusually direct about the problem. Quadratic attention is described as the real bottleneck on test-time scaling — not a performance detail, but the thing standing between long context and its being economically routine.
Four pieces address it.
Hybrid attention: CSA + HCA. Compressed Sparse Attention handles precise retrieval; Heavily Compressed Attention handles the bulk cheaply. Each layer also maintains a raw sliding-window cache for the most recent 128 tokens, which is where exactness matters most and compression costs most.
Manifold-Constrained Hyper-Connections. A constraint that bounds the spectral norm at or below 1, keeping the layer transformation non-expansive. In plain terms: signal neither explodes nor vanishes as it propagates through a deep stack, which is what lets the residual path be strengthened without destabilising training.
Muon optimizer, used at trillion-parameter scale for faster convergence and greater stability.
Multi-Token Prediction heads at the output, providing a speculative decoding path.
The efficiency claim published alongside these is stated for the larger model in the series: at 1M context it needs 27% of the per-token inference FLOPs and 10% of the KV cache of the previous DeepSeek generation. Equivalent figures are not stated in the same sentence for this model.
Engineering Below the Architecture
Details from the technical report that rarely appear in a model card, and that shape how the model behaves in a serving stack.
A single fused MoE kernel overlapping compute, communication, and memory access simultaneously — rather than the usual sequence of three phases.
Batch-invariant deterministic kernels, giving bitwise reproducibility across training and inference. That property is uncommon and directly useful: a result you can reproduce exactly is a result you can debug.
Two-stage contextual parallelism for compressed attention.
Heterogeneous KV-cache structure with on-disk storage for shared-prefix reuse — the mechanism behind cache hits on a repeated system prompt.
Routing changes: MoE affinity scoring moved from sigmoid to a square-root-of-softplus formulation, and the cap on routing target nodes was removed.
How It Was Trained
Pre-training ran on more than 32 trillion tokens.
Post-training took an unusual shape, and it is worth understanding because it explains the model's behaviour profile.
Rather than training one model across all domains, DeepSeek trained independent specialists — separate SFT and GRPO runs for mathematics, code, agentic work, and instruction following — then consolidated them into a single model through on-policy distillation with a reverse-KL objective.
Ten teacher models merged into one student. The report describes this as a cleaner formulation of the many-specialists-to-one-generalist recipe, and it means the released checkpoint carries proficiencies that were developed in isolation rather than negotiated against each other during a single training run.
Three Reasoning Modes
| Mode | Behaviour |
|---|---|
| Non-think | Immediate response, no deliberation pass |
| Think High | Explicit reasoning before answering |
| Think Max | Reasoning extended to its fullest |
The span between them is not incremental. Read the benchmark table below as a decision table rather than as three products: on competition mathematics the fastest and deepest settings differ by more than most model generations differ from each other.
Think Max needs room. DeepSeek recommends a context window of at least 384K tokens when running it, because the reasoning trace alone can consume that much. A ceiling sized for the answer returns an unfinished response rather than a shorter one.
Specifications
| Model ID | deepseek-ai/DeepSeek-V4-Flash |
| Total parameters | 284B |
| Activated per token | 13B |
| Context window | 1,048,576 tokens |
| Precision | FP4 for MoE expert weights, FP8 for attention, normalisation, and router |
| Sliding-window cache | 128 tokens, uncompressed, per layer |
| Pre-training | 32T+ tokens |
| Licence | MIT |
| Preview release | 24 April 2026 |
Not published for this model specifically: exact layer count, the CSA/HCA layer split, and the sparse indexer's top-k value. Only the larger model's 61-layer arrangement appears in the report.
A maximum output figure of 384K tokens is cited in secondary coverage as first-party. It does not appear on the model card itself — verify against your serving configuration before designing around it.
Capabilities
| Capability | Value |
|---|---|
input_types | text |
output_types | text |
image_input | Not supported |
context_window | 1048576 |
reasoning | Three modes — non-think, high, max |
reasoning_field | reasoning_content — separate from content |
streaming | Supported |
tool_calling | Supported |
structured_output | Supported |
deterministic_kernels | Yes — bitwise reproducible |
requires_prompt | Yes — text prompt required |
Benchmark Results
Published by DeepSeek. Three columns, one model, three reasoning modes.
| Category | Benchmark | Non-think | High | Max |
|---|---|---|---|---|
| Knowledge | MMLU-Pro | 83.0 | 86.4 | 86.2 |
| GPQA Diamond | 71.2 | 87.4 | 88.1 | |
| SimpleQA-Verified | 23.1 | 28.9 | 34.1 | |
| HLE | 8.1 | 29.4 | 34.8 | |
| Code & mathematics | LiveCodeBench | 55.2 | 88.4 | 91.6 |
| Codeforces (rating) | — | 2816 | 3052 | |
| HMMT 2026 Feb | 40.8 | 91.9 | 94.8 | |
| IMOAnswerBench | 41.9 | 85.1 | 88.4 | |
| Apex | 1.0 | 19.1 | 33.0 | |
| Apex Shortlist | 9.3 | 72.1 | 85.7 | |
| Long context | MRCR 1M | 37.5 | 76.9 | 78.7 |
| CorpusQA 1M | 15.5 | 59.3 | 60.5 | |
| Agentic | SWE-bench Verified | 73.7 | 78.6 | 79.0 |
| SWE-bench Pro | 49.1 | 52.3 | 52.6 | |
| SWE-bench Multilingual | 69.7 | 70.2 | 73.3 | |
| Terminal-Bench 2.0 | 49.1 | 56.6 | 56.9 | |
| BrowseComp | — | 53.5 | 73.2 | |
| HLE with tools | — | 40.3 | 45.1 | |
| MCPAtlas | 64.0 | 67.4 | 73.6 | |
| Toolathlon | 40.7 | 43.5 | 47.8 | |
| GDPval-AA | — | — | 1395 |
Reading the table
Reasoning-heavy work transforms. Mathematics moves from 40.8 to 94.8. Competitive programming from 55.2 to 91.6. Apex Shortlist from 9.3 to 85.7 — a ninefold change on the same weights.
Agentic work barely moves. SWE-bench Verified gains 5.3 points across the entire range; SWE-bench Pro gains 3.5. Where a task is procedural rather than deductive, the cheapest mode lands close to the most expensive one.
Two places where more reasoning is not better. MMLU-Pro peaks at high rather than max
(86.4 against 86.2), as does MCPAtlas. The ladder is not monotonic, and assuming it is will
occasionally cost you both accuracy and tokens.
Long-context retrieval depends heavily on the mode. MRCR at 1M moves from 37.5 to 78.7. Pairing a very large input with non-think mode is the single combination this table argues hardest against.
Three entries are mode-gated. Codeforces, BrowseComp, HLE-with-tools, and GDPval-AA have no non-think figure at all — those evaluations were not run without reasoning.
A Note on Verbosity
An independently measured operational detail worth knowing before you budget.
Running the Artificial Analysis Intelligence Index, this model emitted roughly 240 million output tokens, against a median of about 120 million for open-weight models of comparable size.
Twice the output for the same evaluation. That is not a quality judgment — it is a cost profile, and it means output-token budgeting on this model should start from measurement rather than from a figure carried over from something else.
Using DeepSeek V4 Flash on DEVUP AI
Base URL: https://api.devupai.com/v1 · Model ID: deepseek-ai/DeepSeek-V4-Flash
First request — cURL
curl https://api.devupai.com/v1/chat/completions \
-H "Authorization: Bearer $DEVUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-ai/DeepSeek-V4-Flash",
"messages": [
{
"role": "user",
"content": "Our settlement file arrives once nightly, but occasionally twice within a minute. The importer is idempotent on row hash and still produced duplicates last week. Rank the mechanisms that would defeat a hash-based guard."
}
],
"temperature": 1.0,
"top_p": 1.0,
"max_tokens": 32768
}'Choosing a mode per path — Python
The decision the benchmark table exists to inform.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DEVUP_API_KEY"],
base_url="https://api.devupai.com/v1",
)
def solve(prompt: str, *, mode: str = "high", max_tokens: int = 32768) -> str:
"""Send a request at a chosen reasoning mode."""
payload = {
"model": "deepseek-ai/DeepSeek-V4-Flash",
"messages": [{"role": "user", "content": prompt}],
"temperature": 1.0,
"top_p": 1.0,
"max_tokens": max_tokens,
}
if mode == "non-think":
payload["extra_body"] = {"chat_template_kwargs": {"thinking": False}}
else:
payload["extra_body"] = {"chat_template_kwargs": {"thinking": True, "reasoning_effort": mode}}
return client.chat.completions.create(**payload).choices[0].message.content
# Procedural work — the table shows little gain from deliberation here.
solve(f"Which service owns this stack trace?\n\n{trace}", mode="non-think", max_tokens=256)
# Deductive work — where the table shows the ladder actually climbing.
solve("Prove whether this retry schedule can starve a single tenant under sustained load.", mode="max", max_tokens=131072)The two ceilings differ by a factor of five hundred. That is not caution — it is the gap between a routing decision and a proof, on a model whose reasoning trace can consume 384K tokens.
Reading reasoning separately — Python
reply = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4-Flash",
messages=[{"role": "user", "content": question}],
temperature=1.0,
top_p=1.0,
max_tokens=32768,
)
message = reply.choices[0].message
trace = getattr(message, "reasoning_content", None)
if trace:
logger.debug("trace: %d characters", len(trace))
print(message.content)Reasoning arrives in its own field. Concatenating it into content before parsing breaks structured
output and shows readers an unpolished draft they did not ask for.
Whole-corpus retrieval — Python
Where the million-token window and the mode choice interact.
from pathlib import Path
corpus = "\n\n---\n\n".join(
f"### {path.name}\n{path.read_text(encoding='utf-8')}"
for path in sorted(Path("filings").glob("*.txt"))
)
reply = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4-Flash",
messages=[
{
"role": "system",
"content": (
"Work only from the documents supplied. Identify every figure that appears in more "
"than one document with a different value. Quote both occurrences and name both "
"files. Report nothing you cannot quote."
),
},
{"role": "user", "content": corpus},
],
temperature=1.0,
top_p=1.0,
max_tokens=65536,
extra_body={"chat_template_kwargs": {"thinking": True, "reasoning_effort": "high"}},
)Reasoning is enabled deliberately. MRCR at 1M context reads 37.5 without it and 76.9 with it — a large input paired with the fastest mode is the configuration the published numbers warn against most clearly.
An agent loop — Python
import json
TOOLS = [
{
"type": "function",
"function": {
"name": "read_file",
"description": "Read a file relative to the repository root.",
"parameters": {
"type": "object",
"properties": {"path": {"type": "string"}},
"required": ["path"],
},
},
},
{
"type": "function",
"function": {
"name": "run_tests",
"description": "Run the test suite and return pass/fail counts with failure output.",
"parameters": {"type": "object", "properties": {}},
},
},
]
def read_file(path: str) -> dict:
"""Replace with your real, sandboxed file access."""
raise NotImplementedError
def run_tests() -> dict:
"""Replace with your real, sandboxed test runner."""
raise NotImplementedError
HANDLERS = {"read_file": read_file, "run_tests": run_tests}
session = [{"role": "user", "content": "The DZD rounding test fails on totals ending in .005. Find the cause and fix it."}]
CEILING = 40
for step in range(CEILING):
reply = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4-Flash",
messages=session,
tools=TOOLS,
temperature=1.0,
top_p=1.0,
max_tokens=65536,
extra_body={"chat_template_kwargs": {"thinking": True, "reasoning_effort": "high"}},
)
message = reply.choices[0].message
session.append(message)
if not message.tool_calls:
print(message.content)
break
for call in message.tool_calls:
handler = HANDLERS.get(call.function.name)
if handler is None:
outcome = {"error": "unknown tool", "name": call.function.name}
else:
try:
outcome = handler(**json.loads(call.function.arguments or "{}"))
except Exception as exc:
# Return the failure as data so the model can work around it.
outcome = {"error": type(exc).__name__, "detail": str(exc)}
session.append({"role": "tool", "tool_call_id": call.id, "content": json.dumps(outcome)})
else:
print(f"Halted at the {CEILING}-step ceiling.")high rather than max here, on purpose. The agentic benchmarks gain a handful of points across the
entire mode range — spending maximum reasoning on a task the numbers say is procedural buys latency
and little else.
Node.js — DEVUP AI SDK
npm install devupaiimport DevupAI from "devupai";
const client = new DevupAI({
apiKey: process.env.DEVUP_API_KEY,
});
const reply = await client.chat.completions.create({
model: "deepseek-ai/DeepSeek-V4-Flash",
messages: [
{
role: "system",
content:
"Review this migration. Report only changes that could lose data or cause downtime, " +
"each with the file, the risk, and the smallest safe correction.",
},
{ role: "user", content: migrationPlan },
],
temperature: 1.0,
top_p: 1.0,
max_tokens: 32768,
});
console.log(reply.choices[0]?.message?.content);Streaming
stream = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4-Flash",
messages=[{"role": "user", "content": "Design an idempotency scheme for a callback that may arrive twice within the same second."}],
temperature=1.0,
top_p=1.0,
max_tokens=32768,
stream=True,
extra_body={"chat_template_kwargs": {"thinking": True, "reasoning_effort": "high"}},
)
for chunk in stream:
if not chunk.choices:
if getattr(chunk, "usage", None):
print(f"\n\nin {chunk.usage.prompt_tokens:,} · out {chunk.usage.completion_tokens:,}")
continue
piece = chunk.choices[0].delta
if getattr(piece, "content", None):
print(piece.content, end="", flush=True)Given the measured verbosity, watching the completion count on your own prompts is worth doing early. The number that matters is yours, not a published median.
Recommended Generation Parameters
| Parameter | Value |
|---|---|
temperature | 1.0 |
top_p | 1.0 |
max_tokens | Sized to the reasoning mode, not the expected answer |
For Think Max, DeepSeek recommends allowing at least 384K tokens of context for the trace.
Prompt Encoding
This release ships no Jinja chat template. Instead it provides a self-contained Python reference implementation with test cases covering multi-turn conversations, tool calling, thinking mode, reasoning effort, mid-conversation system messages, and interleaved content.
That matters only for self-hosted deployments. Through a hosted API the encoding is handled for you.
Practical Notes
Choose the mode per path, not per application. The table above shows the two ends differ by more on some tasks than others.
Never pair a very large input with non-think mode. Long-context retrieval halves.
Budget output tokens from your own measurement. The published verbosity figure is a reason to measure rather than to assume.
Keep reasoning_content in its own field in both directions.
Watch for the non-monotonic entries. On MMLU-Pro and MCPAtlas, high scored above max.
Bitwise reproducibility is available through deterministic kernels — useful if you need a result you can regenerate exactly during debugging.
Limitations
Text only. No image, audio, or video input, and no image generation.
Knowledge is not where the mode gains land. SimpleQA moves from 23.1 to 34.1 across the full range; mathematics more than doubles. Reasoning does not substitute for what the model did not learn.
Non-think is a different capability tier, not a faster version of the same thing — on some benchmarks it scores near zero where the deepest mode scores well.
The mode ladder is not monotonic. Two published benchmarks peak below maximum.
Output volume runs high, measured at roughly double the median for comparable open models on a standard evaluation.
Several architectural figures are unpublished for this model — layer count, CSA/HCA split, and indexer top-k. Only the larger sibling's arrangement is documented.
A preview release. Later checkpoints exist in the same line with different characteristics.
Reasoning traces are working notes. Content in reasoning_content may be unpolished or contradict
the final answer; treat the answer as the output and the trace as debugging material.
Verify anything consequential. A high benchmark score is a statement about a test set, not about your input.