Training the ABC-DiT policy with the Rerun dataloader

Compare ABC-DiT training speed and policy quality when streaming from Cloudflare R2 or reading from a local cache.

We used the Rerun dataloader to fine-tune the ABC-DiT XL robot policy on demonstrations of pouring beads into a container. The dataloader streamed camera images, robot states, and actions from Cloudflare R2 through Rerun DB, so each training machine could start without downloading the full dataset. We compared streaming with ABC’s local cache loader by measuring how fast the model trained and how often the trained policies completed the pour in ABC-Sim.

On the same two H100 GPUs, streaming reached 98.3% of the local-cache training rate. The GPUs ran on Modal in AWS US-East, with the recordings in Western North America.

The overhead and two wrist cameras show the pour. Below them, the plots track the left arm’s measured and commanded joint positions. Explore the synchronized camera views and joint signals in Rerun. ABC-130k pouring demonstrations · Apache 2.0 license.

From a recording to a training sample

ABC-DiT uses camera images, robot state, and a task instruction to predict the robot’s next movements. For the baseline, the ABC training pipeline read these demonstrations from episode files on local disk. For the streaming runs, we registered the episode recordings in Rerun DB and used the Rerun dataloader to supply the same inputs to the trainer.

At frame 27, for example, a sample pairs the three camera views and current robot state with the 30 demonstrated actions at frames 27 through 56. We added an optional training layer with the cameras and robot signals aligned to a common frame index. That let TimeAlignedSampling read the fields at the requested frames and start video decoding at the preceding keyframe.

Frame 27 supplies the observation, frames 27 through 56 supply the actions, and video decoding starts at frame 20

Prepare the training layer

For each extracted ABC-Sim episode, the converter writes a training RRD with the same recording ID as its base layer. It splits the stacked video into three H.264 streams with a keyframe every ten frames, and writes the state and action signals in blocks of 1,000 frames. It places camera chunks for the same ten frames next to each other so the loader can fetch the three views together. See the converter in prepare_training_layer.py

To get the pouring episodes, run uv run prepare.py --sim-data pour in the ABC checkout. From this example directory, set EPISODE_DIR to a pouring episode under ABC’s cache/train_sim/ and run the converter with NumPy, PyAV with libx264, and the Rerun Python SDK installed.

python prepare_training_layer.py "$EPISODE_DIR" "training_rrds/$(basename "$EPISODE_DIR").rrd"

Repeat for any other training episodes, then run rerun server -d abc_sim=training_rrds to serve them locally for the fine-tuning example below.

Read a training sample

Each camera field reads one frame and each action field requests 30 consecutive values. The snippet shows the top camera and left-arm action fields from rerun_loader.py.

from rerun.experimental import dataloader as rdl

root = "/training_gop10_v1"
image = rdl.Field(
    f"{root}/top-camera:VideoStream:sample",
    decode=rdl.VideoFrameDecoder(codec="h264", output_format="yuv420p"),
)
action = rdl.Field(
    f"{root}/left/arm/action/q:Scalars:scalars",
    decode=rdl.NumericDecoder(),
    window=tuple(range(30)),
)

The full Rerun loader shuffles samples from the selected recordings and batches all three cameras, both arms, and both grippers. The reference code prepares images on the CPU in one process. The measured runs used multiple workers per GPU, a policy collator backed by PooledBatchCollator(packed=True), and GPU image preprocessing.

Fine-tuning ABC-DiT XL on pouring demonstrations

The three streaming runs started from ABC’s public multitask checkpoint, pretrained for 200,000 steps. In the ABC checkout, uv run prepare.py --pretrained downloads the starting weights and their normalization statistics. ABC checkpoint instructions

The finetune_from_rerun function loads ABC’s pretrained weights from its local cache/ directory and fine-tunes the policy on batches streamed from the selected recordings. See the training loop in train.py Run the following from the example directory with the ABC checkout on your Python path. Here abc_sim is a dataset of aligned pouring training episodes registered on your local Rerun server. For a dataset containing multiple splits, pass your training episode IDs as segments when constructing DataSource. The same code can connect to a Rerun DB dataset you have access to by changing the catalog URL.

from pathlib import Path

import torch
from rerun.catalog import CatalogClient
from rerun.experimental.dataloader import DataSource
from train import finetune_from_rerun

client = CatalogClient("rerun+http://127.0.0.1:51234")
source = DataSource(client.get_dataset("abc_sim"))
policy = finetune_from_rerun(
    Path("/path/to/abc/cache/abc_dit_xl_200k_model.pt"),
    source,
    device=torch.device("cuda"),
)

The function constructs ABC’s DiTPolicy(DiTConfig()), loads the XL weights, and feeds it batches from RerunIterableDataset. The adapter normalizes robot states and demonstrated actions with the checkpoint’s statistics. During training, ABC-DiT sees a noisy action sequence alongside the three camera views, robot state, and CLIP-encoded instruction. It learns to predict the difference between the sampled noise and the demonstrated actions. During a rollout, it follows this learned flow in reverse to turn fresh noise into the robot’s next 30 actions. ABC-DiT policy implementation

Each streamed batch drives one AdamW update in the ABC-DiT training loop.

for batch in batches:
    loss = policy(batch, max_action_prefix=8, prefix_conditioning_prob=1.0, prefix_noise_scale=0.0)
    loss.backward()
    torch.nn.utils.clip_grad_norm_(policy.parameters(), max_norm=10.0)
    optimizer.step()
    optimizer.zero_grad(set_to_none=True)
    scheduler.step()

To run a dataloader example with public data and the local Rerun server included in our open-source SDK, see the LeRobot ACT example.

How streaming compared with the local cache

We fine-tuned three policies with Rerun and one with the ABC cache loader, using the original split of 1,778 training episodes and 87 validation episodes. Each run used the ABC-DiT XL training recipe for 25,000 updates with a global batch of 180.

Both GPUs averaged about 95% utilization while streaming

For the throughput comparison, we ran the cache loader first and the streaming loader second on the same machine. We timed steps 101–800, including model computation, preprocessing, device transfers, and batch waits.

During trainingRerun streamingABC local cache
Iterations/s2.5662.612
Global samples/s461.9470.1
Mean batch wait0.346 ms0.355 ms
Longest batch wait5.893 ms0.685 ms
GPU 0 utilization95.4%97.3%
GPU 1 utilization95.0%98.1%

Batch wait is the longer host-side wait across the two GPUs’ training processes at each step. GPU work can continue during that wait.

Training throughput in 20-step intervals for both loaders

Each point covers 20 training steps after warm-up. The vertical axis starts at 2.0 iterations/s.

During training, the rate also depends on how quickly the GPUs consume each batch. In a separate ten-minute loader-only test on Modal in AWS US-West, CPU consumers drew 655.2 samples/s with GPU work and device transfers excluded.

Training loss followed the local-cache curve

Over the final 2,000 steps, mean logged loss was 0.02138 across the three Rerun runs and 0.02184 for the cache run. The loaders sampled frames in different orders, and we could not independently verify the cache run’s exact starting checkpoint.

Training loss on a logarithmic scale for the cache baseline and all three Rerun seeds through 25,000 steps

The heavy lines show a 500-step trailing average on a logarithmic loss axis.

Held-out action error was similar across loaders

Every 5,000 steps we checked how closely each policy’s predicted actions matched the held-out demonstrations. At the final checkpoint, normalized reconstruction error (MSE) ranged from 0.0479 to 0.0537 for Rerun, compared with 0.0544 for the cache policy. Both evaluations used the same documented frame-selection rule, though the exact validation frames for the cache run were unavailable.

Held-out action reconstruction error at each 5,000-step checkpoint

Held-out flow-matching loss

At the final checkpoint the three Rerun runs ranged from 0.0737 to 0.0756, compared with 0.0753 for the cache run.

Held-out flow-matching loss for the four policies over training

All four policies learned to pour, with success varying by seed

We gave each policy 200 attempts to pour the beads in simulation. After each chunk of actions, the policy saw where the robot and beads had moved and predicted its next commands.

Trained policySuccessful poursSuccess rate
Rerun, seed 123158 / 20079%
Rerun, seed 124121 / 20060.5%
Rerun, seed 125157 / 20078.5%
ABC local cache148 / 20074%

The Rerun policies averaged 72.7% success, close to the cache policy’s 74%. The spread across the three Rerun runs was much larger than the gap between those averages. One cache-trained policy gives us no estimate of how much its success rate varies across training seeds. Each policy’s 200 attempts covered 101 distinct requested simulator seeds, and we evaluated Rerun seed 123 on an earlier runtime.

The two recordings show successful pours from separate evaluation sessions, played back in simulated time.

Rerun-trained policy, seed 123

ABC local-cache policy

What the results show

Streaming the demonstrations from another region cost less than 2% of training throughput, and both GPUs stayed about 95% busy. Training loss and held-out action error were similar for both loaders, and all four policies learned to pour. Success rates varied more between Rerun seeds (60.5–79%) than between the loaders’ averages, so a sharper comparison of policy quality would need several cache-trained seeds. For this task, every training machine can read from one shared copy of the dataset in Rerun DB without giving up speed or policy quality.