VLA — Vision-Language-Action

π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.

Before you start

Prerequisites

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.

  1. 🎥 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.
  2. 📖 π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.
  3. 📖 An introduction to Flow Matching, Cambridge MLG blog. The maths step by step with plots of the paths and velocity fields.
  4. 🎥 Flow-Matching vs Diffusion Models explained side by side, AI Coffee Break with Letitia (16 min). Connects this module to the diffusion module.
  5. 💻 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.

see + read → move: what a VLA does cameras instruction robot state 1 VLA (π0) 2 action chunk: 50 steps 0 s1 s 3
  1. 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. 2π0 is a VLM (PaliGemma, 3B) plus a smaller action expert (0.3B) that share attention: 3.3B parameters in total (§1).
  3. 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.
Predict 1 s, execute 0.5 s, re-plan chunk 1chunk 2 executeddroppedexecuted73 ms 0 s0.5 s1 s1.5 s

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)

PartDetails
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 tokens1 state token (linear projection of proprioception) + 50 action tokens (action and flow-time embedding mixed by an MLP)
GenerationFlow matching, 10 Euler steps (δ = 0.1); training flow times sampled from a Beta(1.5, 1)-based density that emphasises noisy timesteps
Measured latencyRTX 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".

π0: one transformer, two weight sets, one attention prefix: VLM weightssuffix: action expert 12 images + instruction state noisy actions + t layer ℓ: VLM weights layer ℓ: expert weights shared attention × 18 layers 3 K, V cached once 4 velocity v̂
  1. 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.
  2. 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.
  3. 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).
  4. 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: noise
for i in range(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 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.

Who may attend to whom (rows = queries) imagestextqactions imagestextstate qactions ✓ attend✗ blocked✓ attend to all 123
  1. 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.
  2. 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".
  3. 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.

Diffusion vs flow matching: the path from noise to data DDPM (diffusion) progress → ε a curved path flow matching (π0) t → ε a x_t = (1−t)ε + t·a v = a − ε

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).

DDPMFlow matching (π0)
Noisy point xt√ᾱt · a + √(1 − ᾱt) · ε(1 − t) · ε + t · a
Training path for one (noise, data) pairSet by the noise schedule ᾱ_tStraight line between ε and a
Regression targetε (the noise)v = a − ε (the velocity of that line)
Extra mathSchedule ᾱ_t, variance bookkeepingLinear interpolation, MSE
Sampling1000 steps (DDPM) or ~50 (DDIM)~10 Euler steps
NetworkThe 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).
Tiny example

2-D example: ε = (−0.8, 0.4), a = (1.0, −0.5).

t = 0.25: x_t = 0.75·(−0.8, 0.4) + 0.25·(1.0, −0.5) = (−0.35, 0.175)

t = 0.5: x_t = (0.1, −0.05)

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

(−0.8, 0.4) → +0.5·(1.8, −0.9) → (0.1, −0.05) → (1.0, −0.5) = a

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 steps data
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

SourceNoisy pointTargetSampling
This guide, vla.py, GR00T's codext = (1−t)·ε + t·av = a − εstart at t = 0 (noise), x += v·dt, dt = +0.1
openpi (π0 / π0.5 code)xt = t·ε + (1−t)·au = ε − astart at t = 1 (noise), x += u·dt, dt = −0.1
π0 paper textAτ = τ·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.

One π0 layer: separate weights, one attention prefix x suffix y 1 VLM: Q, K, V expert: Q, K, V concat → attentionblock-causal mask 2 VLM: out + MLP expert: out + MLP 3
  1. 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.
  2. 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.
  3. 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

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.

7. Deployment on Robot Edge Compute

Platform (NVIDIA spec page)MemoryBandwidthHeadline AI numberπ0 FP16 roofline floor / chunk*
Jetson Orin Nano 8GB (Super)8 GB LPDDR5102 GB/s67 TOPS (sparse INT8)≈ 295 ms — and 6.6 GB of FP16 weights would fill most of the 8 GB
Jetson AGX Orin 64GB64 GB LPDDR5204.8 GB/s275 TOPS (sparse INT8; GPU 85 dense)≈ 124 ms
Jetson AGX Thor T5000128 GB LPDDR5X273 GB/s2070 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:

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:

  1. Fewer cameras or fewer tokens per image (prefix cost is linear in tokens, plus a quadratic attention term)
  2. Lower-precision VLM weights (FP8/INT8, FP4 on Thor)
  3. Fewer Euler steps (10 → 5), re-validated on the task
  4. A smaller backbone: SmolVLA targets consumer GPUs and even CPUs and adds asynchronous inference
  5. 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:

9. Connections

Key Takeaways

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.

assert torch.allclose(m.velocity(*args), m.forward_joint(*args), atol=1e-5)

2. Steps vs modes

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.

References