|
1 | 1 | # LoongForge-Embodied — Embodied Model Training Subsystem |
2 | 2 |
|
3 | | -`loongforge/embodied/` is a **self-contained training subsystem for embodied foundation models**: Vision-Language-Action (VLA) policies (e.g. pi0.5) and world-action models (WAM, e.g. FastWAM). It lives inside the LoongForge monorepo alongside the Megatron-based LLM / VLM / Diffusion stacks, but is built on a torch-native DDP/FSDP engine instead. |
| 3 | +`loongforge/embodied/` is a **torch-native training subsystem for embodied models** — Vision-Language-Action (VLA) policies and world-action models (WAM) — combining broad open-source model support with production-grade training performance. |
| 4 | + |
| 5 | +- **Torch-native architecture** — built on vanilla PyTorch around unified `data`, `model`, and `trainer` abstractions that can be flexibly reused or extended. |
| 6 | +- **Extensive open-source model support** — π0.5, GR00T-N1.6 / N1.7, xVLA, Lingbot-VA, FastWAM, DreamZero, Cosmos3, and more — each supports fine-tuning, with accuracy aligned to the official baselines. |
| 7 | +- **High training throughput** — up to 2x+ throughput on representative models through `torch.compile`, CUDA Graph, custom kernels, and I/O optimization, plus a full range of distributed strategies: DDP, ZeRO-1, FSDP, and HSDP. |
4 | 8 |
|
5 | 9 | --- |
6 | 10 |
|
7 | 11 | ## Why a Separate Subsystem? |
8 | 12 |
|
9 | | -Compared with typical large models, embodied models are far smaller (generally under 10B) — a typical VLA is a VLM plus an action head. Their bottleneck is data plumbing and iteration speed, not model parameter scale — so Megatron's TP/PP/EP model parallelism does little here and only adds complexity. |
| 13 | +Embodied models are far smaller than typical LLMs (generally under 10B) — a VLA is essentially a VLM plus an action head — so their bottleneck is not model parameter scale. Megatron's TP/PP/EP model parallelism brings little benefit at this scale. |
10 | 14 |
|
11 | | -This subsystem is therefore built on **plain PyTorch DDP/FSDP**, with its own configuration, trainer, data, distributed, and evaluation layers. It shares LoongForge's repository, release, and tooling — but not the Megatron core engine. The two stacks are intentionally decoupled (no shared args/parser/core) so each evolves on its own terms: |
| 15 | +The subsystem is therefore built on a **torch-native DDP/FSDP** engine with its own configuration, trainer, data, distributed, and evaluation layers. It shares LoongForge's repository, release, and tooling, but stays intentionally decoupled from the Megatron core (no shared args / parser / core) so each stack evolves on its own terms. The core abstractions below all follow from that choice. |
12 | 16 |
|
13 | | -| Axis | LoongForge core (LLM / VLM / Diffusion) | LoongForge-Embodied | |
14 | | -|------|------------------------------------------|---------------------| |
15 | | -| Compute / distributed | Megatron-LM — TP / PP / EP / CP / FSDP | torch-native DDP / FSDP | |
16 | | -| Workload | large-scale, model-parallel pretrain/SFT | small-to-mid, data-parallel SFT | |
| 17 | +--- |
17 | 18 |
|
18 | | -The core abstractions below all follow from that choice. |
| 19 | +## Quick Start |
| 20 | + |
| 21 | +For the full framework user guide, see [User Manual](../../docs/source/embodied_tutorial/overview.md). Model-specific quick starts: |
| 22 | + |
| 23 | +- [π0.5 (pi05)](../../docs/source/embodied_tutorial/quick_start_pi05.md) |
| 24 | +- [GR00T-N1.6](../../docs/source/embodied_tutorial/quick_start_groot_n1_6.md) |
| 25 | +- [GR00T-N1.7](../../docs/source/embodied_tutorial/quick_start_groot_n1_7.md) |
| 26 | +- [FastWAM](../../docs/source/embodied_tutorial/quick_start_fastwam.md) |
| 27 | +- [DreamZero](../../docs/source/embodied_tutorial/quick_start_dreamzero.md) |
| 28 | +- [Cosmos3](../../docs/source/embodied_tutorial/quick_start_cosmos3.md) |
| 29 | +- [xVLA](../../docs/source/embodied_tutorial/quick_start_xvla.md) |
| 30 | +- [Lingbot-VA](../../docs/source/embodied_tutorial/quick_start_lingbot_va.md) |
| 31 | + |
| 32 | +--- |
| 33 | + |
| 34 | +## Performance |
| 35 | + |
| 36 | +Training speedups over mainstream open-source baselines. Performance is still under active optimization, and these numbers will keep improving over time: |
| 37 | + |
| 38 | +| Model | Type | Baseline | Speedup | |
| 39 | +|---|---|---|---| |
| 40 | +| DreamZero (DROID Wan2.2-5B Full) | WAM | DreamZero | **2.67×** | |
| 41 | +| GR00T-N1.6 | VLA | LeRobot | **2.31×** | |
| 42 | +| π0.5 | VLA | OpenPI | **2.23×** | |
| 43 | +| Lingbot-VA | WAM | LingBot-VA | **1.80×** | |
| 44 | +| xVLA | VLA | X-VLA | **1.69×** | |
| 45 | + |
| 46 | +Numbers reflect the baseline and LoongForge versions at measurement time and may evolve as implementations change. See the [root README](../../README.md#-performance) for the full benchmark chart across all model families. |
19 | 47 |
|
20 | 48 | --- |
21 | 49 |
|
@@ -58,11 +86,11 @@ loongforge/embodied/ |
58 | 86 |
|
59 | 87 | The entry point `train.py` is self-explanatory (parse configs → build trainer → train), so we skip it. The real core is the four abstractions below. |
60 | 88 |
|
61 | | -### 1. Model networking (`model/`) |
| 89 | +### 1. Model definition (`model/`) |
62 | 90 |
|
63 | 91 | One directory per model, registered into a single entry via `@register_model`: |
64 | 92 |
|
65 | | -- `modeling_<name>.py` — networking, forward, loss; |
| 93 | +- `modeling_<name>.py` — architecture, forward, loss; |
66 | 94 | - `model_configuration_<name>.py` — model config dataclass (architecture hyperparams); |
67 | 95 | - exposes a uniform interface upward (trainer / eval), so adding a model requires no change to the training loop. |
68 | 96 |
|
@@ -102,19 +130,6 @@ Resolution flow: `--model-name` routes through `config_map.py` to the model's YA |
102 | 130 |
|
103 | 131 | --- |
104 | 132 |
|
105 | | -## Quick Start |
106 | | - |
107 | | -For the full framework user guide, see [User Manual](../../docs/source/embodied_tutorial/overview.md). Model-specific quick starts: |
108 | | - |
109 | | -- [π0.5 (pi05)](../../docs/source/embodied_tutorial/quick_start_pi05.md) |
110 | | -- [GR00T-N1.6](../../docs/source/embodied_tutorial/quick_start_groot_n1_6.md) |
111 | | -- [GR00T-N1.7](../../docs/source/embodied_tutorial/quick_start_groot_n1_7.md) |
112 | | -- [FastWAM](../../docs/source/embodied_tutorial/quick_start_fastwam.md) |
113 | | -- [DreamZero](../../docs/source/embodied_tutorial/quick_start_dreamzero.md) |
114 | | -- [Cosmos3](../../docs/source/embodied_tutorial/quick_start_cosmos3.md) |
115 | | -- [xVLA](../../docs/source/embodied_tutorial/quick_start_xvla.md) |
116 | | -- [Lingbot-VA](../../docs/source/embodied_tutorial/quick_start_lingbot_va.md) |
117 | | - |
118 | 133 | ## Evaluation |
119 | 134 |
|
120 | 135 | Offline benchmark evaluation (LIBERO / CALVIN / SimplerEnv / RoboTwin / ManiSkill) is a separate module. See [Eval User Guide](../../docs/source/embodied_tutorial/eval_user_guide.md). |
0 commit comments