A high-performance framework for training LLMs, VLMs, diffusion, and embodied models on NVIDIA GPUs and Kunlun XPUs.
567
stars
390
commits
Python
primary language
Sep 15, 2026
updated
English | 简体中文
🌐 Website · 📖 Docs · ✍️ Blog · ⚡ Quick Start · 📊 Performance · 🏛️ Supported Models · 💬 Contact Us
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, thereby significantly reducing costs.
🐉 LoongForge is named after the traditional Chinese loong boat (龙舟), a symbol of coordinated power and forward momentum.
Since optimal training strategies differ across model families and scales, LoongForge adopts a multi-backend architecture.
🚀 Foundation Models
🧩 Multi-Modal Models
🤖 Embodied Models
🧰 Workflow & Compatibility
📖 Deep-dive: LLM · VLM · Embodied Model
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.
1. Install — use the unified prebuilt Docker image (one image for all model families) or build from source:
2. Pick a tutorial — by hardware and modality:
3. Find your model's scripts — ready-to-run launch scripts are available under examples/ / examples_xpu/, with configs in configs/models/.
LoongForge supports a broad range of model families across LLM, VLM, diffusion, and embodied. Select a model below to open its training examples. For complete usage instructions, see the User Guide and the full model support matrix.
| LLM | VLM | Diffusion | Embodied |
|---|---|---|---|
|
|
|
Open-source models trained with LoongForge or its predecessor AIAK-Training-LLM:
| Model | Highlights |
|---|---|
| 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 |
LoongForge/
├── loongforge/ # Core training framework
│ ├── train/ # Training entry points & trainers
│ │ ├── pretrain/ # Pretrain (LLM, VLM)
│ │ ├── sft/ # SFT (LLM, VLM, InternVL, ERNIE)
│ │ └── diffusion/ # Diffusion (WAN, Qwen-Image)
│ ├── models/ # Unified model abstractions
│ │ ├── foundation/ # LLM backbones (LLaMA, Qwen, DeepSeek, ...)
│ │ ├── encoder/ # Vision encoders (ViT, Qwen-VL, InternVL, ...)
│ │ ├── omni_models/ # Multi-modal composition
│ │ ├── diffusion/ # Diffusion models (WAN, Qwen-Image)
│ │ └── common/ # Shared layers and utilities
│ ├── embodied/ # LoongForge-Embodied: standalone torch-native (DDP/FSDP)
│ │ # embodied (VLA + world-action) subsystem — see loongforge/embodied/README.md
│ ├── data/ # Data pipelines (multi-modal, video, DP balance)
│ ├── tokenizer/ # Tokenizers
│ └── utils/ # Config map, constants, etc.
├── third_party/Loong-Megatron/ # Patched Megatron-LM (git submodule)
├── configs/ # Hydra YAML configs (models, data)
├── examples/ # GPU launch scripts
├── examples_xpu/ # Kunlun XPU launch scripts
├── tools/ # Checkpoint conversion, data preprocessing
├── ops/ # Custom fused operators (incl. open-sourced TileLang)
├── patches/ # TransformerEngine patches
├── docker/ # Dockerfiles (GPU & XPU)
├── tests/ # E2E test suite (YAML-driven)
└── docs/ # Documentation
If you find LoongForge helpful, please cite 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 use TAOT for MoE training in LoongForge, you can cite 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}
}
We warmly welcome community contributions — bug reports, feature proposals, and PRs alike. Please read our Contributing Guidelines before submitting.
Thanks to all our contributors:
LoongForge builds on NVIDIA's Megatron-LM and draws inspiration from many excellent open-source projects, including HuggingFace Transformers, LLaMA-Factory, Megatron-Bridge, and LeRobot, as well as the official implementations of the models it supports (e.g. OpenPI, NVIDIA Isaac GR00T). We sincerely thank these communities for their outstanding contributions, and would also like to extend our gratitude to the LINUX DO community for its welcoming space for technical discussion and support for open-source sharing.
LoongForge is released under the Apache License 2.0. Some files are derived from third-party open-source projects; please refer to the specific file headers for their respective copyright and attribution.
Python
93.4%
Shell
3.1%
Cuda
2.2%
A high-performance framework for training LLMs, VLMs, diffusion, and embodied models on NVIDIA GPUs and Kunlun XPUs.
567
stars
390
commits
Python
primary language
Sep 15, 2026
updated
English | 简体中文
🌐 Website · 📖 Docs · ✍️ Blog · ⚡ Quick Start · 📊 Performance · 🏛️ Supported Models · 💬 Contact Us
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, thereby significantly reducing costs.
🐉 LoongForge is named after the traditional Chinese loong boat (龙舟), a symbol of coordinated power and forward momentum.
Since optimal training strategies differ across model families and scales, LoongForge adopts a multi-backend architecture.
🚀 Foundation Models
🧩 Multi-Modal Models
🤖 Embodied Models
🧰 Workflow & Compatibility
📖 Deep-dive: LLM · VLM · Embodied Model
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.
1. Install — use the unified prebuilt Docker image (one image for all model families) or build from source:
2. Pick a tutorial — by hardware and modality:
3. Find your model's scripts — ready-to-run launch scripts are available under examples/ / examples_xpu/, with configs in configs/models/.
LoongForge supports a broad range of model families across LLM, VLM, diffusion, and embodied. Select a model below to open its training examples. For complete usage instructions, see the User Guide and the full model support matrix.
| LLM | VLM | Diffusion | Embodied |
|---|---|---|---|
|
|
|
Open-source models trained with LoongForge or its predecessor AIAK-Training-LLM:
| Model | Highlights |
|---|---|
| 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 |
LoongForge/
├── loongforge/ # Core training framework
│ ├── train/ # Training entry points & trainers
│ │ ├── pretrain/ # Pretrain (LLM, VLM)
│ │ ├── sft/ # SFT (LLM, VLM, InternVL, ERNIE)
│ │ └── diffusion/ # Diffusion (WAN, Qwen-Image)
│ ├── models/ # Unified model abstractions
│ │ ├── foundation/ # LLM backbones (LLaMA, Qwen, DeepSeek, ...)
│ │ ├── encoder/ # Vision encoders (ViT, Qwen-VL, InternVL, ...)
│ │ ├── omni_models/ # Multi-modal composition
│ │ ├── diffusion/ # Diffusion models (WAN, Qwen-Image)
│ │ └── common/ # Shared layers and utilities
│ ├── embodied/ # LoongForge-Embodied: standalone torch-native (DDP/FSDP)
│ │ # embodied (VLA + world-action) subsystem — see loongforge/embodied/README.md
│ ├── data/ # Data pipelines (multi-modal, video, DP balance)
│ ├── tokenizer/ # Tokenizers
│ └── utils/ # Config map, constants, etc.
├── third_party/Loong-Megatron/ # Patched Megatron-LM (git submodule)
├── configs/ # Hydra YAML configs (models, data)
├── examples/ # GPU launch scripts
├── examples_xpu/ # Kunlun XPU launch scripts
├── tools/ # Checkpoint conversion, data preprocessing
├── ops/ # Custom fused operators (incl. open-sourced TileLang)
├── patches/ # TransformerEngine patches
├── docker/ # Dockerfiles (GPU & XPU)
├── tests/ # E2E test suite (YAML-driven)
└── docs/ # Documentation
If you find LoongForge helpful, please cite 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 use TAOT for MoE training in LoongForge, you can cite 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}
}
We warmly welcome community contributions — bug reports, feature proposals, and PRs alike. Please read our Contributing Guidelines before submitting.
Thanks to all our contributors:
LoongForge builds on NVIDIA's Megatron-LM and draws inspiration from many excellent open-source projects, including HuggingFace Transformers, LLaMA-Factory, Megatron-Bridge, and LeRobot, as well as the official implementations of the models it supports (e.g. OpenPI, NVIDIA Isaac GR00T). We sincerely thank these communities for their outstanding contributions, and would also like to extend our gratitude to the LINUX DO community for its welcoming space for technical discussion and support for open-source sharing.
LoongForge is released under the Apache License 2.0. Some files are derived from third-party open-source projects; please refer to the specific file headers for their respective copyright and attribution.
Python
93.4%
Shell
3.1%
Cuda
2.2%