Skip to content
SupportGo to app

Recommend hyperparameters

POST/api/v1/autoscientist/recommend-hyperparams

Returns platform-default hyperparameters sized to a specific model and your dataset's effective training size (rows + any augmentation you plan to add). Pure computation — nothing is launched. POST /autoscientist applies these optimized values automatically when hyperparams is omitted; only pass overrides when strictly necessary.

Body ParametersJSONExpand Collapse
dataset_id: string

The dataset the hyperparameters are sized for. Must be a dataset you own that has finished processing.

model: string

Base model id from GET /training-models to tune for. Required — the recommendation is sized to this model and your dataset.

augmentation_domain_rows: optional number

Number of domain-targeted augmentation rows you plan to add. Defaults to 0. Counted toward the effective training size so the recommendation matches what you will launch.

augmentation_general_rows: optional number

Number of general-diversity augmentation rows you plan to add. Defaults to 0. Counted toward the effective training size.

ReturnsExpand Collapse
hyperparams: object { base_model_size, batch_size, learning_rate, 14 more }

Recommended hyperparameters, sized to your model and effective dataset size. AutoScientist optimizes these values automatically when hyperparams is omitted from POST /autoscientist; only pass overrides when strictly necessary.

base_model_size: optional string
batch_size: optional "max" or number

Either Together's literal 'max' or a positive integer.

One of the following:
"max"
number
learning_rate: optional number
minimum1e-8
maximum0.01
lora_alpha: optional number

Must be 1× or 2× lora_r. Cross-field check is skipped when lora_r is not supplied alongside (the merged-config path uses generateConfig defaults).

lora_dropout: optional number
minimum0
maximum1
lora_r: optional number
minimum1
maximum64
lora_trainable_modules: optional string

'all-linear' or comma-separated module list (e.g. 'q_proj,v_proj').

lr_scheduler_type: optional "linear" or "cosine" or "constant"
One of the following:
"linear"
"cosine"
"constant"
max_grad_norm: optional number
minimum0
min_lr_ratio: optional number
minimum0
maximum1
n_epochs: optional number
minimum1
maximum20
n_evals: optional number
minimum1
maximum100
scheduler_num_cycles: optional number

HyperparamService.generateConfig defaults to 0.5 (half-cycle cosine decay). Range floor is relaxed to 0 to keep that default valid.

minimum0
maximum4
train_on_inputs: optional boolean
training_type: optional "lora" or "full"

Training strategy override. AutoScientist optimizes this by default; set it only when strictly necessary.

One of the following:
"lora"
"full"
warmup_ratio: optional number
minimum0
maximum1
weight_decay: optional number
minimum0

Recommend hyperparameters

curl https://api.prod.adaptionlabs.ai/api/v1/autoscientist/recommend-hyperparams \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $ADAPTION_API_KEY" \
    -d '{
          "dataset_id": "dataset_id",
          "model": "model"
        }'
{
  "hyperparams": {
    "base_model_size": "8B",
    "batch_size": "max",
    "learning_rate": 0.00005,
    "lora_alpha": 0,
    "lora_dropout": 0,
    "lora_r": 8,
    "lora_trainable_modules": "q_proj,v_proj",
    "lr_scheduler_type": "linear",
    "max_grad_norm": 2,
    "min_lr_ratio": 0.1,
    "n_epochs": 1,
    "n_evals": 5,
    "scheduler_num_cycles": 0.5,
    "train_on_inputs": true,
    "training_type": "lora",
    "warmup_ratio": 0.03,
    "weight_decay": 0
  }
}
Returns Examples
{
  "hyperparams": {
    "base_model_size": "8B",
    "batch_size": "max",
    "learning_rate": 0.00005,
    "lora_alpha": 0,
    "lora_dropout": 0,
    "lora_r": 8,
    "lora_trainable_modules": "q_proj,v_proj",
    "lr_scheduler_type": "linear",
    "max_grad_norm": 2,
    "min_lr_ratio": 0.1,
    "n_epochs": 1,
    "n_evals": 5,
    "scheduler_num_cycles": 0.5,
    "train_on_inputs": true,
    "training_type": "lora",
    "warmup_ratio": 0.03,
    "weight_decay": 0
  }
}