Training configuration
The training recipe fields to set before a run, what a released model supplies by itself, and the settings that control memory and learning rate.
Copy an existing recipe instead of starting from an empty JSON:
cp configs/train/qwen/sft_finetune_lora.json finetune.json
python -m valen.train --config finetune.json
Set these fields before running; paths are relative to your working directory.
| Field | Set it to |
|---|---|
model.model_path | Cached complete Valen model directory |
data.path | Your training JSONL |
training.output | A new directory for this experiment |
training.epochs, max_steps | Stop when either budget is reached |
training.tokens_per_step | Token budget per GPU update; lower it to reduce memory |
data.max_length | Maximum complete shared-state sequence length |
The complete model supplies the saved Mixer architecture, execution mode and media settings. A Valen-Decision-1.5 model also supplies its attention mask (full_attention_mask, bbox_blocks in the released models) and its trained grounding head (grounding_head), so the same recipe fine-tunes it with the architecture it was released with.
Leave the saved architecture, attention mask and grounding head unchanged when continuing a released model.
Memory and learning rate
Start with the recipe's SDPA, BF16 and LoRA settings. microbatch_size limits simultaneous states; microbatch_max_tokens limits padded forward tokens. Reducing either can lower peak memory without changing the update token budget. A single state must still fit its sequence and update limits.
head_lr, lora_lr and merger_lr control their corresponding parameter groups. Full fine-tuning uses language_lr and vision_lr too. Choose changes on validation data, then keep the test set untouched.
For exact fields and values, use the source recipes: LoRA, full, Qwen-base stages. Resume rules