Training
The training key of the config.
Controls the model training process.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
max_epochs | integer (≥ 1) | yes | The maximum number of epochs to train for. | |
batch_size | integer (≥ 1) | yes | The number of inputs to process in each training batch (see: input_preprocessing). | |
optimizer | Optimizer | yes | Controls the optimization algorithm used to update the model's weights. | |
scheduler | Scheduler | yes | Controls how the learning rate is modified over the course of training. | |
encoder_training_strategy | EncoderTrainingStrategy | yes | Controls how encoder weights are managed during training. | |
early_stopping | EarlyStopping | no | null | End fine tuning early if model performance is no longer improving. |
Optimizer
One of the following, selected by its name field:
name | Type |
|---|---|
adamw | AdamW |
manual | EscapeHatchComponent |
Scheduler
One of the following, selected by its name field:
name | Type |
|---|---|
manual | EscapeHatchComponent |
plateau | Plateau |
EncoderTrainingStrategy
One of the following, selected by its name field:
name | Type |
|---|---|
freeze_unfreeze | EncoderFreezing |
layer_wise_lr_decay | LayerWiseLRDecay |
EarlyStopping
Controls early-stopping behavior during supervised fine tuning.
Monitors a validation metric and stops training after patience epochs without improvement. When monitoring begins depends on the encoder strategy: immediately for layer-wise LR decay, or after the encoder unfreeze epoch for freeze/unfreeze.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
patience | integer (≥ 1) | yes | Epochs without improvement before stopping. |
AdamW
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | "adamw" | yes | ||
lr | number (≥ 0) | yes | The learning rate to use for the optimizer. |
Plateau
Lowers learning rate via an exponential decay strategy when model performance plateaus.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | "plateau" | yes | ||
factor | number (≥ 0, ≤ 1) | yes | Multiplicative factor of learning rate decay. LR = LR * factor. | |
patience | integer (≥ 0) | yes | Number of epochs with no improvement after which learning rate will be reduced. | |
min_lr | number (≥ 0) | yes | A lower bound on the learning rate. | |
cooldown | integer (≥ 0) | yes | Number of epochs to wait before resuming normal operation after lr has been reduced. |
EncoderFreezing
Freeze encoder weights for a number of epochs, then unfreeze at a reduced learning rate.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | "freeze_unfreeze" | no | "freeze_unfreeze" | |
unfreeze_at_epoch | integer (≥ 0) | yes | The epoch at which weights in the encoder can be updated by the optimizer. | |
unfreeze_lr_factor | number (≥ 0) | yes | The factor by which the learning rate is multiplied when the encoder is unfrozen. |
LayerWiseLRDecay
Apply per-layer learning rate decay to the encoder from the start of training.
Each encoder layer receives a learning rate scaled by decay_factor relative to the next layer. The configured optimizer learning rate applies to the decoder (last layer). Layer i gets: lr * decay_factor^(num_layers - i).
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | "layer_wise_lr_decay" | yes | ||
decay_factor | number (> 0, ≤ 1) | yes | Multiplicative factor applied per layer. Layer i LR = base_lr * decay_factor^(num_layers - i). | |
num_layers | integer (≥ 1) | yes | Number of encoder layers. Must match the foundation model metadata (e.g. 4 for Nano, 12 for Tiny/Base). |