GR00T N1-style: a VLM ("System 2") and a flow-matching DiT action head ("System 1") shared across many robots, with thin embodiment-specific encoders and decoders, so that one set of weights can drive arms and humanoids.
Prerequisites
Time: about 60 min to read, plus 20 min for robot_fm.py and the exercises.
What you'll learn
Notation (same as the VLA module). H = action horizon (actions per chunk), da = action dimension of one robot (action_dim; zero-padded to the largest one, MAX_ACTION_DIM = 32 in code), e = actions executed per call, f = control rate (Hz), Tinf = inference latency of one policy call, K = number of flow-matching (Euler) steps, t ∈ [0, 1] = flow time with t = 0 noise ε and t = 1 action a, v = a − ε = velocity.
Watch or read one of these first if a section feels abstract. Ordered: best intuition first, code last.
Intuition first. One brain, many bodies. Share everything that is about the world and the task, and give each robot only a thin adapter for its own joints and sensors.
A robot foundation model is a single pretrained network that can drive different robots, with different joints, action spaces and sensors. "Foundation" means it is pretrained on large cross-embodiment data and then post-trained for a specific robot or task, instead of being trained from scratch per robot.
What to notice: only the thin purple slots on either side belong to one robot; everything in the middle is shared (92.7% of the weights in robot_fm.py's rfm_base with 4 robots). The embodiment ID routes each sample to its own slots.
Toy embodiment in robot_fm.py | State dims | Action dims | Action chunk |
|---|---|---|---|
| Franka 7-DOF arm | 14 | 7 | [B, 16, 7] |
| xArm bimanual | 28 | 14 | [B, 16, 14] |
| Unitree H1 humanoid | 50 | 22 | [B, 16, 22] |
| Unitree Go2 quadruped | 36 | 12 | [B, 16, 12] |
These are toy embodiments to show the routing. GR00T N1 itself was evaluated on the Fourier GR-1 humanoid, Franka arms (RoboCasa) and bimanual arms (DexMimicGen).
| Part | GR00T N1-2B |
|---|---|
| System 2 (VLM) | NVIDIA Eagle-2, fine-tuned from SmolLM2 (LLM) and SigLIP-2 (images); 224×224 images → 64 tokens per frame; uses the 12th LLM layer's output; runs at 10 Hz on an L40 |
| System 1 (action head) | DiT with flow matching; alternating cross-attention (to the VLM tokens) and self-attention (over state + action tokens); adaptive LayerNorm on the denoising step; motor actions at 120 Hz |
| Embodiment-specific parts | MLPs that encode state, encode noisy actions (+ timestep) and decode actions, one set per embodiment |
| Chunk / steps | H = 16 actions, K = 4 denoising steps; flow time from a Beta(1.5, 1)-based density (like π0) |
| Size, latency | 2.2B parameters (1.34B in the VLM); a 16-action chunk in 63.9 ms on an L40 in bf16 |
| Freezing | The language part of the VLM stays frozen in pre- and post-training |
Intuition. A slow thinker plus a fast reflex. The thinker (a VLM) looks and decides about 10 times a second; the reflex (a small action head) turns each decision into smooth motor commands 120 times a second.
A human driver does not re-plan "I'm driving home" at every steering correction. Slow, deliberate reasoning ("System 2") and fast, reflexive control ("System 1") run at different rates. GR00T borrows that vocabulary: the VLM interprets the scene and the instruction, and the action head turns that into motor commands. The paper quotes 10 Hz for the VLM and 120 Hz for motor actions.
Without the split, every denoising step would re-run the VLM. In the toy rfm_base (2 cameras, 4 steps) that is 3.1× more FLOPs per chunk for an identical result (see the calculator).
Intuition. While the slow thinker computes the next plan, the fast reflex still needs commands to send. Either the robot waits, or the current chunk must last until the next one arrives.
π0: f = 50 Hz, e = 25, Tinf = 73 ms → cycle = 73 + 500 = 573 ms, idle = 73/573 = 12.7%, 25/0.573 = 43.6 actions/s
GR00T N1: f = 120 Hz, e = 12, Tinf = 63.9 ms → period = max(100, 63.9) = 100 ms
never dry needs H ≥ 120 × (0.100 + 0.0639) = 19.7 → H = 20; the paper's H = 16 covers only 133 ms
cycle = T_inf + e / f; idle = T_inf / cycle # synchronous period = max(e / f, T_inf) # asynchronous never_dry = H / f >= period + T_inf
Intuition. The thinker writes a note once (the VL tokens); the reflex reads that note four times while it turns noise into a motion plan.
for i in range(4): x += S1(x, i/4, state, vl, robot) * 0.25.Three things to notice:
rfm_base one robot's encoders and decoder are 362,016 parameters, about 2% of the ~18.5M shared transformer weights.Intuition. Like travel plug adapters: the appliance is shared, only the plug changes from country to country, here from robot to robot.
Robots have different state and action sizes. Two ingredients make one network handle all of them: padding (every state is zero-padded to a maximum width, every action chunk too, and the loss ignores the padded dimensions) and embodiment-specific weights for the layers that touch those raw vectors.
What to notice: W[ids] picks one slice per sample, here a [4, in, out] tensor holding W[0], W[2], W[1], W[0], and one batched matmul, y = bmm(x, W[ids]) + b[ids][:, None], handles the whole mixed batch. No Python loop over robots, no ModuleDict lookup, and every robot's slice gets gradients from its own samples. Actions are padded: [4, 16, 32] here, with real dims 7 / 22 / 14 / 7 and zeros after.
What one robot owns in rfm_base (d_action = 256, state padded to 64, actions padded to 32):
| Per-robot part | Shape | Parameters |
|---|---|---|
| state encoder | MLP 64 → 256 → 256 | 82,432 |
| action encoder | W1 32 → 256, W2 512 → 256, W3 256 → 256 | 205,568 |
| action decoder | MLP 256 → 256 → 32 | 74,016 |
| per robot | 362,016 |
The shared transformer weights (System 2 layers + DiT) are about 18.5 M. With 4 robots the per-robot parts add up to 1.45 M, so 92.7% of these weights are shared. Adding a robot means filling one more slot and fine-tuning; nothing else changes. (GR00T N1.7 reserves 32 slots and pads state and action to 132 dims.)
Why not a ModuleDict keyed by robot name? It is the most readable version, and fine when every batch holds a single robot. With mixed batches you would split the batch per robot, run several small matmuls and stitch the results back together. The gathered-tensor version does it in one shot. It is what Isaac-GR00T's CategorySpecificLinear implements.
Intuition. Mix robots in one batch. Each sample carries its robot ID, so its raw numbers go through its own adapter and its padded dimensions are ignored.
# One training step on a mixed batch (robot_fm.RobotFoundationModel.compute_loss) vl = model.encode_system2(batch["images"], batch["token_ids"]) # no state here t = 0.999 * (1 - Beta(1.5, 1).sample((B,))) # noisy end favoured noise = torch.randn_like(a) # a: [B, 16, 32] padded x_t = (1 - t) * noise + t * a v_pred = model.system1(x_t, t, batch["state"], vl, batch["embodiment_id"]) mask = action_mask(batch["embodiment_id"], H) # 1 on real dims only loss = (((v_pred - (a - noise)) ** 2) * mask).sum() / mask.sum() loss.backward()
Intuition. The same flow matching as in the VLA module, with two twists: only 4 sampling steps, and a mask so that padded action dimensions never count.
Franka: 7 real dims of 32 → the mask counts 16 × 7 = 112 of 512 entries per sample
Euler with K = 4 on the VLA module's example (ε = (−0.8, 0.4), a = (1.0, −0.5), perfect v̂ = (1.8, −0.9)):
(−0.8, 0.4) → (−0.35, 0.175) → (0.1, −0.05) → (0.55, −0.275) → (1.0, −0.5)
mask = action_mask(ids, H) # 1 on real dims loss = (((v_pred - (a - noise)) ** 2) * mask).sum() / mask.sum() for i in range(4): x = x + model.system1(x, i / 4, state, vl, ids) / 4
Data sources mix freely:
| Source | Size | Embodiments | Notes |
|---|---|---|---|
| Open X-Embodiment (2023) | 1M+ real trajectories | 22 robot embodiments | Pools 60 existing datasets from 34 labs |
| DROID (2024) | 76k trajectories, 350 h | Franka | 564 scenes, 84 tasks, in-the-wild teleoperation |
| AgiBot World (2025) | 1M+ trajectories | AgiBot platform | 217 tasks in five deployment scenarios |
| RH20T (2023) | 110k+ sequences | Several robots | Contact-rich; visual, force, audio and action data |
| Synthetic data | Scales with compute | Any modelled robot | GR00T N1 trains on "real-robot trajectories, human videos, and synthetically generated datasets"; mind the sim-to-real gap |
| Human video | e.g. 20K hours (EgoScale, GR00T N1.7) | Human hands | Needs an action space shared with robots (N1.7: relative end-effector actions) |
The embodiment ID is what lets you mix these sources: each robot's raw state and actions go through its own encoder and decoder, so a 7-dim Franka action and a 22-dim humanoid action never share an input layer.
Defaults are rfm_base() with 2 cameras. The formulas are rfm_cost() in robot_fm.py, and the parameter counts match the real model exactly (embedding tables excluded). Try scaling d_vlm and the layer counts up to see the time floors become meaningful.
Bandwidth / TFLOPS default to the Jetson AGX Orin 64GB values used in the VLA module (204.8 GB/s from NVIDIA; 42.5 TFLOPS is a derived dense FP16 peak). The times are roofline floors, not predictions.
The general techniques behind these (caching what does not change, fusing small kernels, quantization, TensorRT export, roofline budgeting) are collected in the Memory & inference efficiency cookbook. Here is how they apply to a dual-system robot model.
NVIDIA spec pages: Jetson AGX Thor T5000 — 2070 sparse FP4 TFLOPS, 128 GB LPDDR5X, 273 GB/s, 40–130 W (T4000: 1200 sparse FP4 TFLOPS, 64 GB, 273 GB/s). Jetson AGX Orin 64GB — 275 sparse INT8 TOPS, 204.8 GB/s. Headline numbers are sparse low-precision peaks; the VLA module's roofline section explains how far real kernels land from them.
Measured GR00T N1.7 policy calls from the Isaac-GR00T deployment README. Each call is complete, including preprocessing; the LIBERO checkpoint, batch 1, two 256×256 cameras → 156 VLM tokens, action horizon 40, 4 denoising steps; median of 60 calls:
| Device | PyTorch eager | torch.compile | TensorRT | TensorRT + mixed NVFP4 |
|---|---|---|---|---|
| H100 80GB | 101.5 ms | 53.4 ms | 22.9 ms | — |
| RTX Pro 6000 Blackwell Server | 75.7 ms | 52.1 ms | 24.7 ms | — |
| L40 | 123.7 ms | 66.8 ms | 35.0 ms | — |
| DGX Spark | 200.8 ms | 183.1 ms | 116.6 ms | — |
| Jetson AGX Thor (120 W) | 111.5 ms | 100.5 ms | 77.6 ms | 35.9 ms |
| Jetson Orin (30 W) | 500.1 ms | 412.4 ms | 312.2 ms | — |
This module ends with open problems. The field moves fast, so treat these as live questions:
This is the last module of the main path. Looking back:
The robot foundation model reuses almost every earlier block: transformer attention (both systems), ViT patches (vision encoder), VLM fusion (System 2), DiT-style adaptive normalization (System 1), flow matching and action chunks (VLA), and routing by ID (a cousin of MoE routing, decided by the robot rather than learned per token). BEV and Mamba are the parallel tracks: BEV-style geometry matters when many cameras must agree on metric space, and state-space models are one answer to long observation histories.
Next: the hands-on build a personal agent tutorial (optional; it needs only Build an LLM). Then reread the memory & inference efficiency cookbook with all nine modules in mind: it collects every optimization idea of the path (KV cache, quantization, fewer sampling steps, rooflines) in one place.
1. Why does GR00T put the robot state into System 1 rather than into the VLM prompt?
The state is low-dimensional, robot-specific and changes fast. It needs a per-robot encoder, and the action head is where per-robot layers live. The VLM then sees only images and language, which are shared across robots. (π0 also routes state to its action expert, as a separate token block.)
2. At the paper's rates (VLM 10 Hz, actions 120 Hz, H = 16), how many actions does one chunk hold, and how long does it last?
16 actions at 120 Hz last 16 / 120 = 133 ms, a little longer than the 100 ms between VLM updates (12 actions). Whether that is enough also depends on latency: a chunk computed from an observation at time s only arrives at s + Tinf. In the timeline widget, asynchronous execution with Tinf = 63.9 ms needs H ≥ 20 to never run dry.
3. In rfm_base, how many parameters does one robot add, and why is that cheap?
362,016 (state encoder 82,432 + action encoder 205,568 + decoder 74,016). That is about 2% of the ~18.5M shared transformer weights, because the per-robot layers only touch the small raw state/action vectors and the 256-wide token stream.
4. A batch has robot IDs [0, 2, 1, 0]. What does W[cat_ids] produce, and why is that better than looping over a ModuleDict?
A [4, in, out] tensor holding W[0], W[2], W[1], W[0], which feeds one torch.bmm. A ModuleDict needs a Python loop or per-robot sub-batches, i.e. several small kernel launches plus gather/scatter. The tensor version also makes "add a robot" a matter of filling a spare slot.
5. Synchronous execution, f = 50 Hz, e = 25 executed actions per call, Tinf = 73 ms. What fraction of time does the robot stand still, and how many actions per second does it execute?
Cycle = Tinf + e/f = 73 + 500 = 573 ms, idle 73 ms → 12.7% standing still; 25 actions per 573 ms ≈ 43.6 actions/s instead of 50.
6. Asynchronous execution with Tinf = 312 ms, f = 120 Hz, H = 40, e = 12. Can the robot avoid pausing? What would fix it?
The re-plan period is max(e/f, Tinf) = max(100, 312) = 312 ms, and the chunk covers 40/120 = 333 ms. A chunk must cover period + Tinf = 624 ms, so the robot runs dry for about 291 ms per cycle. Fixes: faster inference (TensorRT/NVFP4, a bigger module), a longer horizon, or a lower control rate (at 60 Hz, 40 actions cover 667 ms ≥ 624 ms).
7. Why can the K/V projections of the VL tokens be cached across denoising steps, but not the queries?
K and V come from the VL tokens, which are fixed for the chunk. The queries come from the state + noisy action tokens, which change at every step.
8. GR00T's DiT uses adaptive LayerNorm conditioned on the timestep. What does the conditioning not include, and where does that information enter instead?
The embodiment. Robot identity enters through the per-robot state encoder, action encoder (which also sees t) and action decoder, not through the shared AdaLN.
labs/lab10.html (shared with the VLA module). Do that lab and check it with python labs/check.py 10. As an extension, train it on two robots with different action sizes using padding and the mask from the card in Section 4, then do the exercises below.Run from the robot-fm/ folder; CPU is fine.
Build a CategorySpecificLinear(5, 7, 3) and a random batch with IDs [0, 3, 3, 1, 4, 0]. For each sample, check the output equals x[i] @ W[id] + b[id].
assert torch.allclose(y[i], x[i] @ csl.W[ids[i]] + csl.b[ids[i]], atol=1e-6)
With make_batch(list(EMBODIMENTS), 16), run model.system1 on the full batch and on each sample alone (same x_t, t). Assert the outputs match, which proves no information leaks between robots in a batch.
Check per_embodiment_params(256) == 362016 and that rfm_cost()["params_dit"] equals the System 1 parameters minus the per-robot modules for rfm_base(). Then add a fifth robot to EMBODIMENTS (it fits into a spare slot) and confirm the parameter count does not change.
Write a small cross-attention module with explicit Wq, Wk, Wv, Wo and a precompute_kv(vl) method. Verify the cached path equals the uncached one with torch.allclose, then time 4 denoising steps both ways with 512 VL tokens.
Re-implement the timeline widget's synchronous and asynchronous models in Python. Reproduce self-check 5 (12.7% idle) and 6 (≈ 291 ms dry per cycle). Then find the smallest horizon H that removes all pauses at f = 120 Hz with Tinf = 35.9 ms and e = 12.