How whitecircle/halo works
Halo is a framework for pre- and post-training Hugging Face language and multimodal models, from SFT and preference optimization to asynchronous multi-turn RL. A typical run enters through its CLI and configuration, prepares data and a model, then trains using shared distributed infrastructure and writes standard checkpoints. For environmental RL, rollout actors interact with inference servers while the trainer scores trajectories and synchronizes updated weights. README-level capability descriptions establish several links below; source excerpts are partial, so finer internal calls and some subsystem wiring are not asserted.
Main entry points: loop Trainer loop · rollouts Rollout orchestration · grpo GRPO training · configs Training configs
Components 22
Run setup
- CLI entrypoint
halo/cli.py - Training configs
halo/configs - Data preparation
halo/data
Training methods
- Pretrain and SFT
halo/trainers/sft.py - Preference training
halo/trainers/preference - Distillation
halo/trainers/distillation - GRPO training
halo/trainers/grpo - Trainer loop
halo/trainers/loop - Optimizers and kernels
halo/optimizers
Distributed execution
- Parallelism config
halo/distributed/parallelism_config.py - Parallel model execution
halo/distributed - Pipeline training
halo/trainers/parallelism/pipeline_trainer.py
RL rollouts
- Task environments
halo/environments - Rollout orchestration
halo/environments/rollouts - Inference engines
halo/weight_sync/clients - Weight synchronization
halo/weight_sync - Reward scoring
halo/rewards
Models and checkpoints
- Model loading
halo/model_loading - Checkpoint I/O
halo/checkpoint - Checkpoint files
Other components
- Training operator
- vLLM or SGLang
Connections 24
- Training operator → CLI entrypoint: launches
README.md - CLI entrypoint → Training configs: loads config
- Training configs → Data preparation: configures
README.md - Training configs → Model loading: configures
halo/model_loading/tokenizer_setup.py - Data preparation → Pretrain and SFT: provides batches
- Model loading → Pretrain and SFT: provides model
README.md - Pretrain and SFT → Trainer loop: trains with
README.md - Preference training → Trainer loop: shares infrastructure
README.md - Distillation → Trainer loop: shares infrastructure
README.md - GRPO training → Trainer loop: trains with
README.md - Trainer loop → Optimizers and kernels: updates parameters
- Parallelism config → Parallel model execution: configures axes
README.md - Trainer loop → Parallel model execution: uses
README.md - Trainer loop → Pipeline training: uses when enabled
halo/trainers/parallelism/pipeline_trainer.py - Parallel model execution → Model loading: parallelizes model
README.md - Trainer loop → Checkpoint I/O: saves and resumes
README.md - Checkpoint I/O → Checkpoint files: reads and writes
- GRPO training → Rollout orchestration: runs rollouts
README.md - Rollout orchestration → Task environments: executes tasks
halo/environments/rollouts/engine_wire.py - Rollout orchestration → vLLM or SGLang: requests generations
README.md - vLLM or SGLang → Inference engines: engine integration
- Rollout orchestration → Reward scoring: scores trajectories
- GRPO training → Weight synchronization: pushes updated weights
README.md - Weight synchronization → vLLM or SGLang: synchronizes weights
README.md