Skip to content
Repo

SDK reference

Classes and methods in the modal-training-gym Python SDK.

NameDescription
Gemma-4-26B-A4B-itGoogle Gemma-4-26B-A4B-it multimodal MoE model with 25.2B total and 3.8B active parameters.
GLM-4.7Zhipu AI GLM-4.7 MoE model with 355B total and 32B active parameters.
HFModelConfigurationDownloads Hugging Face model weights with snapshot_download.
Inkling-SmallThinking Machines Lab Inkling-Small MoE model with 276B total and 12B active parameters.
ModelArchitectureMegatron transformer architecture parameters.
ModelConfigDefines model identity, weight download, and response parsing.
Moonlight-16B-A3B-InstructMoonshot AI Moonlight model with 16B total and 3B active parameters.
Qwen3-0.6BAlibaba Qwen3-0.6B model.
Qwen3-1.7BAlibaba Qwen3-1.7B model.
Qwen3-30B-A3BAlibaba Qwen3-30B-A3B MoE model with 30B total and 3B active parameters.
Qwen3-4BAlibaba Qwen3-4B model.
Qwen3-8BAlibaba Qwen3-8B model.
Qwen3-ASR-1.7BAlibaba Qwen3-ASR-1.7B speech recognition model.
Qwen3-VL-8BAlibaba Qwen3-VL-8B-Instruct model.
Qwen3.5-0.8BAlibaba Qwen3.5-0.8B model.
Qwen3.5-2BAlibaba Qwen3.5-2B model.
Qwen3.5-4BAlibaba Qwen3.5-4B model.
Qwen3.5-9BAlibaba Qwen3.5-9B model.
Qwen3.6-27BQwen3.6-27B dense hybrid Gated DeltaNet/attention model.
Qwen3.6-35B-A3BAlibaba Qwen3.6-35B-A3B model.
Qwen3.8-27BAlibaba Qwen3.8-27B model.
ToolCallTool invocation parsed from model output.
NameDescription
DatasetConfigDataset fields and materialization behavior shared across training frameworks.
HarborDatasetA dataset loaded from Harbor tasks.
HuggingFaceDatasetA dataset loaded from a Hugging Face datasets repository.
NameDescription
Gemma4_26B_A4B_RecipeGemma-4-26B-A4B GRPO recipe on 1 node with 8 H200 GPUs.
GLM_4_7_RecipeGLM-4.7 MoE GSPO recipe for 8 trainer nodes and 8 rollout nodes, each with 8 H200 GPUs.
Inkling_Small_LoRA_RecipeInkling-Small rank-32 LoRA GRPO recipe for 4 nodes with 8 H200 GPUs each.
Inkling_Small_RecipeInkling-Small full-parameter GRPO recipe for 4 nodes with 8 H200 GPUs each.
Moonlight_16B_A3B_RecipeMoonlight-16B-A3B DAPO recipe for 1 node with 8 H100 GPUs.
Qwen3.5-0.8B_RecipeQwen3.5-0.8B GRPO recipe for 1 node with 8 H100 GPUs.
Qwen3.5-2B_RecipeQwen3.5-2B GRPO recipe for 1 node with 8 H100 GPUs.
Qwen3.5-4B_RecipeQwen3.5-4B GRPO recipe for 1 node with 8 H100 GPUs.
Qwen3.5-9B_RecipeQwen3.5-9B GRPO recipe for 1 node with 8 H100 GPUs.
Qwen3_0_6B_RecipeQwen3-0.6B GRPO recipe for 1 node with 8 H100 GPUs.
Qwen3_1_7B_RecipeQwen3-1.7B GRPO recipe for 1 node with 8 H100 GPUs.
Qwen3_4B_RecipeQwen3-4B GRPO recipe for 1 node with 8 H100 GPUs.
Qwen3_5_4B_Miles_RecipeQwen3.5-4B GRPO recipe for 1 node with 8 H100 GPUs.
Qwen3_6_27B_RecipeQwen3.6-27B GRPO recipe for 4 nodes with 8 H100 GPUs each.
Qwen3_6_35B_RecipeQwen3.6-35B-A3B MoE recipe for 1 node with 8 H100 GPUs.
Qwen3_8_27B_RecipeQwen3.8-27B GRPO recipe for 4 nodes with 8 H100 GPUs each.
Qwen3_8B_RecipeQwen3-8B GRPO recipe for 1 node with 8 H100 GPUs.
Qwen3_ASR_1_7B_RecipeQwen3-ASR-1.7B audio GRPO recipe for 1 node with 2 H100 GPUs.
Qwen3_VL_8B_RecipeQwen3-VL-8B GRPO recipe for 1 node with 8 H100 GPUs.
NameDescription
MetricConfigDefines metric tracker metadata, environment variables, and links.
MilesRecipeMiles training and Modal resource settings.
ModalRayClusterStarts and coordinates a Ray cluster inside a Modal clustered function.
SlimeRecipeSlime training and Modal resource settings.
TrackioConfigTrackio logging configuration shared across all frameworks.
TrainConfigA dataset, model, and recipe for one training run.
TrainingGroupA parameter sweep over a base TrainConfig.
TrainingRunA launched training run that can be inspected, awaited, or loaded by ID.
TrainResultResult metadata and checkpoints for a completed training run.
WandbConfigWeights & Biases run metadata and credentials.
NameDescription
CustomDeploymentA model deployed with an SGLang or vLLM recipe.
DeepSeek_V4_Flash_SglangRecipeDeepSeek-V4-Flash 284B MoE SGLang recipe with 13B active parameters for 4×B200.
EndpointControls a Modal Endpoint that persists until stopped.
GLM_4_7_SglangRecipeGLM-4.7 355B-A32B MoE SGLang recipe for 8×H200.
ParsedResponseStructured result of parsing raw model output.
Qwen3_0_6B_SglangRecipeQwen3-0.6B SGLang recipe for 1×H100.
Qwen3_0_6B_VllmRecipeQwen3-0.6B vLLM recipe for 1×H100.
Qwen3_1_7B_SglangRecipeQwen3-1.7B SGLang recipe for 1×H100.
Qwen3_1_7B_VllmRecipeQwen3-1.7B vLLM recipe for 1×H100.
Qwen3_30B_SglangRecipeQwen3-30B-A3B (MoE) SGLang recipe for 4×H100.
Qwen3_30B_VllmRecipeQwen3-30B-A3B (MoE) vLLM recipe for 4×H100.
Qwen3_4B_SglangRecipeQwen3-4B SGLang recipe for 1×H100.
Qwen3_4B_VllmRecipeQwen3-4B vLLM recipe for 1×H100.
Qwen3_6_35B_SglangRecipeQwen3.6-35B-A3B (MoE) SGLang recipe for 4×H100.
Qwen3_6_35B_VllmRecipeQwen3.6-35B-A3B (MoE) vLLM recipe.
Qwen3_8B_SglangRecipeQwen3-8B SGLang recipe for 1×H100.
Qwen3_8B_VllmRecipeQwen3-8B vLLM recipe for 1×H100.
SglangRecipeSGLang server settings.
VllmRecipevLLM server settings.