DeepSeek open-sources the inference framework that runs V4.1-Flash
DeepSeek has released DeepInfer under the Apache 2.0 licence and says it uses the framework to run its V4.1-Flash service. DeepInfer supports only this model and NVIDIA’s SM100 and Huawei’s Ascend 950 hardware. Several components needed for a complete service are still missing, including a cache system.
Chinese AI company DeepSeek released DeepInfer as open source under the Apache 2.0 licence on 20 October. DeepInfer is an inference framework, the software that runs a trained model by taking in requests and producing responses. The company says the same framework runs the production service for its DeepSeek-V4.1-Flash model. On X, DeepSeek said it wanted to help others reduce compute costs and energy consumption.
The release has clear limits. Its GitHub description says DeepInfer supports only V4.1-Flash. It generates text directly from within a program without a server, which is known as offline inference. The company says the release still lacks three components needed for a complete inference service. The first is a cache system that stores the computation for inputs already processed so it can be reused. The second is splitting input processing (prefill) and response generation (decode) across separate machines. The third is load balancing between parallel copies of the model. DeepSeek said that most of the functionality needed for the split is already in the framework.
The framework runs on NVIDIA’s SM100-series GPUs and Huawei’s Ascend 950 NPUs. It also needs Linux, Python 3.12, GCC 13 or later and CUDA 13, or CANN 9.2 on Ascend. Users build the framework from source. On its first run, it downloads the DeepSeek-V4.1-Flash-1017 version of the model from Hugging Face. In DeepSeek’s own performance benchmarks, four GPUs processed inputs and 64 GPUs generated responses.
To speed up response generation, the model proposes several upcoming tokens at once (draft tokens), and a confidence estimate decides when the framework checks these proposals. The framework can also force a response to follow a regular expression, a JSON schema or an EBNF grammar (structured outputs). With deterministic sampling, the same input and settings produce the same output. This works only on NVIDIA hardware and only when draft tokens are switched off.
DeepSeek originally built DeepInfer largely on top of the open-source vLLM framework. The Decoder reported that DeepSeek also released deepseek-recipe, a component that processes tokens the same way as the company’s official API. This would let self-hosted setups behave like the company’s API. The site also said that DeepSeek will release the code for future models as open source.
Shawn Wang (swyx on X) drew attention to a Chinese-language post that DeepSeek published on Zhihu. A screenshot Wang posted shows the service’s design goals: support for chips from multiple vendors, input processing on standard eight-card machines, response generation on groups of 64–128 cards, and keeping the cache for more than 72 hours.
In Wang’s translation, DeepSeek says a single cluster processes 155 trillion tokens a day and earns $38 per card per hour at off-peak prices. The token figure is also visible in the screenshot, but the revenue figure is not. Wang estimates that a GPU hour costs about $5–10 and concludes that DeepSeek’s margin would be about 80 per cent. The cost assumption and the margin calculation are Wang’s own, not DeepSeek’s.