How DeepSeek Cut AI Coding Costs to $0.14

summarized

TLDR

DeepSeek V4 Flash achieved 14-cent million-token pricing through native sparse attention, compressed KV cache, and a three-read architecture—slashing costs 36x versus competitors. However, its sparse attention degrades on high-dispersion tasks like multi-hop reasoning, and its million-token recall reliability drops after 128K tokens. For bulk long-context work like repo reading or cheap agent loops, it is the new default, but hard reasoning requires a two-model pipeline.

Key points

  • DeepSeek V4 Flash costs $0.14 per million input tokens versus $5 from Anthropic and OpenAI—a nearly 36x gap.
  • The cost reduction comes from three architectural components: compressed sparse attention, the lightning indexer scorer, and a skim lane dense safety net.
  • Standard attention is quadratic in both compute and memory—83.9 GB cache for V3 at a million tokens drops to 9.6 GB in V4 Flash.
  • V4 Flash is a 284-billion-parameter model with 13 billion active per token, trained on 32+ trillion tokens.
  • The sparse attention cuts compute but breaks on high-dispersion tasks (multi-hop chains, variable tracking) at sparsity levels above 50%.
  • In multi-needle retrieval at a million tokens, V4 Flash averages 0.49 recall, with effective recall only reliable up to ~128K tokens.
  • On the Omniscience benchmark, V4 Flash scores -16 (37% right, 84% hallucination when uncertain), while Claude Fable 5 scores +40.
  • For bulk long-context work—reading a repo, summarizing diffs, cheap agent loops—V4 Flash is the default now, but hard reasoning needs a separate expensive model.

Tools mentioned

Techniques

  • Native Sparse Attention (NSA)
  • Compressed Sparse Attention
  • Lightning Indexer
  • Skim Lane (Heavily Compressed Attention)
  • Plain Dense Attention over last 128 tokens
  • 4-to-1 compression
  • 128-to-1 skim lane compression
Transcript (captions)
1 million tokens of context, one request. Watch what four different companies charge you for it. Deepseek V4 flash 14. GPT 5.6 Saul $5. Claude Opus 5 $5. Gemini 3.6 Flash $1.50. Same prompt, same million tokens. 14 cents against $5 is nearly a 36 times gap. That gap is not a discount. It is an architecture and Deepseek published it. VLLM and SG Lang shipped working implementations within days. So why a long prompt cost a fortune and how Deepseek deleted most of that fortune? Three pieces do it. Compressed sparse attention, a scorer called the lightning indexer and a skim lane. And there is one class of work where all three fall apart with no error and no warning. It is probably what you point a coding agent at every day. Start with the bill. Why does a long prompt cost so much more than a short one in the first place? Standard attention compares every token in your prompt against every other token. Double the prompt and you quadruple that work. It is quadratic and it stays quadratic forever. Memory is worse. Every token's keys and values sit in cache the entire time the model is generating. On Deepseek's own previous generation V3 2 from 2025, a million token cache came to 84 GB per request per user. That is the real bill and it is why long context is priced like a luxury. But somebody measured where attention actually lands, and it does not land evenly. A handful of earlier tokens carry almost all of the weight. The rest sit near zero, doing nothing, costing full price. There is a 2023 paper on this. Efficient streaming language models with attention syncs. Shiao and colleagues found the very first tokens in the sequence soak up enormous attention, no matter what they say. Evict them and the model collapses. Keep the first few and it recovers. So most of that quadratic math is spent on pairs of tokens that contribute nothing. Which means the obvious move is to stop computing them. That is sparse attention. Predict which tokens matter cheaply. Then spend the expensive math only on those. The hard part is doing the prediction without burning the savings you just made and without missing the one line that mattered. Deepseek has been chasing this since February 2025 in a paper called native sparse attention. compress the sequence, select what matters, keep a window on recent tokens, and train the model that way from scratch instead of bolting it on afterwards. Efficient does not mean small, by the way. V4 flash is 284 billion parameters, 13 billion of them active per token, trained on more than 32 trillion tokens. V4 is that idea finished. And your prompt is not read one way. It is read three ways at once. View one compressed sparse attention. Every four token positions collapse into one summary entry. Each summary a learned weighted sum of eight real tokens sliding four at a time so nothing drops into a gap. Then the lightning indexer scores those summaries. A tiny low rank scorer with its own heads, a relu and a top case selector and it keeps 512 of them. The rest are simply not computed. View two heavily compressed attention. The skim lane the same prompt crushed 128 to one and read densely. Every entry, every pass, no selection at all. That lane is the safety net. The indexer can miss something. And the skim lane guarantees nothing in your prompt goes fully invisible, blurry, but complete. View three is the boring one that matters most. Plain, dense attention over the last 128 raw tokens. Put the three together and the shape changes. Send 10,000 tokens or a million. And the expensive part reads roughly the same small pile either way. VLM measured what that does to memory. At a million tokens, the 2025 model V3 2 needed 83.9 GB of cache. V4 needs 9.6 and speed barely notices the length. SG Lang benchmarked V4 Pro decoding from 4,000 tokens up to 900,000. On a B200, it fell from 199 tokens a second to 180, under 10% across a prompt 200 times longer, which is where 14 cents comes from. not a loss leader, but roughly what the compute now costs them. And can you check that or do you just take their word for it? The weights are on hugging face, and both VLM and SG Lang shipped fuse kernels for the compressor and the indexer in April. This matters most for agents because an agent does not send one prompt. It resends the whole conversation on every step. So long context is not an occasional cost. It is the bill on every single turn. Deepseek also proved they meant the price. On the 22nd of May, they took a 75% promotional discount on V4 Pro and made it permanent. Input went from $1.74 to about 43. Then on the 31st of July came V4 Flash0731. Same architecture, same price, a new post-training run aimed at coding agents, and the coding numbers stopped being a joke. Terminal Bench 2.1 82.7. Claude Opus 4.8 scores 85. Its own April preview scored 61.8 8 on that same benchmark. So, the jump is real. An artificial analysis priced a standard task suite on all three. About 3 cents on V4 flash, $186 on GPT, 5.6 Saul, $3.15 on Claude Fable 5. So, would you pay a 100 times more for 2.5 benchmark points? Before you answer, look further down the same card where the numbers thin out. NL2 repo build a whole repository from a description 54.2. Agents last exam 25.2. too and Deepseek publishes no Opus comparison for either one. Whatever you would do, the traffic already moved. CNBC counted it on the 7th of July. Chinese origin models peaked at 46% of United States enterprise token usage on open router and have held at least 30% every week since February. Averaged over the previous year, that figure was 11. Deepseek alone routes about 5 trillion of those tokens a week, the largest single vendor on the platform. Then on the 30th of July, OpenAI cut GPT 5.6 Luna by 80% 21 days after launching it. Open AAI credits its own efficiency gains, not DeepSeek. Neil Shaw at Counterpoint Research said the quiet part on the record. High margin, high consumption token pricing from Anthropic and OpenAI is getting harder to justify for a lot of enterprise workloads. And Anthropic's $2 on Sonnet 5 is introductory. It becomes $3 on the 1st of September. except you do not get a 100 times cheaper for free and the catch is baked into sparse attention itself. A 2025 study called the sparse frontier tested six sparse methods across sequences up to 128,000 tokens and it is still the most careful paper in this space. Their finding sparity is not free and how much you get away with depends entirely on the task. Simple single answer retrieval holds up near the top of their range 95% sparsity. But when the answer is scattered across many places, quality drops at 80 to 90. And on high dispersion work, variable tracking, multihop chains, it starts breaking at 50. Map that onto your day. Find the definition of this function is a low dispersion lookup and sparse attention eats it. Traces bug through nine files and two abstractions is the high dispersion case that breaks first and it breaks without an error. You get a confident answer that skipped the file it needed. On a multi- needle retrieval test at a million tokens, V4 flash averages 0.49 and retrieval only holds up well to about 128,000. A million token window is not a million tokens of reliable recall. There is a second gap, too, and it has nothing to do with attention. Artificial analysis runs a benchmark called omniscience. It rewards a right answer, punishes an invented one, and charges you nothing at all for saying, "I do not know." V4 Flash scores minus 16, 37% right, and when it does not know, it invents an answer 84% of the time. Claude Fable 5 tops that same board at plus 40. 13 billion active parameters out of 284 billion is a small brain doing the thinking. So, here is where I land. For bulk long context work, reading a repository, summarizing diffs, running cheap agent loops over a million tokens, V4 flash is the default now, and it is not close. 14 cents against $2 for two and a half points is not a trade-off. It is arithmetic. But do not hand it your hardest multihop reasoning pass. And do not ask it to recall what you never gave it. Cheap wide reading, expensive narrow reasoning. The winner here is a two model pipeline, not a single model. Deepseek has announced peak hour doubling and doubled it is still 14 times under Gemini's long context rate. So here is the bet with a date on it. No. American Frontier Lab publishes flat tier-free pricing for a million token contexts within five times of 14 cents before the 31st of March 2027. Which leaves the question I cannot answer. If the expensive part of a long prompt has stopped growing, what is a token

Frontier News · by Hyperjump Technology