DeepInfer vs. The World: Is This The End of Expensive APIs?
DeepSeek open-sourced DeepInfer, the inference engine behind its cheap API, and kept the KV cache private. One cluster serves 155 trillion tokens a day on DeepSeek V4.1 Flash. Here is how the engine gets that cheap, why the cache they kept matters most, and what this open source release means for your API bill. ---- ❤️ SUPPORT THE CHANNEL Patreon: https://www.patreon.com/cw/DIYSmartCode Higgsfield AI — Create AI Videos & Visuals Get 10% OFF here: https://higgsfield.ai?fpr=thomas-dccf7e 🚀 DYNAMOUS AI COMMUNITY Want to learn agentic coding with live daily events and workshops? Check out Dynamous AI: https://dynamous.ai/?code=646a60 Get 10% off here 👉 https://shorturl.smartcode.diy/dynamous_ai_10_percent_discount ⚡ HOSTINGER — RELIABLE HOSTING FOR YOUR PROJECTS (10% OFF) Whether you're shipping a portfolio, a side project, n8n flows, or AI agents — I use Hostinger for fast, affordable VPS + web hosting. Get 10% off here 👉 https://hostinger.com/DIYSMARTCODE n8n: https://n8n.partnerlinks.io/diysmartcode (Affiliate links — costs you nothing, supports the channel.) ---- Chapters 0:00 DeepSeek DeepInfer: 155 trillion tokens a day 0:35 Why DeepSeek refused to open-source it in 2025 1:15 Hardware: Blackwell or Ascend, not your laptop 1:46 DeepSeek V4.1 Flash: half the layers for the prompt 2:15 Wide expert parallelism and load balancing 3:53 DSpark speculative decoding 5:05 The private KV cache: 100 PB of SSD 6:04 DeepSeek API pricing: cache hit vs miss 6:35 deepseek-recipe and our prompt injection test 7:39 What DeepSeek kept private (and the margin myth) 8:44 Verdict: real open source or marketing? What you will see in this 9-minute breakdown: → The real numbers from DeepSeek's deployment doc: 155 trillion tokens a day, $38 revenue per GPU-hour at off-peak prices → Why the smallest efficient setup is 64 + 64 GPUs on Nvidia Blackwell or Huawei Ascend 950 → How V4.1 Flash nearly halves prompt compute with 40 layers, 20 of them barely touching your prompt → Wide expert parallelism: 384 experts, 6 per token, 7 per card, and the throughput vs speed trade-off → DSpark speculative decoding: checked tokens down about 30%, a gain of 4 to 7% at production load, and the row where it loses → The KV cache DeepSeek kept: over 100 PB of SSD, kept 3 days for agents and 7 days for chat → Why a cache hit on the DeepSeek API is 50x cheaper than a miss, and how to keep your agent prefix hitting → deepseek-recipe hands-on: a forged assistant marker in a prompt, tokenized naively vs through the recipe → The 80% margin claim: why it is an estimate, not DeepSeek's number DeepInfer on GitHub: https://github.com/deepseek-ai/DeepInfer DeepSeek V4.1 Flash inference deployment Q&A: https://github.com/deepseek-ai/DeepInfer/blob/main/doc/inference_deployment_qa.md deepseek-recipe on GitHub: https://github.com/deepseek-ai/deepseek-recipe DeepSeek V4.1 Flash model card: https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017 DeepSeek API pricing: https://api-docs.deepseek.com/quick_start/pricing The path to open-sourcing the DeepSeek inference engine (April 2025): https://github.com/deepseek-ai/open-infra-index/blob/main/OpenSourcing_DeepSeek_Inference_Engine/README.md DeepSeek V3/R1 inference system overview (Feb 2025): https://github.com/deepseek-ai/open-infra-index/blob/main/202502OpenSourceWeek/day_6_one_more_thing_deepseekV3R1_inference_system_overview.md Open engine, private cache: is that real open source, or good marketing? Pick a side in the comments. #DeepSeek #DeepInfer #DeepSeekV4 #DeepSeekV41Flash #OpenSourceAI #OpenSourceLLM #LLM #LargeLanguageModel #AIInference #KVCache #MixtureOfExperts #SpeculativeDecoding #DeepSeekAPI #vLLM #SGLang #Blackwell #Ascend #PromptInjection #AINews #AICoding #ClaudeCodeAlternative #AIAgents