LoongForge README

The project's README from github.com/baidu-baige/LoongForge. As one markdown file: README.md.

English | 简体中文

LoongForge

Train LLMs, VLMs, diffusion and embodied models, faster.

GitHub stars Docker images on Docker Hub PRs welcome Join our Discord Join our WeChat group

Training throughput speedup up to 5.04x over open-source baselines 40+ ready-to-run model examples Runs on NVIDIA GPUs and Kunlun XPUs Proven in production with runs up to 5,000+ XPUs

🌐 Website  ·  📖 Docs  ·  ✍️ Blog  ·  ⚡ Quick Start  ·  📊 Performance  ·  🏛️ Supported Models  ·  💬 Contact Us


Example: embodied-model training on LoongForge — DreamZero at 4.38× baseline throughput, loss curves aligned

DreamZero training run compared side by side: LoongForge reaches 4.38x the baseline throughput while the training loss curves stay aligned

💡 Why LoongForge?

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.

🏗️ Architecture

Since optimal training strategies differ across model families and scales, LoongForge adopts a multi-backend architecture.

LoongForge architecture: a patched-Megatron stack for LLMs, VLMs and diffusion models alongside a torch-native stack for embodied models

🔥 Latest News

📅 More
  • [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]

✨ Key Features

🚀 Foundation Models

🧩 Multi-Modal Models

🤖 Embodied Models

🧰 Workflow & Compatibility

📖 Deep-dive: LLM · VLM · Embodied Model

📊 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:

LoongForge benchmark speedups over open-source baselines — from 1.45x on Qwen3-VL up to 5.04x on DeepSeek-V3.2 Lite

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 — 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/.

🏛️ Supported 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.

LLMVLMDiffusionEmbodied

🌟 Powered by LoongForge

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

📂 Repository Layout

📁 Directory tree
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

📝 Citation

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}
}

🤝 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:

LoongForge contributors

🙏 Acknowledgments

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.

💬 Contact Us

📄 License

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.

LoongForge (baidu-baige/LoongForge)

Searching Database…

Что это такое?Открытый обучающий фреймворк от команды Baige компании Baidu для LLM, VLM, диффузионных и эмбодимент-моделей, созданный для более быстрого обучения с меньшими затратами на GPU NVIDIA и XPU Kunlun.
Это библиотека, к которой я пишу код, или набор готовых скриптов для обучения?Работа построена на скриптах: вы запускаете готовые launch-скрипты в examples/ (NVIDIA) или examplesxpu/ (Kunlun) с конфигами из configs/models/. Внутри два бэкенда — модифицированный стек на Megatron-LM и torch-native стек для эмбодимент-моделей.
Как его запустить?Скачайте единый готовый Docker-образ (один образ покрывает все семейства моделей) или соберите из исходников, затем пройдите туториал под ваше железо и модальность и запустите launch-скрипт вашей модели из examples/.
Весь код под лицензией Apache-2.0?Apache-2.0, но не везде: некоторые файлы основаны на сторонних open-source проектах, поэтому проверяйте заголовки отдельных файлов — там указаны их копирайт и авторство.
Нужно ли железо NVIDIA или оно работает на чём-то ещё?GPU NVIDIA или XPU Baidu Kunlun — оба варианта поддерживаются нативно через плагинную архитектуру, для каждого есть своё руководство по установке и свой набор туториалов. Режима только на CPU не упоминается.
Почему название LoongForge?Название отсылает к традиционной китайской лодке-дракону (龙舟), символу слаженной силы и движения вперёд — образ вполне подходит распределённому фреймворку для обучения.
Что такое TAOT?Техника Baidu для обучения MoE-моделей: топологически-ориентированное динамическое размещение реплик, которое балансирует нагрузку при экспертном параллелизме и снижает накладные расходы до 74% по сравнению с индустриальными решениями; на реальном кейсе обучения получено ускорение в 1,43 раза.
На нём обучали что-то реальное?Да — LLaVA-OneVision-1.5 и 2.0, Innovator-VL и семейство Qianfan-VL (от 3B до 70B параметров) обучались на LoongForge или его предшественнике AIAK-Training-LLM, чьи крупнейшие продакшен-запуски достигали 5000+ XPU.
Могу ли я собрать кастомную VLM из отдельных компонентов?Да — гибкая мультимодальная сборка позволяет сочетать взаимозаменяемые компоненты ViT и LLM (в README показан пример GLM-5.2 + MoonViT) прямо из конфига, без написания кода модели, и настраивать параллелизм для каждого компонента отдельно.
What are similar projects?ms-swift, verl, verl, sglang, ZDTaichu5.0-9B, unsloth, airllm, vllm
Size
55.5 MB
Stars
687
Age
5mo
Commits · 90 Days