Skip to main content
Recipes are pre-built workflows for training and evaluating models. Run them on Adaptive’s compute infrastructure.

Run a recipe

job = adaptive.jobs.run(
    recipe_key="sft",
    num_gpus=1,
    args={
        "model_to_train": "llama-3.1-8b-instruct",
        "output_model_key": "my-model-v1",
        "dataset": "my-training-data",
        "epochs": 3,
    },
)
ParameterTypeRequiredDescription
recipe_keystrYesRecipe identifier (see below)
num_gpusintYesNumber of GPUs to use
argsdictYesRecipe-specific arguments

Built-in recipes

Training:
RecipeKeyUse when
Supervised fine-tuningsftYou have high-quality completions
RL on preferencespreference_rlhfYou have preferred/rejected pairs
RL on metricsmetric_rlhfYou have completion-level scores
RL with graderrlCriteria can be expressed in natural language
Evaluation:
RecipeKeyUse when
Evaluate with graderevalComparing model performance

Run an evaluation

adaptive.jobs.run(
    recipe_key="eval",
    num_gpus=2,
    args={
        "dataset": "eval-prompts",
        "models_to_evaluate": ["model-a", "model-b"],
        "graders": ["quality-judge"],
    },
)
Results appear as evaluation artifacts with score tables and per-sample interactions. Evaluations use Graders to score completions.For custom recipes, see Custom Recipes.See SDK Reference for all job methods.