Skip to content

sft_trainer

diapason.learning.intelligence.orchestrator.sft_trainer

SFT (Supervised Fine-Tuning) trainer for orchestrator.

Adapted from IPW's sft_trainer.py. Trains the orchestrator policy using supervised learning on trajectories. All torch/transformers imports are guarded so the module can be imported without GPU dependencies.

OrchestratorSFTConfig dataclass

Configuration for orchestrator SFT training.

OrchestratorSFTDataset

Dataset for SFT training from generated trace JSONL files.

OrchestratorSFTTrainer

SFT trainer for orchestrator policy.

Performs standard next-token cross-entropy loss on successful trajectories. torch must be installed to call :meth:train.

train()

Run the SFT training loop.