所有模型族共用同一个预构建 Docker 镜像,需从 Docker Hub 拉取 loongforge 镜像而非本地 pip 安装;部分具身模型需先运行数据预处理脚本预计算 VAE latent 或文本 embedding;README 未说明默认端口等运行参数
LoongForge
baidu-baigeApache-2.0活跃维护面向 NVIDIA GPU 和昆仑 XPU 的大模型训练框架,覆盖 LLM、VLM、扩散模型和具身模型,支持 LoRA、预训练、SFT 与中期训练,开箱即用适配 DeepSeek、GLM、Kimi 等主流模型。
A high-performance framework for training LLMs, VLMs, diffusion, and embodied models on NVIDIA GPUs and Kunlun XPUs. Supports Pi0.5, GR00T-N1.7, FastWAM, Cosmos3, DreamZero, DeepSeek-V4, GLM-5.3, Kimi-K3 and more.
README 未给出可直接复制的安装命令,仅提供 Docker Hub 上的 loongforge 预构建镜像,建议按文档 Quick Start 操作README 说明面向 NVIDIA GPU 与昆仑 XPU,生产训练规模可达 5000+ XPU;具体显存要求 README 未说明。
百度百舸开源的高性能训练框架,一套代码覆盖 LLM、VLM、扩散与具身模型
面向 NVIDIA GPU 和昆仑 XPU 的大模型训练框架,覆盖 LLM、VLM、扩散模型和具身模型,支持 LoRA、预训练、SFT 与中期训练,开箱即用适配 DeepSeek、GLM、Kimi 等主流模型。
核心能力
- 基于 Megatron-LM 与 torch-native 双后端架构
- 为 40+ 开源模型提供可直接运行的配置与启动脚本
- 支持预训练、mid-training、SFT 与 LoRA 微调
- 具身模型训练吞吐达开源基线 1.79×–4.38×
- 内置 checkpoint 转换、数据预处理与统一评测模块
容易踩的坑
- v0.2.2最新正式版2026-11-05 · 2026-11-05 08:32 UTC
Highlights
- New embodied models and recipes: LoongForge-VLDA, LingBot-VLA-v2, GR00T-N1.7, and Wall-OSS-0.5, plus updated Pi0.5, xVLA, FastWAM, and DreamZero training and evaluation paths.
- New LLM / VLM support: Kimi-K3 for both LLMs and VLMs, GLM-5.3-flash, and Qwen3.8-27B.
- More capable data pipeline: Ego2Robot converts first-person human manipulation videos into LeRobot v3.0 data for 16 robot morphologies.
- Training-system improvements: tensor-wise Muon optimization, FP8 gradient communication, TorchAO FP8 FlexAttention, and variable-length ChunkPipe.
- Production readiness: stronger async/DCP checkpoint handling, broader GPU regression, sensitive-data scanning, and an operator-controlled release workflow.
What's Changed
Embodied models and training
- Added LoongForge-VLDA with two-stage training, checkpointing, and closed-loop LIBERO evaluation. The released recipe reports 98.5% on LIBERO and 84.5% zero-shot on LIBERO-Plus. See the cookbook and #285.
- Added LingBot-VLA-v2 integration on a tensor-wise optimizer with per-parameter precision, overlapped publish, and Muon support (#211), with validated RoboTwin / LIBERO defaults (#306).
- Completed GR00T-N1.7 inference, LIBERO / SimplerEnv training and evaluation recipes, custom operators, and CUDA-graph performance work (#178, #191, #195, #245, #300).
- Added Wall-OSS-0.5 training with FSDP2 + DMuon (#192, #217) and fused RoPE / RMSNorm / SwiGLU / MoE operators (#195).
- Expanded Pi0.5 with validated LIBERO / RoboTwin fine-tuning and evaluation recipes (#313), FlexAttention and activation-checkpoint optimizations (#179), and TorchAO FP8 FlexAttention support (#248). The published Pi0.5 recipe reaches 3.00x training speedup.
- Expanded FastWAM with inference / evaluation integration (#222), fused optimizer and compiled-block acceleration (#171), multi-dataset training (#269), and a LIBERO evaluation protocol aligned with the official harness (#274, #279, #319).
- Expanded DreamZero with inference and evaluation integration (#188), an optimized Wan2.2-5B FSDP recipe (#213), Delta-FP8 parameter AllGather (#220), and a compiled Wan2.1-14B FSDP recipe (#323).
- Added FlashAttention-2 support for xVLA (#177).
LLMs and VLMs
- v0.2.02026-08-20 · 2026-08-20 09:28 UTC
查看更新说明
Highlights
- LoongForge-Embodied: New torch-native DDP/FSDP training stack for π0.5, GR00T-N1.6/N1.7, xVLA, LingBot-VA, FastWAM, DreamZero, and Cosmos3, delivering up to 2.67× training speedup
- New model support: DeepSeek-V4 Flash/Pro, GLM-5.2, and MiniCPM-V 4.6; Qwen-Image-Edit-2511 and Wan2.1 diffusion training
- Embodied evaluation: Unified evaluation workflows for LIBERO, CALVIN, SimplerEnv, RoboTwin, and ManiSkill
- MoE & scaling: TAOT topology-aware expert load balancing; DeepSeek-V4 FP8 training and context parallelism
- Checkpoint & data pipeline: Memory-efficient packed INT4/MXFP4 HF loading, WDS-native offline packing, and HuggingFace chat-template/tool-calling SFT support
What's Changed
- LoongForge-Embodied: Added a torch-native DDP/FSDP training subsystem for π0.5, GR00T-N1.6/N1.7, xVLA, LingBot-VA, FastWAM, DreamZero, and Cosmos3 (#114)
- Embodied evaluation: Added a unified evaluation framework with GR00T-N1.6 support, SimplerEnv WidowX tasks, and LingBot-VA online inference integration (#140, #154, #165)
- DeepSeek-V4: Added training support, HuggingFace checkpoint loading, and Context Parallelism (#98, #141, #143)
- New VLM support: Added MiniCPM-V 4.6 and GLM-5.2 + Kimi K2.6 multimodal LoRA (#146, #162)
- Diffusion training: Added Qwen-Image-Edit-2511 with FSDP + TP and Wan2.1 with FSDP + Context Parallelism (#85, #101)
- MoE load balancing: Added topology-aware dynamic expert replica placement through TAOT to improve Expert Parallel workload balance (paper)
- Low-bit checkpoint loading: Added memory-efficient HuggingFace checkpoint bridge loading for packed INT4 and MXFP4 weights (#108)
- Multimodal data pipeline: Added WDS-native offline packing, HuggingFace Jinja chat templates, Kimi K2.5 tool-calling SFT, and configurable Energon read order (#78, #87, #88, #139)
- Packed sample support: Improved multi-turn and text-only
PackedMultiMixQASamplehandling and reused standard encoders for packed VLM samples (#116, #150, #168) - FastWAM optimization: Added ZeRO-1 SFT examples, fused RMSNorm/RoPE/LayerNorm paths, and optimized VAE encoding (#123, #129, #136, #138, #159, #161)
- Distributed training: Added configurable DDP communication hooks for gradient compression (#158)
- Infrastructure: Unified Docker images across LLM, VLM, diffusion, and embodied training workloads (#126)
New Contributors
- @651961 made their first contribution in https://g
- v0.1.12026-05-26 · 2026-05-26 09:03 UTC
查看更新说明
Highlights
- New model support: Kimi-K2.5 / K2.6 VLM training and MCore↔HF checkpoint conversion
- Wan2.2 Diffusion: Data packing training support; FSDP + context parallelism (ring & ulysses)
- GR00T-N1.6 VLA: Full-iteration / per-microbatch CUDA graph for accelerated training
- INT4 checkpoint dequantization: Support HF compressed-tensors INT4 format
What's Changed
- docs(readme): add LoongForge banner by @nullnonenilNULL in https://github.com/baidu-baige/LoongForge/pull/38
- Standard sft_dataset_config.yaml: Remove history from the Alpaca data… by @gsl322 in https://github.com/baidu-baige/LoongForge/pull/52
- [bridge] Enable fp8 force pow2on for bridge by @pengxiangyu in https://github.com/baidu-baige/LoongForge/pull/50
- [convert] Convert checkpoint support get hf checkpoint file names by expert_ids by @pengxiangyu in https://github.com/baidu-baige/LoongForge/pull/53
- [groot_n1.6] Support full-iteration / per-microbatch CUDA graph by @Dana57740 in https://github.com/baidu-baige/LoongForge/pull/54
- [Task] wan fsdp + cp(ring + ulysses) by @haichengv12 in https://github.com/baidu-baige/LoongForge/pull/56
- [ci, docs] feat: add initial GitHub Actions CI surface by @Zachary-wW in https://github.com/baidu-baige/LoongForge/pull/51
- [ckpt] feat: support HF INT4 compressed-tensors dequantization by @kaimo455 in https://github.com/baidu-baige/LoongForge/pull/60
- [vlm, data, train] fix: align packed FP8 padding and media broadcast by @kaimo455 in https://github.com/baidu-baige/LoongForge/pull/61
- [data] fix: log skipped VLM dataloader samples as warnings by @kaimo455 in https://github.com/baidu-baige/LoongForge/pull/62
- [data, vlm] fix: skip overlong Kimi VLM samples by @kaimo455 in https://github.com/baidu-baige/LoongForge/pull/63
- [Task] Wan2.2 data packing training support by @VEGA1215 in https://github.com/baidu-baige/LoongForge/pull/64
- [ckpt] feat: support Kimi K2.x checkpoint conversion by @kaimo455 in https://github.com/baidu-baige/LoongForge/pull/67
- [docs] docs: split bilingual docs into separate source trees by @Zachary-wW in https://github.com/baidu-baige/LoongForge/pull/65
- [docs] docs: add Kimi-K2.6 support model mapping by @Zachary-wW in https://github.com/baidu-baige/LoongForge/pull/68
- [docs] docs: fix diffusion docs structure and align ZH/EN toctree by @Zachary-wW in https://github.com/baidu-baige/LoongForge/pull/69
New Contributors
- @nullnonenilNULL made their first contribution in https://github.com/baidu-baige/LoongForge/pull/38
- @Dana57740 made their first contribution in https://github.com/baidu-baige/LoongForge/pull/54
- @haichengv12 made their first contribution in https://github.com/baidu-baige/LoongForge/pull/56
- @VEGA1215 made their first contribution in https://github.com/baidu-baige/LoongForge/pull/64
Full Changelog: https://github.com/baidu-baige/LoongForge/compare/v0.1.0...v0.1.1
- v0.1.02026-05-09 · 2026-05-09 14:06 UTC
查看更新说明
We are excited to announce the first public release of LoongForge, a modular, scalable, and highly efficient training framework for large-scale transformer models across diverse modalities and architectures. This initial release covers four modality types (LLM, VLM, VLA, Diffusion), with out-of-the-box support for Pretrain, MidTrain, SFT, and LoRA workflows.
📖 Documentation: Docs
Supported Models
LoongForge supports a wide range of model configurations out-of-the-box. Below are the highlighted models; for the complete list see Supported Models.
LLM
- Qwen3 — 0.6B, 1.7B, 4B, 8B, 14B, 32B dense; 30B-A3B, 235B-A22B, 480B-A35B MoE; Coder-30B-A3B
- Qwen3-Next — 80B-A3B (next-gen MoE)
- DeepSeek-V3 — V3 (BF16 + FP8), V3.2 (FP8)
- DeepSeek-V2 — V2, V2-Lite
- Qwen2.5 — 0.5B to 72B (7 sizes)
- MiniMax — M2.1 / M2.5 / M2.7 (230B)
- GLM5 · MIMO-7B
- Older families (LLaMA 2/3/3.1, Qwen, Qwen1.5, Qwen2)
VLM
- Qwen3-VL — 30B-A3B, 235B-A22B MoE
- Qwen3.5 — 0.8B–397B-A17B (8 sizes, dense + MoE)
- Qwen3.6 — 27B, 35B-A3B
- Qwen2.5-VL — 3B, 7B, 32B, 72B
- InternVL-3.5 — 8B, 14B, 38B, 30B-A3B, 241B-A28B
- InternVL-2.5 — 8B, 26B, 38B, 78B
- ERNIE4.5-VL — 28B-A3B
- LLaVA-OneVision-1.5 — 4B
Diffusion & VLA
- WAN 2.2
- GR00T N1.6
- Pi0.5
Key Features
⚡ Adaptive FP8 Training
- Adaptive FP8 — Benchmark-driven per-module FP8/BF16 dynamic precision selection. Enables FP8 only where profiling confirms a speedup; never slower than BF16. Supports blockwise FP8 (E4M3, DeepSeek-V3 scheme) and per-component granularity control for both LLMs and VLMs.
🔀 MoE Optimization
- A2A Communication Overlap — 1F1B overlap strategy hides EP All-to-All behind forward/backward compute. FP8 compatible, lower memory than upstream Megatron-LM.
- Fine-grained Activation Offload — Module-level selective recompute + tensor-level D2H/H2D overlap with compute streams, compatible with the 1F1B overlap schedule.
🖼️ VLM Training
- Model Composition — YAML-driven ViT + Projector + LLM assembly via
OmniCombinationModel. Zero-code model construction with interchangeable encoder/backbone combinations. - Heterogeneous Parallelism — Independent TP/DP for encoder vs decoder (Hetero-TP, Hetero-DP, Full Hetero-DP).
- ViT DP Load Balancing — Redistributes image tokens across DP ranks based on quadratic ViT cost model before the encoder forward pass.
- DP Load Balancing — Profiles O(n²) attention cost from fixed-length packing, reorders samples across DP ranks via greedy LPT to eliminate stragglers.
🧠 Memory & Compute
- Fused Linear Cross Entropy — Fuses vocab-projection + cross-entropy into a single operation with chunked computation. The complete logits tensor is never instantiated.
- Optimizer CPU Offload — Adam states offloaded to CPU; supports BF16/FP8 low-precision moments.
💾 Checkpoint & LoRA
- Online HF Checkpoint Load/Save — Load HuggingFace checkpoints directly at startup with no offline conversion; export back with
--save-hf true. Supports TP/PP/EP parallelism. - Offline Conversion — Bidirectional HF↔MCore for all models. FP8 + MoE expert merging included.
- LoRA — YAML-configurable with wildcard module matching. VLM per-component toggles. Merge & export to HF supported.
🔧 Custom Operators
- FusedDSA — FlashMLA + Lightning Indexer fused ops for DeepSeek-style Sparse Attention (DSA) training. Integrates forward and custom backward operators for end-to-end training acceleration. (CUDA kernels available on Baidu Baige Platform; not included in this release)
- TileLang Ops — Open-sourced Sparse MLA Fwd/Bwd + Lightning Indexer Bwd, built on [TileLang](https://github.com/tile-a
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
LoongForge is an open-source training framework developed by the Baidu AI Cloud Baige team, built to deliver faster training for mainstream LLMs, VLMs, diffusion, and embodied models.
- High Performance — Built on Megatron-LM and torch-native backends, with deep optimizations for training speed that keep training loss aligned with the baseline.
- Easy to Use — Ready-to-run configs and launch scripts for 40+ open-source models, plus checkpoint conversion and data preprocessing tools. Supports pre-training, mid-training, SFT, and LoRA.
- Production-Proven — Open-sourced from AIAK-Training-LLM, which powers enterprise customers' proprietary models and several open-source projects. Production runs reach 5,000+ XPUs.
Example: training the embodied model DreamZero on LoongForge reaches 4.38× the open-source baseline's throughput, with loss curves staying aligned
🏗️ Architecture
Since optimal training strategies differ across model families and scales, LoongForge adopts a multi-backend architecture.
- Megatron Backend — For LLM, VLM, and diffusion models, extended with MoE parallelism, per-component heterogeneous parallelism, long-sequence optimizations, etc.
- torch-native Backend — For embodied models (VLA and WAM). Built on native PyTorch with DDP / ZeRO-1 / FSDP / HSDP, with deep optimizations for representative models across I/O, communication strategy, kernel efficiency, etc.
🔥 Latest News
- [2026/10] 🤖 Added VLA training support for LingBot-VLA-v2, built on the new tensor_wise distributed optimizer with Muon.
--optimizer muonalso runs under plain DDP for any model. - [2026/10] 🤖 Introducing LoongForge-VLDA, a Vision-Language-Delta-Action model trained with LoongForge: 98.5% on LIBERO, 84.5% zero-shot on LIBERO-Plus, and +17–18 points over π0.5 on real robots. [project page] [paper]
- [2026/10] 🦾 Open-sourced ego2robot — a pipeline that converts first-person videos of human manipulation into dual-arm robot training data, outputting LeRobot v3.0 format across 16 robot morphologies.
- [2026/09] ✨ Added training support for GLM-5.3-flash.
- [2026/09] ✨ Added Kimi-K3 BF16 training support for both LLMs and VLMs.
- [2026/09] ⚡ Added an optimized DreamZero Wan2.2-5B FSDP recipe with cache-aware data loading, compiled attention blocks, frozen-module handling, and FSDP2 Delta-FP8 Param AllGather.
- [2026/08] 🤖 Added VLA training support for Wall-OSS-0.5, with custom fused operators for higher training throughput.
- [2026/08] 📄 Released the TAOT paper — topology-aware dynamic expert replica placement that tackles expert-parallel (EP) load imbalance in MoE training, cutting overhead by up to 74% over industry solutions, with 1.43× speedup measured on a real training case. [blog]
- [2026/08] ✨ Added training support for GLM-5.2, along with a GLM-5.2 + MoonViT custom-composition example for extending GLM with multimodal capabilities.
- [2026/08] ✨ Added training support for MiniCPM-V-4.6 and Qwen3.8-27B.
- [2026/08] 🧪 Introduced a unified evaluation module for the embodied stack, currently covering Pi0.5 / xVLA / GR00T, with more models on the way.
- [2026/07] 🐳 Unified the prebuilt Docker images — all model families (LLM / VLM / Embodied / Diffusion) now share a single image.
- [2026/07] 🤖 Released LoongForge-Embodied, a torch-native DDP/FSDP training subsystem for embodied models (Pi0.5, GR00T-N1.6/N1.7, xVLA, LingBot-VA, FastWAM, DreamZero, and Cosmos3), with up to 4.38× speedup.
- [2026/07] ✨ Added training support for DeepSeek-V4-Flash / DeepSeek-V4-Pro.
- [2026/07] ✨ Added training support for Qwen-Image-Edit-2511.
- [2026/06] 🤖 Expanded VLA coverage with GR00T N1.6; 2.3× speedup on GR00T training. [blog]
- [2026/05] ⚡ Accelerated Wan 2.2 training by 116%, and added CP and data packing support.
- [2026/05] ✨ Added training support for Kimi K2.5 / K2.6, and introduced INT4 / NVFP4 PTQ.
- [2026/05] 🎉 v0.1.0 — first official tagged release of LoongForge.
- [2026/05] 🌟 Powered the training and public release of LLaVA-OneVision-2.0.
- [2026/04] 🧩 Added training support for MiniMax-M2.7 on both NVIDIA GPU and Kunlun XPU.
- [2026/04] 🚀 LoongForge source code publicly available on GitHub. [blog]
- [2025/10] 🌟 Powered the training and public release of LLaVA-OneVision-1.5 under AIAK-Training-LLM, the predecessor of LoongForge. [blog]
🤖 Embodied Models
Data processing, training, and evaluation for Vision-Language-Action (VLA) and World-Action (WAM) models, with 1.79×–4.38× training throughput over open-source baselines across benchmarked models. [Docs] (Paper coming soon)
Data
- Unified Data Loading — A unified data-loading interface supporting mainstream formats like LeRobot (v2.0 / v2.1 / v3.0); each model's data pipeline matches its original open-source implementation.
- Feature Cache Precomputation (optional) — Precompute frozen-encoder outputs for DreamZero (VAE latents, text embeddings) and FastWAM (text embeddings) ahead of training, read directly during training to avoid re-encoding every step. [DreamZero] [FastWAM]
- Ego2Robot — Converts first-person videos of human manipulation into LeRobot v3.0 training data across 16 robot morphologies, each adapted to its own joint layout and gripper. [README]
Training
- Per-Model Deep Optimization — Custom optimizations targeting each model's bottlenecks (I/O, communication strategy,
torch.compile, CUDA Graph, custom fused operators, etc.), reaching 1.79×–4.38× measured throughput over open-source baselines (see Performance). - Precision Alignment — Training loss aligns with open-source baselines; comparison curves are already available for several models and will keep expanding alongside new model support. [Precision Comparisons]
- Multiple Distributed Strategies — Supports DDP / DDP + ZeRO-1 / FSDP / HSDP, selectable by model scale and cluster topology. [Tutorial]
- FP8 Communication Optimization (optional) — On supported NVIDIA GPUs, compresses cross-rank traffic to FP8: blockwise FP8 delta compression for FSDP2 parameter AllGather, and FP8 compression for DDP gradient all-reduce. [Usage]
Evaluation
-
Unified Evaluation — Closed-loop evaluation of trained policies in the LIBERO / CALVIN / SimplerEnv / RoboTwin / ManiSkill simulators; coverage is expanding continuously. [README]
-
Evaluation Results — Success rates on par with the corresponding open-source baselines, measured per model across LIBERO / RoboTwin / SimplerEnv:
🚀 LLM · VLM · Diffusion
Built on the Megatron backend, supporting large-scale pre-training and SFT for LLMs and VLMs, as well as diffusion model training. Key optimizations for each scenario:
LLM
- MoE EP Communication Optimization — Overlapped All2All / activation offload / compute, with further memory reduction beyond upstream Megatron-LM. [Usage]
- MoE Expert Load Balancing — Topology-aware dynamic replication of hot experts to balance EP workloads, with up to 74% lower overhead than industry solutions. [TAOT Paper]
- Adaptive FP8 Training — End-to-end FP8 for LLMs and VLMs with standard blockwise FP8; an optional adaptive mode picks per-operator precision by GEMM shape and efficiency. [Usage]
- Custom Fused Operators — Fused kernels like FusedDSA for DSA-style models — TileLang version open-sourced, high-performance CUDA version available on Baidu Baige platform.
- Long-Sequence Training — Scales LLM training to long sequences via Context Parallel (CP) and chunked-pipeline scheduling.
VLM
- Flexible Composition — Assemble VLMs from interchangeable ViT and LLM components (e.g. GLM-5.2 + MoonViT) straight from config — no custom model code. [Usage]
- Heterogeneous Parallelism — Independent TP / DP / recompute / freeze per model component (e.g. ViT vs. LLM) for optimal throughput and memory. [blog] [Usage]
- Decoupled Encoder-Decoder Training — Eliminates encoder-induced pipeline bubbles by separating ViT and LLM into independent tasks. [Usage]
- DP Load Balancing — Improves multi-node scaling efficiency with load-aware data redistribution that mitigates sequence-packing imbalance. [blog] [Usage]
- Flexible Data Pipeline — Energon WebDataset input for multimodal data, with both online and offline sequence packing. [Usage]
Diffusion
- Context Parallelism — Supports Ring, Ulysses, and hybrid context parallelism (CP) to split long video sequences across GPUs.
- Variable-Length Sample Packing — Packs multiple variable-length video samples into a single sequence to reduce padding waste, compatible with context parallelism. [Usage]
Compatibility
- Mcore Bridge — Supports both offline bidirectional Megatron ↔ HuggingFace conversion and online native HF load/save. [Usage]
- Heterogeneous Hardware — Native support for NVIDIA GPUs and Kunlun XPUs via a minimally-intrusive plugin design.
📊 Performance
Training throughput speedups over mainstream open-source baselines — each model and its baseline were benchmarked on the same machine type with the same training hyperparameters:
DeepSeek-V3.2 Lite reflects DSA operator-level optimizations and was validated on a reduced-layer configuration due to test-bed scale limits. Numbers were measured at a point in time and may evolve as implementations change on both sides.
⚡ Quick Start
1. Install
Using NVIDIA GPU as an example, pull the prebuilt image and start a container (requires the NVIDIA Container Toolkit):
docker pull loongforge/loongforge:latest
mkdir -p workspace
docker run --gpus all --ipc=host -it --rm \
-v "$(pwd)/workspace:/workspace/data" \
-w /workspace/LoongForge \
loongforge/loongforge:latest bash
The example above mounts
./workspaceto/workspace/datainside the container, for storing weights, datasets, and training outputs — these persist after the container exits.
For more installation options including source builds, see: Full GPU installation guide · Kunlun XPU installation guide
2. Pick a tutorial — by hardware and modality
- NVIDIA GPU: LLM · VLM · VLA & WAM (Embodied) · Diffusion
- Kunlun XPU: Kunlun XPU Tutorials
3. Launch example
Launch scripts for every supported model are already included in this repo: NVIDIA GPU scripts live under examples/, Kunlun XPU scripts under examples_xpu/ — see Supported Models for the full list.
The example below walks through DDP fine-tuning of Pi0.5 on LIBERO (single node, 8 GPUs); run all commands inside the container above.
① Prepare weights, tokenizer, and dataset (hf is the Hugging Face CLI):
hf download lerobot/pi05_base --local-dir /workspace/data/pi05_base
hf download google/paligemma-3b-pt-224 --local-dir /workspace/data/paligemma-3b-pt-224
hf download lerobot/libero_10 --repo-type dataset --local-dir /workspace/data/libero_10
② Launch training (paths are set via environment variables; defaults to 20 steps to validate the workflow):
export CHECKPOINT_PATH=/workspace/data/pi05_base
export TOKENIZER_PATH=/workspace/data/paligemma-3b-pt-224
export DATA_PATH=/workspace/data/libero_10
export OUTPUT_DIR=/workspace/data/outputs/pi05
bash examples/embodied/pi05/run_pi05_ddp_finetune.sh
Logs and TensorBoard data are saved under OUTPUT_DIR. For FSDP / ZeRO-1 launch options and LIBERO evaluation, see the Pi0.5 tutorial.
🏛️ Supported Models
Click any model for its training examples; see configs/models/ for the matching parameter configs. See the model support matrix for all variants.
[!TIP] For VLMs, also see the custom composition example, which assembles a new model from a ViT and an LLM purely through configuration.
🌟 Awesome Projects Built with LoongForge
See more on the Projects page, and if you've built something with LoongForge (or its predecessor, AIAK-Training-LLM), let us know — we'd love to feature it.
From the Community
- LLaVA-OneVision-2.0 — Next-generation multimodal model, with new VideoCaption and Spatial datasets
- Innovator-VL — Scientific multimodal LLM for advanced reasoning
- LLaVA-OneVision-1.5 — Fully open framework for democratized multimodal training
- Qianfan-VL — Domain-enhanced vision-language models for enterprise, 3B–70B parameters
From the LoongForge Team
- LoongForge-VLDA — Vision-Language-Delta-Action model for robotic manipulation: 98.5% on LIBERO, 84.5% zero-shot on LIBERO-Plus, and 17–18 points ahead of π₀.₅ on real robots.
https://github.com/user-attachments/assets/8563afca-f79a-4a45-bb4f-36e06c0ccbcb
📝 Community Blogs
- 百度&哈工大提出机器人操作新范式VLDA,从预测未来转向学习变化!
- VLA 训练如何一步步提速:以 Pi0.5 为例的 3 倍加速实践
- 百度百舸 LoongForge 团队提出 TAOT:拓扑感知传输破解大规模 MoE 训练端到端加速 1.43 倍
- 加速 GR00T N1.6 具身 VLA 模型训练!LoongForge 开源框架实现三层全链路优化,吞吐提升 2.3 倍、训练周期缩短 56.6%
- 多模态模型终于不用「抽帧看世界」?LLaVA-OneVision-2.0 全开源全帧率技术解读
- LoongForge 多模态异构并行训练加速,从问题到方案的全面解析
- 百度百舸开源全模态训练框架 LoongForge:一套代码跑通 GPU 与昆仑芯,多模态训练提速 45%
- 刷新记录!百度百舸助力 LLaVA-OneVision-1.5 高效训练
📂 Repository Layout
LoongForge/
├── loongforge/ # Core training framework
│ ├── train/ # Training entry points and trainers
│ │ ├── pretrain/ # Pretraining
│ │ ├── sft/ # Supervised fine-tuning
│ │ └── diffusion/ # Diffusion training
│ ├── models/ # Unified model abstractions
│ │ ├── foundation/ # LLM backbones
│ │ ├── encoder/ # Vision encoders
│ │ ├── omni_models/ # Multimodal composition (encoder + projector + decoder)
│ │ ├── diffusion/ # Diffusion models
│ │ └── common/ # Shared base configs, layers and utilities
│ ├── embodied/ # Embodied (VLA + world-action) training: models, data, trainers, distributed, eval
│ ├── data/ # Data loading and processing pipelines
│ ├── tokenizer/ # Tokenizers
│ └── utils/ # Config registry, constants and shared helpers
├── third_party/ # Third-party dependencies and patches
│ ├── Loong-Megatron/ # Patched Megatron-LM (git submodule)
│ └── patches/ # TransformerEngine patches
├── configs/ # Hydra YAML configs (models, data)
├── examples/ # Launch scripts for NVIDIA GPUs
├── examples_xpu/ # Launch scripts for Kunlun XPUs
├── cookbook/ # End-to-end project recipes built on LoongForge
├── tools/ # Standalone dev tools: checkpoint conversion, data preprocessing, etc. (see tools/README.md)
├── ops/ # Custom fused operators (incl. open-sourced TileLang)
├── docker/ # Dockerfiles (GPU & XPU)
├── tests/ # Test suites (E2E, regression, unit)
└── docs/ # Documentation
📝 Citation
If you find LoongForge helpful, please consider citing this project:
@software{LoongForge2026,
title = {LoongForge: A high-performance framework for training LLMs, VLMs, diffusion, and embodied models},
author = {{The LoongForge Authors}},
year = {2026},
url = {https://github.com/baidu-baige/LoongForge}
}
If you find TAOT helpful, please consider citing our paper:
@article{zhang2026taot,
title = {{TAOT}: Topology-Aware Optimal Transport for Dynamic Expert Replica Placement in {MoE} Training},
author = {Zhang, Lingyun and Zhang, Henghua and Gu, Shilei and Mo, Kai and Han, Shuai and Li, Shiyong and Wang, Yanpeng and Shen, Dou},
journal = {arXiv preprint arXiv:2608.03676},
year = {2026},
url = {https://arxiv.org/abs/2608.03676}
}
If you find LoongForge-VLDA helpful, please consider citing our paper:
@article{zhang2026vlda,
title = {{Vision-Language-Delta-Action}: Learning Compact Deltas as Actionable Transition Interfaces for Robotic Manipulation},
author = {Zhang, Lingsen and Li, Wei and He, Jie and Zhang, Henghua and Mo, Kai and Li, Shiyong and Wang, Yanpeng and Shao, Rui},
journal = {arXiv preprint arXiv:2610.25874},
year = {2026},
url = {https://arxiv.org/abs/2610.25874}
}
🤝 Contributing
We warmly welcome community contributions — bug reports, feature proposals, and PRs alike. Please read our Contributing Guidelines before submitting.
Thanks to all our contributors:
💬 Contact Us
| Channel | What it's for |
|---|---|
| GitHub Issues | Bug reports, usage questions, and feature requests |
| Developer Communities | WeChat group, Xiaohongshu, and more |
| Enterprise adoption, large-scale deployment, partnership, or any other topic |
🙏 Acknowledgments
LoongForge stands on the shoulders of the open-source community. Its Megatron backend builds on NVIDIA's Megatron-LM, and the project also draws on HuggingFace Transformers, LLaMA-Factory, Megatron-Bridge, LeRobot, and the official implementations of the models we support (e.g. OpenPI, NVIDIA Isaac GR00T).
We also thank the LINUX DO community for providing a welcoming space for technical discussion, and AtomGit for hosting LoongForge's official mirror.
📄 License
LoongForge is released under the Apache License 2.0; some files derive from third-party projects — see their file headers.