Overview
Bake configuration controls model training behavior, including datasets, training parameters, model adapters, and integrations. In bgit, bakes are configured in theBAKE section of your input.yml file.
Naming Best Practice: Always provide a
name field for your bakes. bgit appends a hash to bake names (e.g., v1 becomes v1_abc123def456) to ensure uniqueness. Named bakes are easier to identify in recipe.yml and when tracking model lineage.Core Configuration
Name
Bake name identifier. Required: Always provide a descriptive name.The name will be hashed (e.g.,
main_bake_abc123def456) to ensure uniqueness. Use meaningful names like production_bake, experiment_formal_tone_bake, or yoda_personality_bake.Datasets
List of targets to use as training dataEach dataset has:
target(string, required): Target nameweight(float): Sampling weight (higher = more frequently sampled)
bgit target ls to list all available targets, and bgit target <target_name> to view details of a specific target. This helps you remember which targets were used in previous bakes so you can reference them in new bake configurations.Training Parameters
Number of training epochs
Micro batch size
Gradient accumulation steps for effective batch size
Total number of trajectories to use for training
Random seed for reproducibility
Model Configuration
Model and adapter configurationImportant: In bgit, you don’t configure
parent_model_name manually. This is handled automatically:- First bake: Uses the repository’s base model (set during
bgit init) - Sequential bakes: Automatically uses
PARENT_MODELfrom.bread(set after previous bakes)
baked_adapter_config: LoRA configuration (see below)type: Model type (advanced, defaults to"bake")
LoRA Configuration
LoRA (Low-Rank Adaptation) configuration
Optimizer & Scheduler
Optimizer configuration
Learning rate scheduler
Advanced Configuration
DeepSpeed
DeepSpeed ZeRO configurationZeRO Stages:
- Stage 0: Disabled
- Stage 1: Optimizer state partitioning
- Stage 2: + Gradient partitioning
- Stage 3: + Parameter partitioning
Complete Example
Minimal Example
The simplest bake configuration:main_target should be the name of a target defined in your TARGET section (e.g., TARGET: name: main_target).
Field Reference Table
| Field | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Bake identifier |
datasets | Array | Yes | Training data sources |
epochs | Integer | No | Number of training epochs |
micro_batch_size | Integer | No | Batch size per device |
gradient_accumulation_steps | Integer | No | Gradient accumulation |
seed | Integer | No | Random seed |
model | Object | No | Model configuration |
optimizer | Object | No | Optimizer settings |
scheduler | Object | No | LR scheduler |
deepspeed | Object | No | DeepSpeed config |
Sequential Bakes
When running sequential bakes, thePARENT_MODEL is automatically set from .bread. You don’t need to configure it in input.yml: