View on GitHub
"```python\nfrom modal_training_gym.common.deployment import DeploymentConfig\n```\n\nDeploy a model behind a serving engine.\n\nWhen `recipe` is `None`, defaults to `SglangRecipe()`.\n\n## Fields\n\n| Field | Type | Default | Description |\n|-------|------|---------|-------------|\n| `model` | `ModelConfig` | | |\n| `checkpoint` | `modal_training_gym.common.checkpoint.Checkpoint \\| None` | `None` | |\n| `recipe` | `VllmRecipe \\| SglangRecipe \\| None` | `None` | |\n| `app_name` | `str \\| None` | `None` | |\n| `served_model_name` | `str \\| None` | `None` | |\n| `unauthenticated` | `bool` | `True` | |\n\n## Methods\n\n### `serve(self) -> \"'ModelDeployment'\"`\n\nBuild, deploy, and return a `ModelDeployment` handle.\n\n## Related Tutorials\n\n- [Qwen3-4B haiku evaluation with verifiable rewards — serve, evaluate, train, compare](/tutorials/rl/000_rl_basics/)\n- [Code RL with Harbor hello-world and sandboxed verification](/tutorials/rl/001_sandboxes/)\n- [Multi-turn number-guessing RL with custom generate and reward functions](/tutorials/rl/002_multiturn/)\n- [On-policy distillation on math — Qwen3-8B teacher, Qwen3-4B student](/tutorials/rl/003_on_policy_distillation/)\n- [DAPO on math with Qwen3-4B](/tutorials/rl/005_dapo/)\n- [Audio GRPO on Qwen3-ASR-1.7B — transcribe LibriSpeech, reward −WER](/tutorials/rl/006_audio_asr/)\n- [GUI grounding with Qwen3-VL-8B — predict click coordinates from screenshots](/tutorials/rl/008_computer_use/)\n- [Cross-tokenizer agentic distillation on BFCL v3 multi-turn with live, execution-grounded rewards — DeepSeek V4 Flash teacher, Qwen3.6-35B-A3B student](/tutorials/rl/009_cross_tokenizer_distillation/)\n\n**Source:** [`modal_training_gym/common/deployment.py`](https://github.com/modal-projects/training-gym/blob/main/modal_training_gym/common/deployment.py)\n"
DeploymentConfig
Deploy a model behind a serving engine.
from modal_training_gym.common.deployment import DeploymentConfigDeploy a model behind a serving engine.
When recipe is None, defaults to SglangRecipe().
Fields
Section titled “Fields”| Field | Type | Default | Description |
|---|---|---|---|
model | ModelConfig | ||
checkpoint | modal_training_gym.common.checkpoint.Checkpoint | None | None | |
recipe | VllmRecipe | SglangRecipe | None | None | |
app_name | str | None | None | |
served_model_name | str | None | None | |
unauthenticated | bool | True |
Methods
Section titled “Methods”serve(self) -> "'ModelDeployment'"
Section titled “serve(self) -> "'ModelDeployment'"”Build, deploy, and return a ModelDeployment handle.
Related Tutorials
Section titled “Related Tutorials”- Qwen3-4B haiku evaluation with verifiable rewards — serve, evaluate, train, compare
- Code RL with Harbor hello-world and sandboxed verification
- Multi-turn number-guessing RL with custom generate and reward functions
- On-policy distillation on math — Qwen3-8B teacher, Qwen3-4B student
- DAPO on math with Qwen3-4B
- Audio GRPO on Qwen3-ASR-1.7B — transcribe LibriSpeech, reward −WER
- GUI grounding with Qwen3-VL-8B — predict click coordinates from screenshots
- Cross-tokenizer agentic distillation on BFCL v3 multi-turn with live, execution-grounded rewards — DeepSeek V4 Flash teacher, Qwen3.6-35B-A3B student