π0-style: one transformer with two sets of weights — a pretrained VLM for images and text, and a smaller "action expert" for robot state and actions — sharing attention layer by layer, and generating continuous action chunks with flow matching.
Time: about 60–75 min to read, plus 20 min for vla.py and the exercises.
What you'll learn
Why robots predict chunks of actions, and how often π0 re-plans
How π0 joins a VLM and an action expert with one block-causal attention, and why that makes a prefix KV cache possible
Flow matching from scratch: the straight-line training target, Euler sampling, and the time/sign conventions that differ between papers and code
A roofline view of VLA inference on Orin and Thor: the VLM prefix is compute-heavy, the 10 Euler steps are memory-bound
What came after π0, as of Oct 2026
Notation. Module 1 symbols as before (B = batch, h = query heads, nkv = K/V heads, dk = per-head dimension); Q, K, V are the attention matrices. New here: H = action horizon (actions per chunk, not image height), da = action dimension (action_dim in code), e = actions executed per call, f = control rate (Hz), Tinf = inference latency of one policy call, K = number of Euler steps (the scalar K, not the key matrix), t ∈ [0, 1] = flow time with t = 0 noise ε and t = 1 action a, v = a − ε = velocity (openpi's flipped u = ε − a appears only in the §2 conventions table). The noisy chunk is xt; at the two ends we write x(0) = ε and x(1) = a, because the diffusion module uses x₀ for the clean sample.
🎬 Learn it visually
Watch or read one of these first if a section feels abstract. Ordered: best intuition first, code last.
🎥 How I Understand Flow Matching, Jia-Bin Huang (16 min). Best intuition for the generative part: from normalizing flows to straight-line flow matching, all drawn.
📖 π0: Our First Generalist Policy, Physical Intelligence. The model's own blog post: architecture figure, tasks, and why a flow-matching action expert; the 4-min video shows it on robots.
💻 openpi, Physical Intelligence. Reference π0 / π0.5 code; read pi0.py next to vla.py (mind the flipped time convention, §2).
The Core Idea: Instruction In, Action Chunk Out
Intuition first. see + read → move. The robot looks through its cameras, reads the instruction, feels where its own arm is, and writes a short motion plan: the next second of movement, called an action chunk. Then it looks again and writes the next plan.
A VLA takes what the robot sees (cameras), what it has been asked to do (language) and where it currently is (proprioception), and outputs a sequence of future commands — an action chunk. π0 predicts H = 50 actions at a time, i.e. one second of motion for a robot controlled at 50 Hz.
1Inputs: up to 3 camera views [B, N_cam, 3, 224, 224]; an instruction such as "put the block in the red bowl"; proprioception, e.g. [B, 14] for two 7-dim arms (6 joints + gripper).
2π0 is a VLM (PaliGemma, 3B) plus a smaller action expert (0.3B) that share attention: 3.3B parameters in total (§1).
3Output: [B, H = 50, action_dim = 14], one second of motion for a robot controlled at 50 Hz; one curve per action dimension (three shown).
Why chunks? Predicting one action per observation would mean running a 3.3B-parameter model 50 times per second. Chunks decouple the prediction rate (here 2 Hz) from the execution rate (50 Hz: just step through a buffer), and they produce smoother, more consistent motion. Action chunking was popularised by ACT (Zhao et al., 2023) and is now standard in VLAs.
What to notice: each call predicts 50 actions (1 s at 50 Hz), but the robot executes only the first 25 (0.5 s) before asking for a new chunk, so chunks are predicted at about 2 Hz while motors are commanded at 50 Hz. In synchronous execution the robot also waits for the inference (red, 73 ms for π0 on an RTX 4090) each cycle. On 20 Hz robots π0 executes 16 actions, re-planning every 0.8 s. Chunks run open-loop.
Action-chunk timing, step by step
Intuition. A chunk is a short motion plan. You follow part of it, then re-plan before it runs out, like glancing at the road every half second while steering.
chunk length = H / fre-plan period = e / fasynchronous: no pause if H / f ≥ max(e / f, Tinf) + Tinf
Read it aloud
"Chunk length is H over f; the re-plan period is e over f; asynchronously, the chunk must last the re-plan period plus the latency." H = actions predicted per call, f = control rate in Hz, e = actions executed before re-planning (e ≤ H), Tinf = inference latency in seconds.
Why it exists
A 3.3B-parameter model cannot run 50 times a second on a robot. Chunks decouple the prediction rate (f / e) from the control rate (f), and give smoother, more consistent motion. If the next chunk is computed while the current one plays (asynchronous execution, or real-time chunking in §6.5), a new call can start every max(e/f, Tinf), and the robot never runs dry if the current chunk also covers the wait: H/f ≥ max(e/f, Tinf) + Tinf (the robot-FM module's timeline widget simulates this). In strictly synchronous execution the robot instead pauses for Tinf every cycle.
Tiny example
π0, f = 50 Hz, H = 50, e = 25: chunk = 50/50 = 1.0 s, re-plan every 25/50 = 0.5 s (2 Hz)
T_inf = 73 ms (RTX 4090): slack 500 − 73 = 427 ms per cycle
synchronous cycle = 73 + 500 = 573 ms → the robot waits 73/573 = 12.7% of the time
asynchronous: H/f = 1.0 s ≥ max(0.5, 0.073) + 0.073 = 0.573 s → no pause
Code
chunk = policy(obs) # [H, action_dim], every e/f seconds
for a in chunk[:e]: # execute e of H actions at f Hz
robot.send(a); time.sleep(1 / f)
π0 at a glance (paper + openpi code)
Part
Details
VLM ("prefix" weights)
PaliGemma 3B: SigLIP-So400m vision encoder (256 tokens per 224×224 image) + Gemma-2B (width 2048, 18 layers, 8 query heads, 1 KV head, head dim 256)
Action expert ("suffix" weights)
Gemma-300M-shaped: width 1024, MLP 4096, same 18 layers and the same heads / head dim, so both can share one attention. ~300M parameters, initialised from scratch
Suffix tokens
1 state token (linear projection of proprioception) + 50 action tokens (action and flow-time embedding mixed by an MLP)
Generation
Flow matching, 10 Euler steps (δ = 0.1); training flow times sampled from a Beta(1.5, 1)-based density that emphasises noisy timesteps
Measured latency
RTX 4090, 3 cameras: image encoders 14 ms + prefix forward 32 ms + 10 action steps 27 ms = 73 ms on-board
1. Full Model Pipeline
Intuition. One transformer with two sets of weights: a big "eyes and language" half and a small "hands" half. They keep separate weights but read each other's notes in every layer.
π0 is one transformer with two sets of weights, not two transformers. Every token is routed to exactly one weight set: images and text go to the VLM weights, robot state and actions go to the action-expert weights. In every layer, all tokens meet in a single self-attention. The paper describes the result as "more like a decoder-only mixture of experts".
1Prefix = up to 3 images × 256 SigLIP tokens + ≤ 48 text tokens = 816 tokens, width 2048, through the VLM weights (PaliGemma: Gemma-2B, 18 layers). It runs once per observation.
2Suffix = 1 state token (a Linear on proprioception) + 50 action tokens, each MLP(concat(W·xt, sincos(t))) = 51 tokens, width 1024, through the action-expert weights. It runs at every Euler step.
3In each of the 18 layers both sides compute their own Q, K, V with the same heads (8 query heads × 256 dims, 1 KV head), meet in one softmax under the block-causal mask (next figure), then go back to their own output and MLP weights (§3).
4The prefix outputs are never decoded into actions; only their per-layer K and V matter. The prefix never attends to the suffix, so those K/V are identical for all 10 steps: computed once, cached, reused. Only the 50 action tokens go through a final Linear to the velocity v̂ [B, 50, action_dim].
Training and inference, side by side (the maths is in Section 2):
# TRAINING: one forward pass per sample; both weight sets are trained# (the VLM starts from PaliGemma, the action expert from scratch)
t = sample_flow_time(B) # Beta-based density, noisy end favoured
eps = randn_like(a) # a: the real action chunk
x_t = (1 - t) * eps + t * a # t = 0 noise, t = 1 data
loss = ((model(x_t, t, obs) - (a - eps)) ** 2).mean() # target is constant along the line# openpi mirrors time: x_t = t*eps + (1-t)*a, u = eps - a. Same thing, see Section 2.# INFERENCE: prefix once, then 10 Euler steps
kv = run_prefix(images, text) # 816 tokens, once
x = randn(50, action_dim) # t = 0: noisefor i inrange(10):
t = i / 10
v = run_suffix(state, x, t, kv) # 51 tokens
x = x + v * 0.1# at t = 1, x is the action chunk
Three things worth staring at:
The action expert reads the VLM at every depth. In layer ℓ the action tokens attend to the keys and values the VLM computed in the same layer ℓ. Contrast this with cross-attending to one fixed VLM output: the π0 paper's smaller π0-small baseline uses the VLM's final output, and GR00T N1 (next module) uses a middle layer (LLM layer 12).
Two widths, one attention. The VLM is 2048 wide and the expert 1024 wide, but both project to the same 8 query heads × 256 dims and 1 KV head, so their tokens can sit in one softmax. Separate weights let the new robot-only inputs (state, noisy actions) use a smaller network, without disturbing the pretrained VLM weights.
The prefix is ~16× more tokens (816 vs 51) and ~6× more weights per layer than the suffix, yet it runs once per chunk while the suffix runs 10 times. The roofline section shows why the 10 cheap steps still cost real time on Jetson.
The block-causal attention mask
Intuition. The picture and the sentence do not change while the hands think, so they never look at the hands, and their work can be done once and reused.
1Block 1, images + text: attend only to each other, in both directions (like PaliGemma's prefix). They never see the suffix, so their K/V do not change across Euler steps: cache them.
2Block 2, the state token: sees the prefix and itself, not the noisy actions. The paper puts it in its own block "because it does not change with each flow matching integration step".
3Block 3, the 50 action tokens: see everything, including each other in both directions. The chunk is denoised jointly, not generated left to right (code: suffix_block_mask in vla.py).
2. Flow Matching from Scratch
Intuition. Start from random noise and follow a learned arrow field until you land on a plausible action. Training only has to teach the arrows, using straight lines from noise to real actions.
The diffusion module built DDPM. Flow matching is its simpler cousin: the same kind of network, simpler training and sampling math.
What to notice: both turn noise ε into data a. DDPM's path is curved and set by a noise schedule; flow matching uses the straight line between them, so the velocity v = a − ε is the same at every point of the line (dots at t = 0.25, 0.5, 0.75).
DDPM
Flow matching (π0)
Noisy point xt
√ᾱt · a + √(1 − ᾱt) · ε
(1 − t) · ε + t · a
Training path for one (noise, data) pair
Set by the noise schedule ᾱ_t
Straight line between ε and a
Regression target
ε (the noise)
v = a − ε (the velocity of that line)
Extra math
Schedule ᾱ_t, variance bookkeeping
Linear interpolation, MSE
Sampling
1000 steps (DDPM) or ~50 (DDIM)
~10 Euler steps
Network
The same kind of transformer; only the training target and the sampler change
The maths, one step at a time
Flow matching 1: the straight-line path and its velocity
Intuition. Draw a straight line from a noise sample to a real action. The model learns the direction of travel along that line.
xt = (1 − t)·ε + t·av = dxt/dt = a − εloss = ‖v̂(xt, t) − (a − ε)‖²
Read it aloud
"x-t equals one-minus-t times epsilon plus t times a; the velocity is a minus epsilon." a is a real action chunk [H, da] (H = 50 in π0; da = action_dim in code), ε is Gaussian noise of the same shape, t ∈ [0, 1] is the flow time (0 = noise, 1 = data), xt is the noisy chunk the network sees, v̂ is its predicted velocity (given xt, t and the observation).
Why it exists
Robot actions are often multimodal: "go around the cup on the left" and "on the right" are both fine. Plain regression with MSE averages the modes into "go through the cup". A generative model avoids that, and flow matching is the simplest one to train: the path is a straight line, so the target a − ε needs no noise schedule (unlike DDPM, which predicts the noise along a schedule-defined curve).
target v = a − ε = (1.8, −0.9) at every t on this line
Code
t = sample_flow_time(B)[:, None, None] # [B, 1, 1]
x_t = (1 - t) * noise + t * a # [B, H, action_dim]
loss = ((model(x_t, t, obs) - (a - noise)) ** 2).mean()
Flow matching 2: sampling with Euler steps
Intuition. Sampling is following the arrows: start at noise, take a small step along the predicted velocity, repeat.
x ← x + Δt · v̂(x, t)t ← t + ΔtΔt = 1/K
Read it aloud
"x becomes x plus delta-t times v-hat." Start at x = ε (t = 0) and take K steps of size Δt = 1/K; π0 uses K = 10, Δt = 0.1. Each step is one pass of the action expert over the 51 suffix tokens.
Why it exists
The learned field is the average velocity over all (noise, action) pairs passing through x, so it curves; several small steps follow the curve. One big step lands on the average action, which for a multimodal task is a bad action. Fewer steps = less latency, so this is a speed/quality knob (§6.4).
Tiny example
Continuing the example with a perfect v̂ for this single pair, K = 2 (Δt = 0.5):
Two modes a = ±1 instead: at t = 0 the best prediction is E[a] − ε = −ε, so one step gives x = ε − ε = 0, halfway between the modes. The widget below shows exactly that.
Code
x = torch.randn(B, H, action_dim) # t = 0: noise
for i in range(K):
x = x + model(x, i / K, obs) / K # Euler step, dt = 1/K
A subtlety that trips people up: each training pair's path is straight, but the model does not know which data point a noisy xt came from. It learns the average velocity over all pairs that pass through xt. That averaged field curves, which is why we still need several Euler steps. With a single step, every sample is sent to the mean action. The widget below shows exactly that.
Interactive: flow matching step by step on a 1-D action
The "task" has two equally good actions: go left (a = −1) or go right (a = +1), each with a little spread (σ = 0.1). Curves are 40 samples starting from noise at t = 0. The velocity field is the exact one a perfectly trained model would learn (closed form for a Gaussian mixture, same formula as gaussian_mixture_velocity() in vla.py).
Euler stepsdata
current t
0.0
mean |x| (2,000 samples)
–
within 0.3 of a mode
–
What to notice: with 1 step every sample jumps to x = 0, the average of "left" and "right", which is a bad action. With 2 steps samples split but many land between the modes. By ~10 steps nearly all land on a mode. With one mode, even 1 step works, because averaging one mode is harmless. That is the core argument for generative action heads over plain L2 regression.
Conventions: the same ODE written three ways
Source
Noisy point
Target
Sampling
This guide, vla.py, GR00T's code
xt = (1−t)·ε + t·a
v = a − ε
start at t = 0 (noise), x += v·dt, dt = +0.1
openpi (π0 / π0.5 code)
xt = t·ε + (1−t)·a
u = ε − a
start at t = 1 (noise), x += u·dt, dt = −0.1
π0 paper text
Aτ = τ·A + (1−τ)·ε
written as u = ε − A
"from τ = 0 to τ = 1" with Aτ+δ = Aτ + δ·v
The first two are exactly equivalent: substitute topenpi = 1 − t and u = −v (the tests behind exercise 3 check it numerically). The paper's text pairs the first path with the second target's sign. If you port π0 weights or compare against openpi, follow the code, not the prose. All three agree on one practical detail: training times are not uniform. They are drawn from a Beta(1.5, 1)-based density that puts more samples at the noisy end, where predicting the velocity is hardest. In this guide's convention that is t = 0.999·(1 − u) with u ~ Beta(1.5, 1), so the mean t is 0.4.
3. Inside One Layer — Shared Attention
Intuition. Each half keeps its own weights, but for attention they sit at one table: their queries, keys and values are stacked into one sequence.
1Prefix hidden x [B, 816, 2048] and suffix hidden y [B, 51, 1024] each go through their own norm and Wq, Wk, Wv: q with 8 heads, k and v with 1 KV head, all of dimension 256, so both sides fit in one softmax.
2Q = [qp ; qs], K = [kp ; ks], V = [vp ; vs] are concatenated along the sequence (867 tokens) and attend with softmax(QKᵀ/√dk + mask)·V, with head dimension dk = 256. The first 816 output rows go back to the VLM weights, the last 51 to the expert.
3Each side applies its own Wo + residual and MLP (VLM MLP 16384 wide, expert 4096) and moves on to layer ℓ+1. At inference the left column runs once per observation and kp, vp are cached; each Euler step runs only the right column, attending to 816 cached + 51 new keys.
Why not simply freeze a VLM and bolt on a separate policy network? Because sharing attention at every layer lets the action tokens query intermediate visual and linguistic features, not just a final summary. And because the weights are separate, the pretrained VLM is not overwritten by inputs it never saw during web pretraining. π0 still trains both sides end-to-end. Section 6.2 covers the alternatives (freezing, "knowledge insulation").
4. Code Walkthrough
MoTLayer — two experts, one attention, a KV cache for free▼
Proof that the cache is exact:Pi0.forward_joint() runs one attention over the full 867-token sequence with the 3-block mask and no cache. python vla.py prints the maximum difference to the cached path (≈ 1e-6, float rounding). It is identical because no prefix row of the mask lets a prefix token see a suffix token.
compute_loss — one flow-matching training step▼
defcompute_loss(self, batch, time_dist="beta"):
a = batch["action"] # [B, H, action_dim]
t = sample_flow_time(B, time_dist) # t = 0.999 * (1 - Beta(1.5, 1))
eps = torch.randn_like(a)
x_t = (1 - t) * eps + t * a # point on the straight line
v_target = a - eps # its constant velocity
v_pred = self.velocity(batch["images"], batch["token_ids"], batch["state"], x_t, t)
return F.mse_loss(v_pred, v_target)
Compared to DDPM training: no ᾱ table, no variance logic; the target is one subtraction. During training the prefix still runs once per sample. Only one flow time is drawn per sample, so there is nothing to cache.
generate_action — prefix once, 10 Euler steps▼
@torch.no_grad()defgenerate_action(self, images, token_ids, state, n_steps=10):
cache = self.run_prefix(images, token_ids) # expensive: ONCE per chunk
x = torch.randn(B, self.horizon, self.action_dim) # t = 0: pure noise
dt = 1.0 / n_steps
for i inrange(n_steps):
t = torch.full((B,), i * dt)
x = x + self.run_suffix(state, x, t, cache) * dt # cheap: 51 tokensreturn x # [B, H, action_dim]
5. Latency Calculator (roofline)
Defaults are π0's real shapes with 3 cameras. The formulas are pi0_cost() in vla.py: FLOPs ≈ 2 × parameters × tokens for every linear layer, plus attention; bytes = weights read + KV cache read. Each phase takes at least max(FLOPs / peak, bytes / bandwidth). These are lower bounds: real latency is higher (see the measured numbers in Section 7).
* Bandwidths are NVIDIA's published numbers. Orin Nano Super: NVIDIA's spec table lists 17 FP16 TFLOPS. For AGX Orin and Thor the peak dense FP16 is derived, because NVIDIA publishes sparse low-precision headlines: AGX Orin = dense INT8 tensor TOPS of its GPU ÷ 2 (85 → 42.5); Thor = 2,070 sparse FP4 ÷ 2 (dense) ÷ 2 (FP4 → FP8) ÷ 2 (FP8 → FP16) ≈ 259, our derivation, not an NVIDIA figure. Treat them as rough ceilings and overwrite them with your own GEMM benchmark. Try: switch the KV heads from 1 to 8 and watch the per-step bytes; switch Thor and see the prefix become memory-bound.
6. Critical Optimizations
The general versions of these techniques (KV caching, quantization, fewer sampling steps, overlapping compute with execution, roofline budgeting) are collected in the Memory & inference efficiency cookbook. Here is how they apply to π0.
6.1 Prefix KV cache (and why π0 uses 1 KV head)▼
Without the cache, each Euler step would re-run SigLIP and all 18 Gemma-2B layers on 816 tokens. With it, a step processes 51 tokens and reads the cached prefix keys/values. For π0's shapes on an AGX Orin, the calculator's floor drops from ≈ 960 ms to ≈ 124 ms per chunk.
The cache is small because Gemma-2B uses multi-query attention (1 KV head): 18 layers × 2 (K, V) × 816 tokens × 256 dims × 2 bytes ≈ 15 MB. With 8 KV heads it would be 120 MB, read again at every Euler step.
6.2 Train everything, freeze, or insulate the VLM?▼
π0 trains the whole model. The VLM starts from PaliGemma and the action expert from scratch. The paper describes no frozen components, and openpi's default fine-tuning configs update all weights (its "low_mem" variants switch to LoRA with a freeze filter).
Freezing the VLM (train only the expert and small adapters) is the cheap option: no VLM gradients or optimizer state, and the web-pretrained features cannot drift. GR00T N1.5 does this (next module).
Knowledge insulation (Driess et al., 2025): the authors found that naively adding a continuous action expert harms training speed and knowledge transfer. Their fix is to train the VLM backbone on discrete FAST action tokens and stop the expert's gradient from flowing into the VLM. The expert still produces continuous actions with flow matching at inference.
6.3 Precision: where quantization is safe▼
Component
Start with
Why
Vision encoder, VLM linear layers
FP8 / INT8 weights (try FP4 on Thor)
The bulk of the bytes and FLOPs; LLM-style weight quantization is mature
Action expert
BF16 / FP16 first
Small; its output is integrated over 10 steps, so errors accumulate
Action in/out projections, time embedding
FP16 / FP32
Tiny, and they set the precision of the continuous output
Validate in closed loop: success rate on the robot, not just the MSE of the actions. For a published data point on a VLA-class model, see GR00T N1.7's Thor numbers in Section 7: a mixed NVFP4 TensorRT build runs a full policy call in 35.9 ms vs 77.6 ms, and NVIDIA checks it against a 0.99 cosine-similarity threshold on the final actions.
6.4 Fewer Euler steps▼
π0 uses 10 steps; GR00T N1 uses 4. The 1-D widget shows the tradeoff: few steps pull samples toward the average of the modes. Halving the steps halves the action-expert time, which matters more on bandwidth-limited Jetsons than the FLOP count suggests. Going to 1–2 steps generally requires distillation-style training (an active research area). Re-evaluate task success whenever you change the step count.
6.5 Executing chunks: open loop, ensembling, real-time chunking▼
Open loop with re-planning (π0): execute 25 of 50 actions on 50 Hz robots (16 on 20 Hz robots), then predict a new chunk. The π0 paper reports it chose not to aggregate overlapping chunks.
Temporal ensembling (ACT): predict every step and average the overlapping predictions for each timestep. Smoother, but needs inference at the control rate.
Real-time chunking (Black et al., 2025): compute the next chunk while executing the current one. The actions that will certainly execute during the inference delay are frozen, and the rest are "inpainted" so the new chunk joins smoothly. No retraining is needed for diffusion- or flow-based VLAs. GR00T N1.7's inference code ships an inpainting option of the same kind.
The budget rule: if inference takes Tinf and you execute e actions at f Hz between calls, synchronous execution always pauses for Tinf per cycle. To keep the robot moving without pauses you compute the next chunk asynchronously, and the current chunk must cover the wait: H / f ≥ max(e / f, Tinf) + Tinf (π0: 1.0 s ≥ 0.573 s). RTC additionally smooths the switch between chunks.
7. Deployment on Robot Edge Compute
Platform (NVIDIA spec page)
Memory
Bandwidth
Headline AI number
π0 FP16 roofline floor / chunk*
Jetson Orin Nano 8GB (Super)
8 GB LPDDR5
102 GB/s
67 TOPS (sparse INT8)
≈ 295 ms — and 6.6 GB of FP16 weights would fill most of the 8 GB
Jetson AGX Orin 64GB
64 GB LPDDR5
204.8 GB/s
275 TOPS (sparse INT8; GPU 85 dense)
≈ 124 ms
Jetson AGX Thor T5000
128 GB LPDDR5X
273 GB/s
2070 TFLOPS (sparse FP4)
≈ 41 ms
* From pi0_cost() with the FP16 peaks of §5 (NVIDIA's 17 TFLOPS for the Orin Nano Super, derived for AGX Orin and Thor). A floor, not a prediction.
Measured numbers to calibrate against:
π0 on an RTX 4090 (paper, 3 cameras): 14 ms image encoders + 32 ms prefix + 27 ms for 10 action steps = 73 ms on-board.
GR00T N1.7 on Jetson (Isaac-GR00T deployment README, full policy call incl. preprocessing, 2 cameras at 256×256 → 156 VLM tokens, horizon 40, 4 denoising steps): AGX Thor (120 W) 111.5 ms in PyTorch eager, 77.6 ms with TensorRT, 35.9 ms with TensorRT + mixed NVFP4; Jetson Orin (30 W mode) 312.2 ms with TensorRT.
The roofline lesson. The prefix (816 tokens through ~2.4B weights) does ~800 FLOPs per byte, so it is compute-bound on Orin. Each Euler step pushes only 51 tokens through 0.3B weights, ~60 FLOPs per byte, so it is memory-bound everywhere. Ten such steps are under 10% of the FLOPs but about a quarter of the AGX Orin floor. To speed up the steps, shrink the bytes (quantize the expert and the KV cache, keep few KV heads) and the step count; faster tensor cores will not help.
Knobs for tighter budgets:
Fewer cameras or fewer tokens per image (prefix cost is linear in tokens, plus a quadratic attention term)
Lower-precision VLM weights (FP8/INT8, FP4 on Thor)
Fewer Euler steps (10 → 5), re-validated on the task
A smaller backbone: SmolVLA targets consumer GPUs and even CPUs and adds asynchronous inference
Overlap inference with execution (real-time chunking) so latency stops being a hard stall
8. As of Oct 2026: What Came After π0
π0 (Oct 2024) is the clearest architecture to learn from. Physical Intelligence and others have shipped a lot since:
π0-FAST (Jan 2025): FAST compresses action chunks into discrete tokens with a discrete-cosine-transform-based scheme, so a VLM can predict actions autoregressively; PI reports it matches diffusion VLAs while cutting training time by up to 5×.
π0.5 (Apr 2025): pre-trains on discrete tokens only, then adds the flow-matching action expert in post-training. At inference it first predicts a high-level subtask in text, then the actions; it targets open-world generalization. In openpi, π0.5 injects flow time through adaptive RMSNorm instead of π0's action-time MLP.
Knowledge insulation (May 2025) and real-time chunking (Jun 2025): see 6.2 and 6.5.
π0.6 / π*0.6 (Nov 2025): π0.6 is built on a 5B-parameter VLM plus an action expert. π*0.6 adds "Recap" — RL from demonstrations, expert corrections and the robot's own experience, through a learned value function and advantage-conditioned policies. PI reports more than doubled throughput on some of the hardest tasks.
π0.7 (Apr 2026): a "steerable" generalist whose prompt can carry language, metadata (desired quality and speed), control-modality labels and visual subgoal images. PI reports early signs of compositional generalization. In Oct 2026 PI opened a Pi API beta for fine-tuning and hosted inference.
Elsewhere:OpenVLA-OFT (2025) showed that parallel decoding, action chunking, continuous actions and an L1 loss raise OpenVLA's LIBERO success from 76.5% to 97.1% and its action throughput 26×. Google DeepMind's Gemini Robotics (2025) and Gemini Robotics 1.5 pair a VLA with an embodied-reasoning model; its model page now lists a Gemini Robotics 2 family (VLA, ER 2, and On-Device 2). NVIDIA's GR00T N1.x line is the next module.
9. Connections
Robot foundation models (next module): GR00T N1 keeps the VLM + flow-matching action head recipe, but its DiT cross-attends to a middle VLM layer, and thin per-embodiment encoders/decoders let one model drive many robots.
BEV (previous module): robot VLAs feed per-camera ViT tokens straight into the VLM. Driving VLAs (Alpamayo) apply the same VLM + diffusion-decoder pattern to trajectories.
RL fine-tuning: flow-matching policies have no cheap exact log-likelihood, so standard policy-gradient recipes do not drop in directly. π*0.6's Recap sidesteps this by conditioning the policy on an advantage estimate instead.
World models: the flip side, p(next observation | action). π0.7's lightweight world model that generates visual subgoal images is one bridge between the two.
Key Takeaways
A VLA maps (images, instruction, robot state) to a chunk of H future actions. π0: H = 50, re-plan every 0.5 s on 50 Hz robots.
π0 is one transformer with two weight sets. Prefix tokens use the 3B VLM, state + action tokens use a 0.3B expert, and they meet in a shared attention at every layer.
The 3-block causal mask keeps the prefix blind to the suffix, so its KV cache is computed once and reused for all 10 Euler steps (exactly, not approximately).
Flow matching trains on straight lines xt = (1−t)ε + t·a with target a − ε, and samples with a few Euler steps. One step collapses to the mean action.
Conventions differ (openpi flips time and sign). Port from the code, not the prose.
On Jetson the prefix is compute-heavy, while the Euler steps are memory-bound: cut bytes (quantize, few KV heads) and steps.
As of Oct 2026, the π line moved to π0.5 → π0.6/π*0.6 (RL) → π0.7 (steerable prompts), with RTC for smooth real-time execution.
Self-Check
1. Why can π0 cache the prefix's keys and values across Euler steps, but not the suffix's?
Answer
The mask never lets a prefix token attend to a suffix token, so prefix activations (and their K/V) depend only on the images and text, which are fixed for the chunk. Suffix tokens contain xt and t, which change every step.
2. A 50 Hz robot executes 25 actions per chunk. What is the maximum inference latency that avoids a pause with synchronous execution, and what is the chunk prediction rate?
Answer
25 / 50 Hz = 0.5 s between calls, so inference must finish in under 500 ms; chunks are predicted at 2 Hz. (With π0's measured 73 ms on an RTX 4090 there is plenty of slack.)
3. With xt = (1−t)ε + t·a, what is dxt/dt, and why does a perfectly trained model's 1-step Euler sample equal the mean action?
Answer
dxt/dt = a − ε. At t = 0, x(0) = ε carries no information about which a it will become, so the optimal prediction is E[a − ε | ε] = E[a] − ε. One Euler step gives x(1) = ε + (E[a] − ε) = E[a] for every sample.
4. Convert openpi's (t = 0.7, u) to this guide's convention.
Answer
there = 1 − 0.7 = 0.3 and v = −u. The noisy point itself is the same: 0.7·ε + 0.3·a = (1 − 0.3)·ε + 0.3·a.
5. How big is π0's prefix KV cache for 3 cameras in BF16, and how big would it be with 8 KV heads instead of 1?
Answer
18 layers × 2 × 816 tokens × (1 × 256) × 2 bytes ≈ 15.0 MB. With 8 KV heads: 8× that, ≈ 120 MB, read at each of the 10 Euler steps.
6. What is the mean flow time under π0's training distribution (in this guide's convention), and why emphasize that end?
Answer
t = 0.999·(1 − u) with u ~ Beta(1.5, 1), so E[t] = 0.999 × (1 − 0.6) ≈ 0.40. Near t = 0 the input is almost pure noise and the velocity is hardest to predict (the multimodal averaging problem), so it gets more training samples.
7. Why does the roofline say 10 Euler steps cost about a quarter of the AGX Orin floor although they are under 10% of the FLOPs?
Answer
Each step does ~38 GFLOPs but reads ~0.64 GB (expert weights + KV cache), about 60 FLOPs per byte, far below AGX Orin's ridge point (42.5 TFLOPS ÷ 204.8 GB/s ≈ 208 FLOP/B). So each step is limited by 204.8 GB/s: ≈ 3.1 ms, ≈ 31 ms for 10 steps, out of a 124 ms floor.
8. π0 vs "freeze the VLM and cross-attend to its final output": name one advantage of each.
Answer
π0's per-layer shared attention gives the action tokens access to intermediate features at every depth and trains end-to-end. Freezing plus cross-attention is cheaper to fine-tune, protects the VLM's pretrained knowledge, and lets you quantize the frozen VLM without worrying about gradients.
Hands-On Exercises
Build it yourself. Start with the guided lab labs/lab10.html: implement the interpolation path, the velocity target and the loss, train a tiny velocity MLP on action chunks with two valid behaviours, write the Euler sampler, and execute chunks with re-planning. Check each step with python labs/check.py 10 (the training step takes 5–20 s on a CPU), then do the exercises below.
Run from the vla/ folder. All run on CPU in seconds.
1. Verify the cache
Build vla_small(), random inputs with 2 cameras, and check velocity() against forward_joint(). Then break the mask (allow prefix rows to see the suffix in forward_joint) and confirm they now differ.
With gaussian_mixture_velocity and euler_integrate, measure the fraction of 20,000 samples landing within 0.3 of ±1 for 1, 2, 4, 10 steps. You should see 0%, ~39%, ~92%, ~99%. Then move the modes to ±3 and see how many steps you need now.
3. Prove the conventions agree
Integrate the same initial noise with this guide's sampler (t: 0 → 1, v) and with an openpi-style loop (s: 1 → 0, u(x, s) = −v(x, 1 − s), dt = −0.1). assert torch.allclose on the results.
4. Train a tiny flow policy
Train a 3-layer MLP vθ(x, t) on the bimodal 1-D data with the flow-matching loss (use sample_flow_time). After ~2,000 Adam steps, sample with 10 Euler steps and check that more than 90% of samples land within 0.3 of a mode. Then train a plain regressor a = f(noise) with MSE and observe it predicts ≈ 0.
5. Roofline what-ifs
Use pi0_cost() to find (a) the number of cameras at which the AGX Orin prefix floor alone exceeds 200 ms, and (b) how the per-step floor changes with n_kv_heads=8 and with bytes_per_param=1. Explain each change with bytes, not FLOPs.