Set up and download the base
Complete installation. Run commands from the repository root. Full fine-tuning stores model weights, gradients, optimizer state, and EMA profiles. The inference memory estimate does not describe training requirements. The launch below uses eight GPUs; the short validation run measures your actual memory use before you commit to a full job. Download the action-pretrained base and shared encoders:Define the data contract
Fix action order, units, camera layout, and control rate before recording. The adapter below uses 15 Hz recordings. SO-101 uses a separate 30 Hz recipe; 32 actions cover different durations at those rates.
For another robot or environment, define its measured state and action
representation explicitly. Matching vector lengths does not make another
checkpoint’s controls or normalization interchangeable.
Record normal starts, varied starts, disturbances, and recovery behavior.
Keep evaluation episodes and seeds separate from training. The published game
experiments used 800 episodes of 16 seconds per game; the drone experiment
used 800 episodes of 20 seconds. These are different datasets.
Episode files
The game simulator, bot, and recorder are maintained outsideflux-action.
Supply recordings in this format; the model repository includes the dataset
adapter but not those environments or the drone recordings.
index.json for two 16-second GRUNT episodes at 15 Hz:
T must match length, which is shared by episodes in an index. Use separate
roots for recordings of different lengths. At least 33 frames are needed per
episode. For VECTOR, set action_dim to 3; the adapter pads to 4 and masks the
last channel. For rotor, add "task" to every episode entry and use 4 actions.
The adapter adds the fly the drone: prefix itself.
Training windows
Each window starts at frames and stays within one episode:
- Image
sand state atscondition the prediction. - Actions
sthroughs+31are the 32 target commands. - Images
s+1throughs+32are the 32 future image targets.
s is action s-1, or zero when s=0.
Check this alignment before training. A shifted action label teaches the model
to respond at the wrong time even if the loss decreases.
For another data format, implement a dataset module using the
game adapter as a reference.
It defines the window fields, distributed sampling, and resume behavior.
Configure training
Createconfigs/games/local.json from the pinned
game config, changing only local paths:
index_dir: "unused" is intentional. TrainConfig requires the field, but
examples.games.dataset:build reads each root’s index.json and ignores it.
The default indexed DROID/LeRobot loader requires a real index directory.
Schedule and batch size
The game config runs for 3,000 optimizer updates. The trunk stays frozen through update 200, warms up over the next 600, and reaches its full learning rate at update 800. Cooldown starts at 2,600. See the scheduler implementation when adapting this schedule to another run length.grad_accumulation=4. Keep enough episodes
for every rank and worker to supply a batch; the adapter raises an error when
an epoch cannot supply a complete update.
Inspect data before training
After setting up your recordings and local config, run this from the repo root:Train
First run four optimizer updates on your intended hardware. Use a separate output directory and checkpoint so this test cannot resume into the real run:metrics.jsonl records action/video MSE, learning rates, gradient
norm, update time, and peak_mem_gb. Then launch the full run:
Reported training costs
These are distinct reported configurations, not interchangeable estimates for the command above. The original experiment checkpoints and complete logs are not included in this guide.
The eight-GPU command above uses a different configuration; measure its runtime
and memory on your hardware.
Resume and select a checkpoint
Withresume: "auto", rerun the training command to resume its last complete
checkpoint. Keep the weights, encoders, data, and config available. See the
trainer
for exact-position resume and distributed loader settings.
Select a checkpoint using task performance on held-out seeds as well as offline
error. The adapter does not supply an environment runner or evaluation split.
Export and run
Export one checkpoint to a new directory:model, ema_0p10, and ema_0p05. Compare them under the same
evaluation protocol. BF16 export converts the FP32 training weights; it does
not include the optimizer, and the VAE/text encoder remain external references.
Keep those encoder paths available after moving an export.
For the game config above, load one raw uint8 RGB frame and the last executed
four-channel action:
Several environments in one checkpoint
The game adapter pads VECTOR’s three actions and previous-action state to four channels. Itsaction_mask is [1, 1, 1, 0], while GRUNT uses [1, 1, 1, 1].
The loss ignores padding; playback sends only the real channels to each game.
The task caption identifies the environment. This example trains one shared
four-channel head; another action representation needs its own data contract.
