DeepSeek open-sources its DeepInfer inference engine, and analysts calculate an 82% margin

On October 20, DeepSeek open-sourced DeepInfer under the Apache 2.0 license. DeepInfer is the internal inference framework behind its large-scale service. It shipped alongside deepseek-recipe, a component for encoding and decoding tokens. The release is unexpected: almost nobody shares their model-serving infrastructure publicly. After the release, people in the community worked out the service's economics and arrived at a gross margin of about 82%. If that estimate is close to reality, DeepSeek makes money on inference even at very low per-token prices. • The Apache 2.0 license allows commercial use and forks • DeepSeek previously published a theoretical margin of 545% • DeepInfer already runs in the company's production environment

AI-processed from Jiqizhixin (机器之心); edited by Hamidun News
DeepSeek open-sources its DeepInfer inference engine, and analysts calculate an 82% margin
Source: Jiqizhixin (机器之心). Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceJiqizhixin (机器之心) ↗
Editor-in-Chief
Key metric #1The Apache 2.0 license allows commercial use and forks
Key metric #2DeepSeek previously published a theoretical margin of 545%
Key metric #3DeepInfer already runs in the company's production environment

On October 20, DeepSeek made DeepInfer publicly available. It is the internal inference framework that currently powers the company's large-scale service. The release also includes deepseek-recipe, a component for encoding and decoding tokens. The license is Apache 2.0, which means the code can be used in commercial products, modified and forked without royalties. A couple of days later, the community ran the numbers on the service's economics and arrived at a gross margin of around 82%. In a market where many players subsidize tokens, that figure stands out.

What's in the release

DeepInfer is not an experimental project or a conference demo. It is the layer that actually serves DeepSeek's user traffic. Code like this usually stays closed: it is where a company squeezes money out of its hardware, and it is the source of low API prices. Here, DeepSeek has handed it over in full.

The second component, deepseek-recipe, converts text into tokens and back. It is no minor detail. An error or mismatch in tokenization and decoding breaks compatibility with models, especially when inference is spread across different systems and frameworks. Third-party teams now have a reference implementation from the people who built the models.

The release at a glance:

  • Project: DeepInfer, DeepSeek's internal inference framework
  • Companion component: deepseek-recipe, token encoding and decoding
  • Publication date: October 20
  • License: Apache 2.0
  • Status: infrastructure of a real production service, not a research prototype
  • External estimate of gross margin: about 82%

Where the 82% comes from

This is not an official DeepSeek figure but an outside calculation. Estimates like this always depend on assumptions: how much a GPU-hour costs, how heavily the cluster is utilized, what share of requests hits the context cache, and what rates customers pay. But the direction is clear: the service earns with room to spare rather than selling tokens at zero margin to gain reach.

There is also a precedent. In March 2025, DeepSeek itself published a breakdown of its inference system. According to it, theoretical daily revenue was about $562K against costs of about $87K for GPU rental, assuming $2 per hour for an H800. That implied a theoretical margin of 545%. The company immediately cautioned that actual revenue is much lower: part of the traffic is free, part is discounted, and V3 is priced below R1. The 82% estimate is more grounded and looks more plausible as a result that reflects the real payment structure.

It follows that DeepSeek's cheap API rests on engineering, not on investor-funded dumping. The sources of savings are known: separating the prefill and decode stages, expert parallelism for MoE models, and aggressive caching. DeepInfer now shows how all of this fits together in a single working stack.

Who can use the code and what changes for the market

The first winners are teams that self-host DeepSeek's open models. Previously they had to piece together optimizations from scattered repositories and guesswork. Now they have a reference from the people who trained these models and serve millions of requests.

The effect will then spread to cloud providers and startups that resell inference. If some of DeepSeek's optimizations become standard, competitors' per-token prices on comparable models will come down. Closed labs will have to explain what customers are paying a premium for. The "it can't get any cheaper" argument is weaker after this release.

In practical terms:

  • Infrastructure teams should compare their own throughput and token-cost metrics against how DeepInfer behaves on their hardware before scaling their own stack.
  • Those building products on APIs now have a new benchmark: with a margin of around 82%, the provider has room for discounts, and price negotiations are worth pursuing more firmly.
  • The Apache 2.0 license removes legal barriers to including the code in a commercial product, but production workloads still need separate testing: DeepSeek's infrastructure is tuned for its own models and its own clusters.

The main question for the coming months is whether anyone else will follow DeepSeek. Many labs already open their models, but only a few have released a full inference stack. If the bar rises, competition will shift from model size to who serves models in production more cheaply and more reliably.

Story

Key Questions Answered

What's in the release?

DeepInfer is not an experimental project or a conference demo. It is the layer that actually serves DeepSeek's user traffic. Code like this usually stays closed: it is where a company squeezes money out of its hardware, and it is the source of low API prices. Here, DeepSeek has handed it over in full. The second component, deepseek-recipe, converts text into tokens and back. It is no minor detail. An error or mismatch in tokenization and decoding breaks compatibility with models, especially when inference is spread across different systems and frameworks. Third-party teams

Where the 82% comes from?

This is not an official DeepSeek figure but an outside calculation. Estimates like this always depend on assumptions: how much a GPU-hour costs, how heavily the cluster is utilized, what share of requests hits the context cache, and what rates customers pay. But the direction is clear: the service earns with room to spare rather than selling tokens at zero margin to gain reach. There is also a precedent. In March 2025, DeepSeek itself published a breakdown of its inference system. According to it, theoretical daily revenue was about $562K against costs of about $87K for GPU

Who can use the code and what changes for the market?

The first winners are teams that self-host DeepSeek's open models. Previously they had to piece together optimizations from scattered repositories and guesswork. Now they have a reference from the people who trained these models and serve millions of requests. The effect will then spread to cloud providers and startups that resell inference. If some of DeepSeek's optimizations become standard, competitors' per-token prices on comparable models will come down. Closed labs will have to explain what customers are paying a premium for. The "it can't get any cheaper" argument is

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Hands-On AI Engineering

Build & Ship Production AI Apps with Vibe Coding

Join Zhemal Khamidun's hands-on Vibe Coding Intensive at hamidun.com/vibecoding — master Claude Code, Cursor, and autonomous agentic workflows.

Explore Vibe Coding →Vibe Academy Platform
What do you think?
Loading comments…