DeepSeek-V4: a million-token context that agents can actually use
DeepSeek-V4 (Pro: 1.6T total/49B active; Flash: 284B/13B active) is a MoE model family whose 1M-token context is made practical by a hybrid attention design that interleaves Compressed Sparse Attention (4x KV compression plus an FP4 lightning indexer selecting top-k blocks) with Heavily Compressed Attention (128x compression with dense attention), plus FP8 KV storage. At 1M tokens V4-Pro needs 27% of V3.2's per-token FLOPs and 10% of its KV cache, about 2% of a bf16 GQA-8 cache. Agent-focused post-training preserves reasoning across user turns when tools are involved, adds an XML-based |DSML| tool-call schema to reduce escaping and type errors, and relies on DSec, a Rust sandbox platform for RL rollouts. Agent benchmarks land near frontier closed models (SWE Verified 80.6, MCPAtlas 73.6), and MRCR 8-needle retrieval holds 0.59 at 1M tokens.
Related posts
- Serving DeepSeek-V4: why million-token context is an inference systems problem
Together AI hardMasterDeepSeek-V4's 1M-token context comes from compressing the token axis of the KV cache: Compressed Sparse Attention (stride 4, top-k selection), Heavily Compressed Attention (stride 128, dense over ~8K entries) and a 128-token Sliding Window Attention path. The model leaves the serving engine to juggle multiple cache layouts with different sizes and lifetimes. In Together's bring-up on NVIDIA HGX B200, SWA state handling dominated capacity, and keeping only SWA states likely to be reused raised per-node KV capacity from ~1.2M to ~3.7M tokens. Prefix caching becomes a per-cache-type storage policy (full SWA store, checkpoints, or recompute-on-hit). Gains appear first in long-context decode-heavy workloads, while short-context prefill depends on kernel maturity, so teams should benchmark in their own regime and use workload-specific endpoint profiles.
- Accelerating Qwen3-8B Agent on Intel® Core™ Ultra with Depth-Pruned Draft Models
Hugging Face mediumAdeptSpeculative decoding with a Qwen3-0.6B draft model speeds up 4-bit Qwen3-8B on an Intel Lunar Lake integrated GPU by about 1.3× using OpenVINO.GenAI. Depth-pruning the draft raises that to about 1.4×: 6 of its 28 layers are removed by picking low-contribution blocks via angular distance, then the draft is fine-tuned on Qwen3-8B outputs for 500k Infinity-Instruct prompts. The gain matches the speedup formula, since lower draft latency improves overall throughput. The accelerated pair is demonstrated as a local smolagents agent that uses web search and python-pptx to build a slide deck.
- Open R1: Update #4
Hugging Face mediumAdeptDeepSeek-V3 0324 keeps the original V3 architecture, moves to an MIT license, and posts large benchmark gains: AIME rises from 39.6 to 59.4, LiveCodeBench from 39.2 to 49.2 and GPQA from 59.1 to 68.4. The likely sources are improved post-training and possibly continual pretraining, though this is speculation until DeepSeek publishes a technical report. The model can be run through Hugging Face Inference Providers, TGI, SGLang on H100 nodes, or Unsloth dynamic GGUF quants with llama.cpp. Downloading it is safe because of safetensors, explicit trust_remote_code and Hub scanning, but its outputs need caution: review generated code, sandbox agents, keep credentials away from the model and keep a human in the loop.
- Context Management for Deep Agents
LangChain mediumAdeptThe Deep Agents SDK manages long-running agent context with three compression techniques triggered at fractions of the model's context window. Tool results over 20,000 tokens are offloaded to a filesystem and replaced with a path plus a 10-line preview. Old write/edit tool inputs are replaced with file pointers once context passes 85%, and summarization runs as a last resort, producing a structured summary while saving the full history to disk for later retrieval. To evaluate these mechanisms, the team forces compression early (10-25% of the window) to generate more events and uses targeted evals such as needle-in-the-haystack recovery to catch goal drift and lost details.
- GLM-5.2: Built for Long-Horizon Tasks
Hugging Face hardMasterGLM-5.2 is Z.ai's MIT-licensed flagship model for long-horizon coding-agent work, with a 1M-token context and selectable thinking effort levels. It scores 81.0 on Terminal-Bench 2.1 and lands near Claude Opus 4.8 on FrontierSWE. Architecturally, IndexShare reuses one sparse-attention indexer across every four DSA layers, cutting per-token FLOPs 2.9× at 1M context. An improved MTP draft layer, using shared indices and KV, rejection sampling and an end-to-end TV loss, raises speculative-decoding acceptance length by 20%. Post-training switches from group-wise optimization to critic-based PPO, which handles compacted sub-traces, and uses slime for agentic RL plus a two-stage rule-and-LLM-judge guard that blocks reward-hacking tool calls online without aborting rollouts.