DeepSeek’s mid-October serving drop was two repositories with one diagram. DeepInfer is the offline engine that runs DeepSeek-V4.1-Flash at production kernel depth. deepseek-recipe is the protocol and tokenizer layer that turns Chat Completions, Responses, and Messages traffic into the prompts and token IDs those kernels expect, then parses the stream back into the matching API shape.
Operators who stopped at the engine still invent that bridge. DeepSeek’s own Q&A puts Recipe on the reference architecture for the same reason.
Recipe turns three API shapes into one DeepSeek conversation path
deepseek-recipe is a Rust workspace with Python bindings. The README states the job: convert multi-format API requests into a shared Conversation, render DeepSeek V4 and V4.1 prompts, encode those conversations with an attached tokenizer, and convert model output into the corresponding protocol responses. The caller still owns model inference, tool execution, and HTTP transport.
Supported surfaces include Messages, Chat Completions, and Responses, with streaming, thinking mode, client tool calls, Chat Completions prefix continuation, images for V4.1, and structured output via JSON Schema or regex. After encode, ConversationRequest::resolve_max_tokens fills 8192 outside thinking, 65536 in thinking, and 131072 in thinking with max effort when max_tokens is unset. Output parsing covers reasoning content, tool calls, JSON object output, stop sequences, and reasoning_tokens when a tokenizer is attached.
Crates cover protocol conversion, shared types, prompt encoding, and OpenCV image preprocess; deepseek-recipe-python ships on PyPI as deepseek-recipe. Axum and FastAPI examples use mock inference on loopback. An encoding-decoding demo on port 7778 inspects render and decode.
DeepInfer remains the compute half: DeepSeek-V4.1-Flash offline inference on NVIDIA SM100 and Huawei Ascend 950, with Attention DP, MoE expert parallelism plus EPLB, DSpark, and NVIDIA batch-invariant sampling flags. Recipe never claims those kernels. DeepInfer never claims Chat Completions adapters.
DeepSeek’s Flash deployment Q&A names Recipe on the same serving diagram
DeepInfer’s doc/inference_deployment_qa.md joins the trees. DeepSeek writes that it is open-sourcing DeepInfer for large-scale cloud services behind V4.1 Flash, and alongside it deepseek-recipe as a production-grade encoding and decoding component between mainstream LLM API protocols and model token sequences, with logic aligned to the official DeepSeek API. The same overview claims 155 trillion tokens per day on a single cluster and US$38 per GPU-hour at valley pricing; those figures are DeepSeek’s and remain project-reported.
Recipe sits where requests enter and leave: convert protocols to token sequences, segment on special tokens, encode segments in parallel, and block special-token injection from user text that merely spells control markers. The Recipe section covers multi-protocol conversion into one conversation format, Rust conversion with Python bindings, input encoding that maps explicit special ranges by ID while treating lookalike strings as ordinary vocabulary, output parsing that recognises end-of-reasoning and DSML markers by token ID, and streaming state machines across UTF-8 and tool-argument chunks.
GitHub create dates put Recipe on 10 September 2026 and DeepInfer on 16 October 2026. Recipe’s CHANGELOG marks 0.2.0 on 20 October 2026 with model-version resolution for DeepSeek-V4-Pro and DeepSeek-V4.1-Flash, thinking-aware temperature and top_p, logprobs plumbing, JSON Schema and regex structured output, explicit special-token ranges, prefix continuation, deferred tool loading, and image destination filters. That release is the practical pin for Flash hosts today.
MIT Recipe 0.2.0 and Apache DeepInfer leave KV and balancers inside DeepSeek
Licence: deepseek-recipe is MIT, with bundled tokenizer notices under MIT from upstream DeepSeek tokenizers. DeepInfer remains Apache License 2.0. Activity: Recipe showed roughly 2,460 GitHub stars when checked for this draft, with PyPI through 0.2.0; DeepInfer had climbed past 22,000 stars after its 16 October create date. Maturity: Recipe is usable for teams that will own HTTP and a backend and need official-shaped prompts and stream events. DeepInfer is usable for labs that can build CUDA 13 or CANN 9.2 and run offline examples. Production-shaped only after you supply KV cache management and load balancing, which the Q&A says remain tightly coupled to internal infrastructure and are “not yet fully open-sourced,” with further architecture detail on DeepSeek’s Zhihu blog rather than a public tree.
server-rs and server-py prove protocol coverage with mock inference. They do not prove MoE EP64 decode under your traffic mix.
Flash self-hosts that need official API parity start with both trees
Teams hosting DeepSeek-V4.1-Flash, or the 1017 weight cut, and exposing Chat Completions, Responses, or Messages should treat Recipe as the default encoding path before inventing prompt templates. That is the narrow Monday case: DeepSeek’s stated official-API alignment on the Flash stack DeepInfer serves offline, while you still finish KV, disaggregation wiring, and replica balance.
If you already run a mature multi-model gateway and only need Flash kernels, DeepInfer alone may hold until protocol drift shows up in thinking tags, tool DSML, or special-token injection tests. Outside SM100 and Ascend 950, keep vLLM or SGLang in the bake-off and use Recipe where DeepSeek-specific prompt fidelity matters. A managed DeepSeek API remains the call when you refuse to operate either tree.
Mock Recipe servers and closed KV still leave the online half unfinished
Wiring Recipe to mock Axum or FastAPI examples and calling the stack “serving” is the first failure mode: those demos do not run DeepInfer. Hand-rolled prompts invite special-token injection and thinking or tool parse mismatches the Q&A warns about. Pinning Recipe 0.1 after 0.2.0’s public API break fails structured-output and model-version resolution. Offline Pareto charts and green stream parsers still leave missing KV and load balancers blocking online capacity plans. Image URL fetchers without a DestinationFilter open SSRF paths the Recipe README flags for untrusted requests. Export-control constraints on DeepSeek stacks remain a separate policy track from the MIT and Apache licences here.
Pin Recipe 0.2.0 in front of a DeepInfer commit before you size EP and storage
Install deepseek-recipe 0.2.0, render a Chat Completions Flash request to a prompt, and decode a known thinking-plus-tool stream into each protocol you ship. Separately pin a DeepInfer commit, build for your accelerator, and run the offline example against a local 1017 checkpoint. Only then design KV retention, E/P/D ratios, and replica balance against DeepSeek’s published Q&A numbers. The open Monday question is whether official-aligned encoding plus the offline engine shortens the path to a Flash host clients treat like DeepSeek’s API, or whether the still-closed cache and balancer layer remains the schedule risk.
