Skip to content
GitHub
View on GitHub

API Reference

API reference for training-gym public classes.

Complete reference for the training-gym Python library.

ClassDescription
ModelConfigBase class for model identity and weight-download logic.
HFModelConfigurationModelConfig for models hosted on HuggingFace.
ModelArchitectureTransformer architecture parameters for a specific model.
DatasetConfigDataset configuration shared across training frameworks.
HuggingFaceDatasetDataset backed by a HuggingFace datasets repo.
HarborDatasetDataset backed by a Harbor task directory structure.
WandbConfigWeights & Biases logging configuration shared across all frameworks.
ModalRayClusterBase class for bootstrapping a Ray cluster inside Modal clustered functions.
TrainResultOne completed training run’s checkpoint handle.
ClassDescription
EvalConfigEvaluate a deployed model on a dataset config.
EvalResultSaved results for one evaluation run across a dataset.
EvalRowResultOne model interaction: the prompt, the raw response, its parsed
HarborEvalEvaluate a deployed model on a Harbor dataset using sandbox execution.
ClassDescription
ToolCallA parsed tool invocation from model output.
ParsedResponseStructured result of parsing raw model output.
parse_qwen3_responseParse Qwen3-family model output into structured content.
Qwen3-0.6BQwen3-0.6B (0.6 billion parameters) from Alibaba.
Qwen3-1.7BQwen3-1.7B (1.7 billion parameters) from Alibaba.
Qwen3-4BQwen3-4B (4 billion parameters) from Alibaba.
Qwen3-8BQwen3-8B (8 billion parameters) from Alibaba.
Qwen3-14BQwen3-14B (14 billion parameters) from Alibaba.
Qwen3-30B-A3BQwen3-30B-A3B (30B total, ~3B active) MoE model from Alibaba.
Qwen3-32BQwen3-32B (32 billion parameters) from Alibaba.
Qwen3.6-27BQwen3.6-27B (27B-parameter dense) model from Alibaba.
Qwen3.6-35B-A3BQwen3.6-35B-A3B (35B total, ~3B active) MoE model from Alibaba.
ClassDescription
TrainConfigCompose dataset, model, and recipe into one training entrypoint.
MultiTurnConfigure multi-turn rollout for conversational RL training.
SlimeRecipeRecipe dataclass for configuring slime GRPO training on Modal.
Qwen3_6_27b_RecipeQwen3.6-27B dense hybrid model on 1×8×H100 with TP4×PP2, colocated GRPO.
Qwen3_6_35b_RecipeQwen3.6-35B-A3B (MoE) on 1×8×H100 with TP2/PP2/CP1/EP4.
ClassDescription
DeploymentConfigDeploy a model behind a serving engine.
ModelDeploymentA deployed model endpoint.
SglangRecipeSGLang serving configuration.
VllmRecipevLLM serving configuration.