DeepSeek open-sources V4 Preview with default 1M context
DeepSeek just launched and open-sourced DeepSeek-V4 Preview, making a 1M token context standard across its services. It delivers two MoE models—the flagship V4-Pro and the lightweight V4-Flash—built around hybrid compressed attention that slashes KV cache memory to just 2% of standard architectures. It basically tackles the persistent context blowout in long-running coding agents, and the new models are already live in chat and via API.

DeepSeek-V4 Preview is DeepSeek's new open-weight mixture-of-experts model family that makes a 1M token context window standard across all its offerings, built explicitly to solve context blowout in long-running AI agents.
The preview drops in two distinct sizes. DeepSeek-V4-Pro packs 1.6T total parameters with 49B active, targeting performance on par with elite closed models. DeepSeek-V4-Flash delivers 284B total and 13B active parameters, providing a fast and highly economical alternative that holds its own against Pro on straightforward tasks.
What it does
Both models support dual Thinking and Non-Thinking modes and focus heavily on eliminating common failure points in multi-step agent workflows.
According to the official technical report, V4-Pro leads current open models across math, STEM, and coding reasoning, trailing only Gemini-3.1-Pro in world knowledge while securing the top open-source rank on agentic coding benchmarks.
DeepSeek is already using the model internally for agentic development, alongside ready-to-use integrations with external tools like Claude Code, OpenClaw, and OpenCode.
A major upgrade for agents is interleaved thinking. Unlike previous versions that tossed away reasoning traces whenever a user chimed in, V4 preserves the thought history across message turns during tool-use sequences. This prevents the model from losing its place and wasting cycles reconstructing its mental state.
How they pulled it off
Providing 1M context is easy, but making it cheap and fast at full depth is where frontier models usually fall apart.
As Hugging Face's technical breakdown explains, every tool output in an agent loop expands the context, causing subsequent tokens to compute attention over an ever-growing sequence. This causes inference FLOPs and KV cache memory to explode.
DeepSeek-V4 tackles this with a hybrid attention design that alternates two mechanisms across layers. Compressed Sparse Attention compresses keys and values 4x along the sequence and relies on an FP4 lightning indexer to pick relevant blocks. Heavily Compressed Attention compresses keys and values 128x to run dense attention at negligible compute cost. Paired with sliding-window branches and low-precision storage, DeepSeek slashes the total KV cache memory to roughly 2% of a standard 8-head grouped query attention setup.
At 1M depth, V4-Pro requires just 27% of DeepSeek-V3.2's per-token inference FLOPs and 10% of its KV cache. V4-Flash shrinks resource demands even further, needing only 10% of the FLOPs and 7% of the cache.
How to try it
The full model weights and the technical paper are available on Hugging Face collections for local deployment.
If you prefer a browser interface, both models are live on chat.deepseek.com under Expert Mode and Instant Mode.
Developers can plug into the updated API immediately using OpenAI ChatCompletions or Anthropic API formats. Simply point requests to deepseek-v4-pro or deepseek-v4-flash without modifying your base URL.
Keep an eye on retirement timelines if you maintain production pipelines: legacy endpoints deepseek-chat and deepseek-reasoner will permanently shut down on July 24, 2026, at 15:59 UTC.
Why it matters
Anyone building code agents or multi-turn terminal pipelines should test this right away. Until now, 1M context was largely marketing flair because the KV cache costs made production inference wildly impractical.
DeepSeek attacked the unglamorous engineering bottleneck rather than chasing vanity benchmarks. By shaving memory consumption down to 2%, they delivered an architecture that can actually sustain hundred-step agent trajectories on realistic hardware without grinding to a halt.
Sources (2)
- api-docs.deepseek.com(opens in a new tab)Originalapi-docs.deepseek.com
- huggingface.co(opens in a new tab)Reporthuggingface.co