Docs · how to
Write a recipe
Define your own engine, hardware, arguments, API adapter and parity suite for a model, starting from a catalog recipe or from scratch.
Write a recipe when the catalog has nothing for your hardware or model, or when you want tuned settings to be reusable. Recipes live in the recipes block of denv.yaml. Full field list: denv.yaml.
Start from a catalog recipe
Most recipes change a few fields of an existing one. extends inherits everything else, including the model families and the parity suite.
recipes:
- name: ds-flash-h200
version: 1
extends: deepseek-v4.1-flash/sglang@2
hardware: [h200]
engine: { name: sglang, version: 0.6.1 }
args: { tp: 8, ep: 8, enable-dp-attention: true }
Or write one from scratch
For a model with no catalog recipe, such as your own fine-tune:
recipes:
- name: acme-support-70b
version: 1
models: [acme-support]
engine: { name: vllm, version: 0.11.0 }
hardware: [h100, h200]
topology: { mode: aggregated, gpus: 4 }
args:
tensor-parallel-size: 4
max-model-len: 32768
enable-prefix-caching: true
adapter: engine
parity: parity/acme-support.jsonl
Choose the engine version
denv engine list
Pick a version that lists every hardware id you put in hardware, and every feature your arguments rely on, such as expert parallelism or structured outputs. See Engines.
Arguments
args are passed to the engine as flags. They are validated against the engine version, so a flag the version does not know fails validation instead of failing at startup on a host.
Choose the adapter
The adapter turns API requests into prompts and model output into API responses. It decides how tool calls, reasoning content, structured output and stop sequences behave, which is most of what callers notice.
| Adapter | Use when |
|---|---|
engine |
The engine's own OpenAI-compatible server and the model's chat template are enough. |
deepseek-recipe |
DeepSeek V4 and V4.1 models. Built on DeepSeek's open-source deepseek-recipe, which DeepSeek describes as its production encoding and decoding component, released "to bring the same API behavior to community deployments". |
If your fine-tune changed the chat template, use engine with the template in the weights, and make sure your parity suite covers tool calls.
Set a parity default
parity points to the suite every release using this recipe runs unless the release sets its own. A recipe without a parity suite can be used, but its deployments cannot pass a parity gate. See Run parity checks.
Validate and register
denv recipe validate --dry-run
denv recipe validate
ds-flash-h200@1 ok sglang 0.6.1 · h200 · 3 fleets can run it
acme-support-70b@1 ok vllm 0.11.0 · h100, h200 · 2 fleets can run it
Validation checks that the engine version supports the hardware and arguments, that extends resolves, and that the parity file parses.
Versioning rules
- A recipe is referenced as
name@version. - Once a release uses a version, that version is immutable. Change anything and bump
version. - Releases keep the version they were created with. A new recipe version affects only new releases.
- Validating an unused version again replaces it.
Use it
release:
model: acme-support
weights: s3://acme-models/support-70b@3HL4kqtJlcpXroDTDmJ.rmSpXd3dIbrHY
recipe: acme-support-70b@1
Then denv release and deploy as usual.