镜像按架构分开且没有 latest 标签,需按 GPU 型号选 blackwell 或 hopper 标签;RL 推理需另拉 vLLM/SGLang 镜像(如 :vllm-0.32.0);1.2.0 起导入包名改为 halo,并依赖 transformers 5.20、TRL 1.14、vLLM 0.32、SGLang 0.5.22。

halo
whitecircle活跃维护Halo 是 White Circle 开源的大模型与多模态模型训练框架,支持分布式训练、LoRA 微调、MoE 和异步强化学习,方便搭建和扩展训练流程。
Halo is an open-source framework built by White Circle for training large language and multimodal models
docker pull public.ecr.aws/whitecircle/halo:blackwell
halo launch sft examples/sft/qwen3/qwen3-4b-ultrachat-lora.yamlREADME 未给出显存要求;官方镜像按架构区分,B200/B300 用 blackwell 镜像(FA4+FA2+DeepEP),H100/H200 用 hopper 镜像(FA2+FA3+DeepEP),并提到对 Blackwell、Hopper 及更老 GPU 有回退路径。
White Circle 开源的大模型与多模态训练框架,直接训练 Hugging Face 模型,覆盖预训练到多轮 RL
Halo 是 White Circle 开源的大模型与多模态模型训练框架,支持分布式训练、LoRA 微调、MoE 和异步强化学习,方便搭建和扩展训练流程。
核心能力
- 直接训练 Hugging Face 模型,检查点仍可用 from_pretrained 加载
- 在原生模型上叠加 EP/CP/TP/ETP/PP 并行,无需另写分布式实现
- 预训练、SFT、偏好优化、蒸馏与 RL 共用同一套并行与检查点代码
- 异步多轮 RL 用 Ray actor 跑 vLLM/SGLang 环境,权重经 NCCL 同步
- 集成 FA4、Liger、Grouped GEMM、DeepEP V2 与 padding-free 打包
容易踩的坑
- v1.3.0rc1Halo 1.3.0rc1: faster GRPO at scale, score centering and FP8 rolloutspre-release2026-11-08 · 2026-11-08 22:07 UTC
查看更新说明
Halo 1.3.0rc1 is a release candidate for faster reinforcement learning at scale. On synchronous GRPO with Qwen3.5-35B-A3B on two 8× B300 nodes, a step takes 0.137 s per 1k response tokens against Miles v0.1.3's 0.176, and 0.102 against 0.111 with rollouts overlapped. The gain comes from packing rows into token-budget micro-batches, taking importance weights from the loss forward instead of a separate no-grad pass, and syncing weights to several rollout servers through one group. The release also adds score centering for environmental GRPO on SGLang, rollouts on block-FP8 weights, GRPO training of GLM-5.3-Flash, adapter-only weight sync to SGLang for LoRA policies, striped gathered expert-parallel (EP) saves, and adapter merges that load no model. It lifts a DeepEP dispatch limit that the installed DeepEP no longer has, and moves the Qwen3.5/3.6 recipes to FlashAttention-2 with packing.
Startup now refuses several setups that used to fail hours into a run or train silently wrong. The
halopackage also regroups its top-level modules underhalo/models,halo/environmentsandhalo/trainersinto subpackages, so imports of the old paths break, andnum_rollout_workersis nowrollout_actor_budget. This is a pre-release: the moving image tags stay on 1.2.0 until a final 1.3.0.MIGRATION-1.3.0rc1.md, attached to this release, maps every moved module and every changed config key.
Highlights
- GRPO against Miles. Qwen3.5-35B-A3B on GSM8K, 32 prompts × 8 rollouts, one 8× B300 trainer node and one SGLang node, three alternated runs each with prompts identical token for token, in seconds per 1k response tokens. On-policy (steps 3-12) Halo takes 0.137 and Miles v0.1.3 0.176, a step of 14.0 against 18.6 s, with the trainer node peaking at 63 against 109 GiB. With rollouts overlapped (steps 4-14) Halo takes 0.102 and Miles 0.111 (GRPO against Miles).
- Packing. On the same setup with Halo alone, three alternated runs, the trainer phase and the whole step in seconds per 1k response tokens read 0.034 and 0.163 at 8 rows per micro-batch, 0.018 and 0.141 packed, and 0.014 and 0.143 packed with loss-forward weights. The trainer phase falls by more than half while the whole step moves far less, because generation and sync dominate it.
- Recipes on short rounds. Qwen3.6-35B-A3B, 4 turns × 1,024 tokens, react_math on GSM8K, one run, steps 2-3, whole step with sync, from SDPA to FA2 with packing: environmental full fine-tuning at
ep4from 23.9 to 10.1 s, environmental LoRA on SGLang from 18.0 to 8.6 s, and an online smoke run from 6.8 to 4.3 s. With the code-contests recipe's own objective settings, FA2 takes 21.2 s and packed 16.7 s (steps 2-4, evaluation pass removed, noisy). - Loss-forward weights in online GRPO. On Qwen3.5-35B-A3B under FSDP2, one run per arm, steps 3-5, the 1.7 s no-grad phase disappears and the whole step falls from 23.6 to 22.3 s (-5.6%).
- Weight sync through one group. Total push time against one server, with
rollout_sync_topology: single_group, is 1.27× faster for 4 vLLM servers, and for 8 servers across 2 nodes 1.27× on vLLM and 1.76× on SGLang. - Long rows. Update pass, seconds per 1k loss tokens at 16k, 64k and 128k tokens: Qwen3-8B on FA2 0.261, 0.581 and 1.010, and on FA4 at 64k and 128k 0.270 and 0.397; Qwen3.5-35B-A3B 0.193, 0.260 and 0.399, with peaks of 78 and 81 GiB at 128k.
What is new
GRPO packing and importance weights.
packed_microbatch_tokens(off by default) plans each round into token-budget bins and runs every bin as one varlen call, rescaling row-mean losses so a window sums to the per-row loss. M-RoPE models are admitted, and a GPU gate scores rows alone and packed for each decoder family.loss_forward_importance_weights(off by default) skip - v1.2.0Halo 1.2.0: pipeline parallelism, faster training and Nemotron 3.5最新正式版2026-11-04 · 2026-11-04 19:59 UTC
Halo 1.2.0 trains faster than 1.1.0 on all twelve SFT shapes we benchmarked, from 1.11× to 2.07× by wall clock at batch 1 with gradient checkpointing on, most of all under tensor and expert-tensor parallelism, and on ten of them peak allocated memory falls or stays within 0.07 GiB. New kernels for DSA attention and hyper-connections take GLM-5.3-Flash's LoRA setup to 2.22× at 8,192 tokens and 2.68× on rows of about 15,500 against the build before them. It adds pipeline parallelism, NVIDIA's Nemotron 3.5 Super VL and Lightning, SFT training for the multi-token-prediction (MTP) heads that Qwen, GLM and Nemotron releases ship, and tree packing for SFT. Qwen3-Next now trains under expert parallelism, and Qwen3.8-Flash-Next is added as experimental. The stack moves to transformers 5.20, TRL 1.14 and Liger 0.8.4, RL rollouts run on vLLM 0.32 or SGLang 0.5.22, and the import package is now
haloinstead ofsrc.The release also fixes bugs that gave wrong results with no error, among them PaliGemma training without a causal mask, FSDP2 under reentrant checkpointing dropping the gradients of a layer run more than once per backward, adapters in most vision towers staying at init under reentrant checkpointing, and accelerate's
fsdp2_full_config.yamlleaving the frozen reference and teacher models zero on most ranks. The trainer now reads each rollout server at startup and refuses one that would train or serve wrong.Upgrading takes renames in Python code, scripts and tool flags, one renamed YAML key, config values that are now refused, and the 1.2.0 rollout images. MIGRATION-1.2.0.md, attached to this release, is the full upgrade checklist and maps every renamed class, script, tool flag and module.
Highlights
- Throughput against 1.1.0. On 8× B300 at batch 1 with gradient checkpointing on, over seeded uniform token ids and interleaved by wall clock, 1.2.0 leads on all twelve shapes, from 1.11× on Qwen3-8B under FSDP2 (15,490 against 13,935 tokens/s per GPU) through 1.82× at TP2 (7,013 against 3,861) to 2.07× on gpt-oss-20b at
ep4×etp2(9,521 against 4,589). The 1.2.0 side is a release candidate, we have no like-for-like comparison at a larger batch, with checkpointing off or on real text, and the two Qwen3.5 rows also change attention from SDPA to FA4 (all twelve shapes). Rerun on a late 1.2.0 build, the eight shapes the band covers stay within 2% of these rates as medians of three on another machine, and their allocated peaks hold within 0.01 GiB, which putsep4×etp2at 2.04× against the same 1.1.0 rate. - Peak memory against 1.1.0. Allocated peak falls or stays within 0.07 GiB on ten of the twelve shapes, falling most at
ep2(1.65 GiB) andep8×cp2(1.60 GiB), and grows on FSDP2 (+0.36 GiB) and gpt-oss-20b atep1(+1.54 GiB), the cost of two decoder layers per shard group. Reserved memory moves differently, withep1up 6.09 GiB (69.73 to 75.82) andep2down 4.14 GiB (86.50 to 82.36). - GLM-5.3-Flash kernels. A DSA query reads about 1,800 to 1,900 keys, but on Blackwell torch's general mem-efficient kernel scored every key in the row with a backward costing 7.5× its forward, and hyper-connections ran stream-sized fp32 temporaries and a hundred-odd launches per Sinkhorn, so both now run on kernels of their own. The LoRA setup at
ep8on 8× B300, on rows of joined UltraChat exchanges, runs 2,840 tokens/s per GPU at 8,192 tokens against 1,282 and 2,390 against 893 on rows of about 15,500, with peaks unchanged at 133.0–133.5 and 175.6–176.8 GiB, and the recipe's own UltraChat rows are far shorter, so it reads lower on them. The full fine-tune on two 8-GPU machines, with checkpointing on, the same rows and one run of five steps per layout, runs 1,504 against 913 atep16and 2,423 against about 1
- Throughput against 1.1.0. On 8× B300 at batch 1 with gradient checkpointing on, over seeded uniform token ids and interleaved by wall clock, 1.2.0 leads on all twelve shapes, from 1.11× on Qwen3-8B under FSDP2 (15,490 against 13,935 tokens/s per GPU) through 1.82× at TP2 (7,013 against 3,861) to 2.07× on gpt-oss-20b at
- v1.1.0Halo 1.1.0: faster MoE training, exact resume and more reliable async RL2026-10-11 · 2026-10-11 21:01 UTC
查看更新说明
Halo 1.1.0 brings together 20 pull requests merged since Halo 1.0.0, with faster MoE training, exact resume and more reliable async RL.
Highlights
Performance and memory
- At 2,048-token rows, Gemma 4 26B-A4B full fine-tuning on 2× B300 now runs at 14,980 tok/s, 1.67× over Halo 1.0.0’s 8,984 at the same 101.8 GiB per GPU and 1.65× the fastest of the five other frameworks we measured (setup and numbers).
- That speedup comes from fused kernels for the expert GLU and the weighted un-permute, torch’s fused RMSNorm, the gradient clip folded into the AdamWBF16 step on EP runs, a faster AdamWBF16 kernel (51.6 → 31.8 ms per step on gpt-oss-20b on one GPU), and FlexAttention on sliding-window layers with matmul attention on wide-head global layers (
sdpa_flex_sliding). At EP2 and 4,096 tokens the same kernel and optimizer changes make gpt-oss-20b 1.25× faster than before, Qwen3-30B-A3B 1.12× and GLM-4.7-Flash 1.09×. - At 16k-token rows FlexAttention takes Gemma 4 from 4,124 to 16,204 tok/s, while peak memory drops from 237.6 to 225.0 GiB per GPU.
- gpt-oss trains up to 27% faster at EP8 than before: the expert un-permute now gathers and sums in fp32 instead of using a bf16 atomic
index_add_, which also makes the EP8 forward deterministic, and DeepEP’s hidden padding no longer copies. - Against the newest stock TRL, 1.15.0, on 8× B300 with the same data and weights and FSDP2 ZeRO-3 on both sides, gpt-oss-20b trains 1.7–2.5× faster and uses less memory at four of the five shapes. Against stock TRL 1.6.0, the version Halo builds on, the same setup gives 2.3–2.5× at the two shapes we ran it. With each framework at its fastest setup, full fine-tuning of gpt-oss-20b from 4k to 128k tokens is 1.2–1.4× faster on Halo than on NVIDIA’s NeMo AutoModel 26.08 and 1.6–2.5× faster than on stock TRL, and Halo stays ahead on Qwen3.5-35B-A3B, Qwen3-30B-A3B, LoRA and DPO. The comparison table below has the setup and the numbers.
- The opt-in
fsdp_defer_grad_syncreduces gradients once per accumulation window instead of after every micro-step. On one node that gives +3–5% for Qwen3-8B and +12% for Qwen3-30B-A3B atep_size: 1, and across two nodes +9–13% for Qwen3-8B, for one extra gradient copy per GPU (about 13 GiB on Qwen3-8B and 50 GiB on Qwen3-30B-A3B on one node). fp32_routernow works atep_size: 1with sharded experts, at 104 GiB per GPU on gpt-oss-20b against 153 GiB with the oldfsdp_shard_ep1_experts: falseworkaround.
Checkpoints and resume
- Incomplete checkpoints are skipped and moved aside, and a failed optimizer restore now stops the run, with
allow_optimizer_warm_restart: trueto keep the old behavior. - Stochastic rounding replays exactly, and fp32 masters, DPO/KTO reference scores and unmerged LoRA adapters are saved with the checkpoint, so with
full_determinisma resumed run matches the uninterrupted one bit for bit. - On-policy GRPO keeps the base model as its KL reference after a resume, and saves and weight syncs use the Hub’s tensor names for every family.
LoRA and PEFT
- LoRA weight sync folds adapters into copies, so the frozen base no longer drifts (one sync used to move 15–23% of the adapted weights), and DoRA under FSDP2 now pushes the merged weights.
- Under FSDP2, KL reference passes no longer freeze the adapters (PEFT merged our fix upstream in huggingface/peft#3839, due in its next release) and no trainable adapter is left out of the gradient sync, and expert-only LoRA at
ep_size > 1no longer hangs when a rank gets no tokens.
Data and stability
- Ranks agree on the model commit, modality and data shards before loading and fail together on a mismatch.
prepare_dataset --num-shards 1output trains at any data-parallel size, unseeded samplers are seeded fromdata_seed, and Hub downloads skip repo subfolders (61 GiB instead of 182 GiB for gp
- v1.0.0Halo 1.0.02026-09-21 · 2026-09-21 17:01 UTC
查看更新说明
First public release.
Training methods. SFT and continued pre-training, DPO / KTO / SMPO preference optimization, Bradley-Terry reward modeling and sequence classification, offline / online / environment (multi-turn, tool-using) GRPO, teacher / self / online (SDPG) distillation, and embedding fine-tuning — all on one distributed trainer spine.
Parallelism. Expert (DeepEP V2), Context (Ulysses), Tensor (DTensor), and Expert-Tensor parallelism over FSDP2, composable (EP+CP, EP+TP, EP+ETP) and multi-node aware (NVLink-domain topology, shared and node-local filesystems). Invalid shapes are rejected at config time.
Models. Dense HF models plus 15 MoE families: GPT-OSS, Qwen3, Qwen3.5/3.6, GLM-4, GLM-5 Next, Laguna, Inkling, Command A+ (Cohere2 MoE), Gemma 4, Bailing/Ling, LFM-2, Mistral 4, DeepSeek-V4, Zaya, Step-3.7 Flash — trained natively via transformers (~5.16); checkpoints load with
from_pretrained. VLM training where the family ships a vision head.RL. Fully asynchronous multi-turn RL on a clean Transformers ↔ vLLM/SGLang split: vLLM 0.26.0 or SGLang 0.5.17 rollout servers in separate containers with native NCCL weight transfer, routed-experts capture and replay, rollouts overlapping training via Ray actors and a prefetch queue; multi-turn environments (SWE, code contests, QA/search, MCP, ReAct) with sandboxed tool execution. Both engines take the weight sync for every family their pinned loaders can serve, expert distribution included, and the sync reaches servers on other nodes over AWS EFA at NIC line rate. A reward is a list of weighted terms — the environment's own grade, a generative judge, a served reward model, verifiable graders — read the same way by online and environment GRPO. Off-policy control: a truncated importance-sampling ratio with band, veto and OPSM mask stages, an optional engine-referenced re-score, and a trust-region breaker that skips the update when a step is mostly masked. No Megatron backend, no veRL.
Performance. FlashAttention-4 on Blackwell (FA2+FA3 on Hopper), grouped GEMM, Liger kernels scoped per family, padding-free packing, AdamWBF16 stochastic-rounding optimizer (6 B/param), Muon, FlashAdamW, fp8/fp4 QAT with DeepGEMM and mxfp8/nvfp4 export, per-layer-kind MFU accounting. Up to ~2.8× stock-TRL throughput on 8× B300.
Using it. One
haloCLI picks the launcher and takes config overrides as plain flags:halo launch sft config.yaml -n 8 --expert_parallel_size=8,halo run <tool>.human-docs/is the guide for people — every training method, configs, data, checkpoints, scaling and rollout servers;agent-docs/is the full reference, andskills/ships agent skills for Claude Code and Codex.Images. Prebuilt and credential-free:
public.ecr.aws/whitecircle/halo:{blackwell,hopper,vllm-0.26.0,sglang-0.5.17}plus-1.0.0version pins, built from this commit (371e24e87). All four carry one pinned EFA userspace; compose overlays put the rollout sync on EFA. Nolatesttag (images are architecture-specific).Pipeline-parallelism seams (config surface, rank math, stage/loss contracts) ship in this release; the engine is nearly complete and will be enabled for selected models and trainers in an upcoming version after extensive testing.
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
What is Halo
Halo is an open-source framework built by White Circle for training large language and multimodal models. It supports pre-training, SFT, preference optimization, fully asynchronous multi-turn RL, and much more.
The same codebase runs on one GPU or across multiple nodes, with EP, CP, TP, ETP, PP, FSDP2, fused kernels, BF16 training, and distributed rollouts.
Halo trains Hugging Face models directly. Checkpoints still load with from_pretrained, and the EP layer a MoE family adds is under 90 lines for every family but GPT-OSS, at 168 (Model Integration Cost).
On 8× B300, Halo 1.2.0 trains Qwen3.6-35B-A3B on packed 64k and 128k rows at 1.10–1.12× Megatron Bridge, 1.47× TRL 1.17.1 and 1.9–2.0× NeMo AutoModel 0.7.0, and Qwen3.5-122B-A10B at 1.50× TRL and 1.7–1.9× NeMo; it trails a tuned Megatron by 11.5% on dense Qwen3.5-9B at 64k (Benchmarks). It runs 1.11–2.07× as fast as Halo 1.1.0 on the twelve shapes benchmarked against it.
Pre- & Post-Training · EP / CP / TP / ETP / PP ·
Multi-Node · Verifiable & Multi-Turn RL · FA4 + Liger + Grouped GEMM · Full BF16
Why Halo
-
Halo trains Hugging Face models directly. Trainers subclass Hugging Face or TRL trainers, checkpoints remain standard SafeTensors, and
from_pretrainedcontinues to work. -
Parallelism is added to the existing model. EP wraps MoE blocks, CP wraps attention, and TP/ETP shard weights in place. There is no separate distributed implementation of the model.
-
The distributed stack is built on PyTorch. FSDP2, DTensor, and DeviceMesh provide the primitives, and DeepEP handles the all-to-all communication for Expert Parallelism.
-
Each parallelism axis has its own setting. EP, CP, TP, ETP, and PP are configured separately. EP combines with CP, TP, or ETP, PP combines with EP or ETP, and other pairings are rejected at config time.
-
Training methods share the same infrastructure. Pre-training, SFT, preference optimization, distillation, and RL use the same parallelism and checkpointing code, so a new method doesn't need its own distributed implementation.
-
SFT can train a release's MTP head. The multi-token-prediction head that ships for speculative decoding trains beside a fine-tune or over a frozen trunk (MTP heads).
-
Performance optimizations are integrated. Halo includes DeepEP V2, FlashAttention 4, Liger, Grouped GEMM, padding-free and tree packing, AdamWBF16, and kernels for GLM-5 Next, with fallbacks for Blackwell, Hopper, and older GPUs.
-
RL is asynchronous, with a clean Transformers ↔ vLLM/SGLang split. Multi-turn environment rollouts run as Ray actors against vLLM or SGLang servers, and the trainer pushes updated weights to them over native NCCL. The training side stays plain Transformers, with no Megatron backend or veRL dependency. See Async GRPO with Environments.
Latest updates
- 2026-11-07 — Halo 1.3.0rc1. A release candidate for faster RL at scale. On synchronous GRPO with
Qwen3.5-35B-A3B on two 8× B300 nodes, a step takes 0.137 s per 1k response tokens against Miles v0.1.3's 0.176
(GRPO against Miles).
- Faster GRPO: rows pack into token-budget micro-batches, importance weights can come from the loss forward, and weight sync can run one group across servers.
- New in RL: score centering on SGLang, FP8-weight rollouts for Qwen3.5/3.6 MoE, adapter-only sync to SGLang, and GLM-5.3-Flash under GRPO.
- Scale: gathered EP saves striped over several writers, adapter merges with no model load, and startup checks for setups that used to fail hours into a run.
- 2026-11-04 — Halo 1.2.0. Training steps are faster than in 1.1.0 on all twelve shapes benchmarked
against it, from 1.11× to 2.07×, and GLM-5.3-Flash more than doubles its LoRA throughput with two new kernels.
Halo also gains pipeline parallelism and three more model families (benchmarks).
- GLM-5.3-Flash: new attention and hyper-connection kernels. LoRA at EP8 runs 2.2–2.7× faster than before them with the same peak memory, and a full fine-tune on two 8-GPU machines up to 2.3× faster.
- Pipeline parallelism for SFT, preference, offline GRPO, reward, and classification training, with EP or ETP inside each stage (docs).
- New models: NVIDIA Nemotron 3.5 (Super VL and Lightning), Qwen3-Next, and experimental Qwen3.8-Flash-Next, for eighteen MoE families in all.
- SFT features: tree packing, which stores a shared prefix once, and training of MTP heads.
- Upgrade notes: the import package is now
halo, on transformers 5.20, TRL 1.14, vLLM 0.32, and SGLang 0.5.22. PaliGemma SFT and distillation now use a causal mask, which 1.1.0 left off.
- 2026-10-11 — Halo 1.1.0. Faster MoE training, exact resume, and more reliable async RL. Fused MoE kernels and FlexAttention on sliding-window layers made Gemma 4 26B-A4B 1.67× faster than 1.0.0 on two GPUs, and an atomic-free expert permute made gpt-oss at EP8 up to 27% faster. Checkpoint and resume problems now stop the run instead of passing silently, and offline GRPO gained context parallelism.
- 2026-08-20 — Halo 1.0.0. First public release: EP / CP / TP / ETP on native HuggingFace models (LLM and VLM), 15 MoE families, pre-training through multi-turn RL with vLLM or SGLang rollouts, FlashAttention-4, DeepEP V2, DeepGEMM, and the AdamWBF16 optimizer.
Quick start
Installation
Halo ships as separate Docker images for Blackwell and Hopper, with PyTorch, Flash Attention, and DeepEP V2 built in. Pull them anonymously, with no account:
# B200/B300: FA4 + FA2 + DeepEP
docker pull public.ecr.aws/whitecircle/halo:blackwell
# H100/H200: FA2 + FA3 + DeepEP
docker pull public.ecr.aws/whitecircle/halo:hopper
Versioned tags (:blackwell-1.3.0rc1, :hopper-1.3.0rc1) pin the release. There is no latest tag, since
the images are architecture-specific. The RL inference images are published alongside them
(:vllm-0.32.0, :sglang-0.5.22), pinned as :vllm-0.32.0-1.3.0rc1 and :sglang-0.5.22-1.3.0rc1.
To build locally instead:
# B200/B300: FA4 + FA2 + DeepEP
make build-blackwell
# H100/H200: FA2 + FA3 + DeepEP
make build-hopper
No host Python environment is required. See Installation for image details and build options.
Launch a training run
halo launch takes a training method and a YAML config:
# SFT + LoRA (fits into a single GPU)
halo launch sft examples/sft/qwen3/qwen3-4b-ultrachat-lora.yaml
# SFT + Expert Parallelism (MoE, 8 GPUs → torchrun)
halo launch sft examples/sft/qwen3_5/qwen3.5-35b-a3b-ultrachat-ep.yaml -n 8
# FSDP-2 + Accelerate
halo launch sft examples/sft/qwen3/qwen3-4b-ultrachat.yaml \
-a launcher-configs/accelerate/fsdp2_gradop_config.yaml -n 8
# all training methods (sft, preference/smpo, grpo/online, grpo/environmental, ...)
halo launch --list
halo selects python, torchrun, or accelerate launch based on the arguments, and --dry_run
prints the command instead of running it. Options after the config that are not the launcher's own are
passed to the trainer and override the YAML config:
halo launch sft examples/sft/qwen3_5/qwen3.5-35b-a3b-ultrachat-ep.yaml \
-n 8 \
--expert_parallel_size=8 \
--learning_rate=1e-5 \
--max_length=32000
Other tools
Checkpoint, inference, data, and environment utilities use halo run:
halo run merge-ep-shards --input_dir <ep-checkpoint-dir> --output_dir <merged-dir>
halo run quantize-to-lowp --input_dir <bf16-model-dir> --output_dir <nvfp4-out-dir> --format nvfp4
# all tools (merge-*, quantize-to-lowp, inference/reward-model/score, eval-env, …)
halo run --list
The underlying scripts can also be run directly:
python scripts/training/sft.py \
examples/sft/qwen3/qwen3-4b-ultrachat-lora.yaml
torchrun --nproc_per_node=8 scripts/training/sft.py \
examples/sft/qwen3_5/qwen3.5-35b-a3b-ultrachat-ep.yaml
Coding agents
The training images ship repo-specific agent skills (discoverable by Claude Code and Codex; add
--build-arg INSTALL_CLAUDE_CODE=1 to bake the CLI into the image) for launching jobs,
choosing parallelism settings, debugging distributed runs, adding models, managing checkpoints,
preparing data, optimizing throughput, setting up RL,
writing tests, and keeping docs current.
Documentation
We keep two versions of the docs, depending on whether or not you're AI:
human-docs/: shorter, task-oriented guides for installing, configuring, and running Halo.agent-docs/: the full technical reference, written for coding agents, covering model integrations, parallelism, optimization internals, infrastructure, and troubleshooting.
The full reference is also perfectly readable if you're human and want the details.
The human guide: Installation · Quickstart · Choosing a Method · The halo CLI · Writing a Config · Datasets · Training Methods · Rollout Servers · Parallelism · Clusters & Multi-Node · Performance · Supported Matrix · Supported Models · Model Cookbooks · Model Integration Cost · Checkpoints & Export · Monitoring · Troubleshooting · Environment Variables · AI Tooling · Contributing
Repository layout
A map of the repository:
| Path | What's inside |
|---|---|
halo/ | Trainers, parallelism, optimizers, kernels, collators, and callbacks |
scripts/ | Training entry points, inference, data-prep, and checkpoint tools |
examples/ | Ready-to-run YAML configs, grouped by method and model |
launcher-configs/ | Accelerate, SkyPilot, and Nomad launch configs |
human-docs/ | Short, task-oriented documentation |
agent-docs/ | Full technical reference |
skills/ | Agent skills (linked from .claude/skills and .agents/skills) |
tests/ | CPU and distributed GPU tests |
Dockerfile · Makefile | Image builds, tests, and training commands |
AGENTS.md | Contributor and agent instructions |
A typical run is: pick an examples/ config → halo launch <method> <config> (or python scripts/training/<method>.py <config>), inside the Docker image.
Benchmarks
All rows ran on 8× B300 with the Blackwell image unless a row says otherwise. Rates are tokens/s per GPU on a warm kernel cache; a fresh Triton cache costs the first steps (Qwen3.5-35B-A3B's first ~20 run at about 40% of the steady rate).
Against other frameworks
Full-parameter SFT on UltraChat 200k packed into rows of exactly 64k or 128k tokens with documents isolated, the same rows for every framework. Each cell is tok/s/GPU (peak GiB); † is an nvidia-smi peak, which reads higher than the others.
| Model, tokens per row | Halo 1.2.0 | Megatron Bridge | TRL 1.17.1 | NeMo AutoModel 0.7.0 |
|---|---|---|---|---|
| Qwen3.5-9B, 64k | 17,206 (54.3) | 19,431 (245.5†) | 14,735 (56.0) | 10,360 (99.3) |
| Qwen3.5-9B, 128k | 17,093 (82.1) | 17,348 (241.1†) | 14,601 (86.8) | 9,451 (166.4) |
| Qwen3.6-35B-A3B, 64k | 23,637 (139.1) | 21,559 (224.6†) | 16,126 (138.8) | 12,340 (99.1) |
| Qwen3.6-35B-A3B, 128k | 23,647 (139.1) | 21,109 (244.2†) | 16,112 (138.8) | 12,026 (139.3) |
| Qwen3.5-122B-A10B, 64k | 8,933 (188.7) | 4,781 (254.0†) | 5,936 (194.5) | 5,397 (219.3) |
| Qwen3.5-122B-A10B, 128k | 8,943 (188.7) | does not fit | 5,951 (194.5) | 4,683 (227.1) |
Megatron Bridge is a 0.7.0 release-candidate commit with Megatron Core 0.20.0. How to read the table:
- Optimizer regimes differ: Halo trains bf16 parameters with stochastic rounding, TRL and NeMo bf16 parameters with bf16 Adam state, Megatron fp32 main parameters (fp16 master on the 122B).
- Megatron's peaks are nvidia-smi samples; the others are torch allocated peaks. Do not compare them directly.
- Each Halo row is the median of 3 runs of a chosen setup; the others are single runs of their best layouts.
Rates per parallelism layout, the 16k and 4k tables, and the other conditions: Throughput Benchmarks; the TRL side: Halo vs stock TRL.
GRPO against Miles
GRPO on Qwen3.5-35B-A3B (GSM8K, 32 prompts × 8 samples, one 8× B300 node training and one serving SGLang rollouts, same prompts on both sides): on-policy, Halo takes 0.137 s per 1k response tokens against Miles v0.1.3's 0.176, 22% less, with a 14.0 s step against 18.6 s and 63 against 109 GiB on the trainer node. With rollouts overlapped it takes 0.102 against 0.111, 8% less. Layouts and conditions: GRPO against Miles.
Halo 1.2.0 against 1.1.0
| Result | Configuration |
|---|---|
| 1.11–2.07× Halo 1.1.0 | Twelve SFT shapes, none slower: TP2 1.82×, EP4+ETP2 2.07×, EP 1.12–1.29×, CP2 1.15×, FSDP2 1.11×. Qwen3-8B, gpt-oss-20b and Qwen3.5-35B-A3B at batch 1, GC on. |
| 2.2–2.7× on GLM-5.3-Flash LoRA | EP8, real text: 2,840 vs 1,282 at 8k, 2,390 vs 893 at 16,384. Same peak memory. The baseline is 1.2.0 without the two new kernels. |
| 1.65–2.3× on GLM-5.3-Flash full fine-tune | Two 8-GPU machines: EP16 1,504 vs 913, PP2 + EP8 2,423 vs about 1,060. EP8 with DP runs out of memory. |
| PP across two machines | gpt-oss-20b PP2 + EP8 at 8k: 15,715, 15.9% below EP8 with DP. Qwen3-8B PP2 at 4k: 17,608, 4.0% below DP16. Qwen3.5-35B-A3B PP2 + EP8 reaches 0.97× EP8 with DP, at 126.7 GiB on the first stage and 62.7 on the last, against 148.7 (GC off, packed rows of 8k). |
| 13.8× DP16 on plain TCP sockets | Machines forced onto plain TCP sockets: Qwen3-8B PP2 holds 15,414 while DP16 falls to 1,117. |
Kernels and memory (Halo 1.1.0, not rerun on 1.2.0)
These rows have no 1.2.0 measurement; read each as a 1.1.0 number.
| Result | Configuration |
|---|---|
| 28,700 tok/s/GPU | gpt-oss-20b, dense EP1, 4k, batch 4, GC off: ~230k tok/s across 8 GPUs. |
| 16,447 tok/s/GPU at 1,908 TFLOPS | Qwen3.5-35B-A3B, 4k, batch 4, EP2, SDPA: the highest achieved TFLOPS of any EP>1 run benchmarked on 1.1.0. |
| 25–76 GiB/GPU on the same 16k workload | EP8+CP8: 24.6 GiB at 7,149 tok/s/GPU. Dense EP1: 75.8 GiB at 20,690 tok/s/GPU. |
| 256k context | gpt-oss-20b, dense EP1 ZeRO-3 with fused linear cross-entropy: 5,728 tok/s/GPU at 112 GiB (measured on Halo 1.0.0). |
| 2.45× Grouped GEMM | Qwen3-30B-A3B, 2× B300, EP2, 8k, batch 4, GC on; 4.10× at batch 1. |
| 3.6–3.9× FA4 kernel throughput | FA4 vs FA2 on the isolated kernel (B2×S8192, head_dim 128); up to 2.3× end-to-end on dense Qwen3-4B at 32k (1× B300). |
Full results and methodology: Performance
Parallelism
Each axis has its own flag. EP combines with one of CP, TP, or ETP, and PP with EP or ETP; any other pairing is rejected at config time:
--expert_parallel_size=N # MoE experts across GPUs (DeepEP)
--context_parallel_size=N # long sequences (Ulysses attention)
--tensor_parallel_size=N # model weights (DTensor; attention only on MoE)
--expert_tensor_parallel_size=N # expert-FFN sharding (MoE, experimental)
--pipeline_parallel_size=N # decoder layers in stages across nodes (registered families)
| Mode | Best for |
|---|---|
| EP | Distribute MoE experts across GPUs |
| TP | Shard model weights across GPUs (a dense model past one GPU) |
| CP | Split long sequences across GPUs |
| ETP | Shard individual expert FFNs |
| EP+CP | MoE + long-context training |
| EP+TP | MoE + weight sharding |
| EP+ETP | MoE + sharded experts |
| PP | Split a model's layers across nodes |
| PP+EP, PP+ETP | MoE across nodes, experts inside each stage |
Over a fast link, PP is slower than data parallelism when the model fits. It pays on slower links and for models that do not fit at EP8 on one machine. PP does not support LoRA yet.
Pass them directly to torchrun, or after the config with halo launch:
halo launch sft config.yaml -n 8 --expert_parallel_size=8
Multi-node runs support shared (NFS/Lustre) and node-local filesystems. See Parallelism to pick a mode, Supported Matrix for the per-model matrix, and Clusters & Multi-Node for the multi-node recipes.
Optimizations
Enabled by default where supported:
-
Attention and kernels. Flash Attention 4 on Blackwell, FA3 on Hopper, FA2 elsewhere, Liger fused CE/SwiGLU/RMSNorm (Qwen3 MoE, GLM-4.7-Flash, GPT-OSS, Gemma 4 and Nemotron-H take torch's fused RMSNorm instead), fused GLU kernels, and Grouped GEMM for MoE expert compute.
-
GLM-5 Next and DeepSeek-V4 kernels. DSA attention on Blackwell (
HALO_DSA_MATMUL, GLM-5 Next) and hyper-connections (HALO_HC_KERNELS) run on dedicated kernels (GLM-5 Next, hyper-connection kernels). -
Parallel steps. TP linears on their local shards, one Ulysses all-to-all per exchange, a sync-free MoE routing sort, and two decoder layers per FSDP2 shard group under ZeRO-2.
-
Precision and optimizers.
AdamWBF16with stochastic rounding keeps weights and optimizer state in 6 bytes/parameter instead of 12 with FP32 master weights. Muon and FlashAdamW are also supported. FP8/FP4 QAT runs on MoE experts and dense MLPs through a fake-quant path, with an opt-in DeepGEMM forward;quantize-to-lowpwrites block-scaled mxfp8/mxfp4/nvfp4 weights. -
Memory and PEFT. Padding-free packing with
cu_seq_lens, SFT tree packing, LoRA, and QLoRA. The Qwen3-4B QLoRA example peaks at 7.9 GiB (batch 1, 4k) and Qwen3-8B at 32k at 20.9 GiB with the fused loss (PEFT). Single-GPU LoRA/QLoRA also runs on Ampere and Ada cards fromhalo:blackwell, but that path is not validated. -
Checkpoints. Large gathered checkpoints are automatically sharded, with tools for merging per-rank EP shards, per-node PP saves and PEFT adapters back into a standard HuggingFace checkpoint (Checkpoints).
-
Data. Offline tokenization, packing, and sharding, plus native
s3://dataset loading with a local cache.
Performance covers what each lever buys and the bottlenecks they attack.
Built with AI
We use GPT and Claude extensively while developing Halo, through PI-Agent, Claude Code, and Codex.
AGENTS.md contains the instructions and conventions used by both coding agents and
human contributors.
AI-assisted contributions are welcome. We ask that contributors understand and stand behind
the code they submit. See CONTRIBUTING.md.
Acknowledgments
Halo builds on a lot of great open-source work, in particular:
- Hugging Face: Transformers, TRL, Accelerate, Datasets, and PEFT.
- Liger Kernel: fused cross-entropy, SwiGLU, and RMSNorm.
- FlashAdamW by Databricks AI Research: memory-efficient AdamW with quantized optimizer states and compact master weights.
- DeepEP and DeepGEMM by DeepSeek-AI: expert communication and grouped GEMM. Halo's aux-loss-free router balancing also follows the approach introduced with DeepSeek-V3.
- Flash Attention by Tri Dao and contributors: FA2, FA3, and FA4.
- vLLM: the rollout/serving engine behind online and environmental RL.
- PyTorch: DTensor, FSDP2, and
torch.distributed. - SGLang: the alternative rollout engine, with NCCL weight synchronization, for multi-turn environment RL.
- SDPG, led by researchers at UCLA: self-distilled policy gradient for online reinforcement learning.
DeepEP is built from upstream at a pinned commit in the training image and keeps its upstream license;
the build pins, Flash Attention's included, live in the Dockerfile.
See pyproject.toml for the full dependency set.
Halo is built and maintained by White Circle.
License
Halo is released under the Halo License: the Apache License 2.0
(APACHE-2.0.txt) as modified by the Supplemental Terms in LICENSE.
Copyright © 2026 White Circle, PBC.
In plain terms: free to use, modify, self-host, and to train your own models and ship them in your own products, at any scale. The one commercial condition is offering Halo's training functionality to third parties as a service: that's free up to US $20M in such revenue over any 12 months, and above that requires a commercial agreement with White Circle. Models trained with Halo by anyone over $20M in annual revenue must carry a "Trained with Halo" credit.
Questions or commercial licensing: [email protected].