Module contents
Lesson 32 of 33Research 120 min

Vision-language-action models

Study vision–language–action models using discrete, compressed or continuous actions, web–robot co-training, cross-embodiment data and efficient adaptation.

After this lesson you can

  • Describe VLA architectures and discrete, compressed and continuous action outputs.
  • Implement uniform and FAST-style action-chunk tokenization and compare length and error.
  • Explain web–robot co-training and its effect on semantic generalization.
  • Explain cross-embodiment training challenges and solutions.
  • Fine-tune and evaluate a small VLA in simulation under an 8 GB budget.

Before you start

From describing a scene to acting in it

“Push the T to the blue goal” requires identifying the goal, distinguishing it from others, and deciding a movement sequence. A model answering image questions well does not necessarily know how to control an actuator. A vision–language–action architecture couples visual and language understanding with controller-executable outputs trained on interaction data or demonstrations.

RT-1 studied transformer policies trained on demonstrations; RT-2 formulated actions as vision–language model outputs. OpenVLA publishes a 7B-parameter VLA and studies efficient adaptation. Prior learning can provide object and relationship concepts, but does not guarantee a policy understands new instructions in a control scene. Evaluation should contrast commands, positions, and objects to detect memorized associations.

Discrete actions and temporal compression

Binned action tokenization assigns one of 256 symbols to each dimension and step. One procedure estimates the 1% and 99% quantiles on training and divides that range into uniform-width bins; outside values are clipped. These are not 256 equally probable intervals: quantiles fix endpoints and bins have uniform width. Decoding uses each bin’s center. Within range, absolute error per dimension is at most half a bin width; outside, clipping can produce more error. Normalization and its statistics are part of the model contract and must be computed without test data.

A one-second chunk at 50 Hz and seven dimensions contains 350 symbols before special markers. At 30 tokens per second, sequential generation would take about 11.67 seconds if that sustained rate includes all generation; it does not meet one-second real-time control. Caching, parallel processing, or alternative chunks change actual time, which must be measured end to end. Nearby actions are often correlated: predicting every successive symbol can spend capacity on redundant small changes, though correlation does not make every task easy.

An action token need not share meaning across robots or dimensions. Index 128 for a joint represents an interval according to its own endpoints and units; the same index for a gripper can express another quantity. The decoder must know dimension, order, range, and convention. If output text omits or permutes an index, subsequent values can shift dimensions: check length and structure before converting to commands. A token outside the action vocabulary should trigger abstention or an explicit rule, not silently become motion.

Discretization has tradeoffs beyond length. If a component spans two units with 256 bins, width is 2/256=0.00781252/256=0.0078125 and interior rounding error is at most 0.00390625 in those units. A binary gripper, angular position, and velocity may need different scales; normalizing all to the same physical range wastes resolution or clips values. In a predicted trajectory, small correlated errors can accumulate when integrating velocities. If action represents absolute position, accumulation differs. The appropriate metric depends on interface convention.

FAST tokenization applies DCT to each temporal dimension of a chunk, quantizes coefficients, and compresses symbols with BPE. Smooth-trajectory energy often concentrates in few frequencies, though contacts and fast maneuvers may need high-frequency components. FAST presents the procedure and FAST+ trained on diverse trajectories. The example below uses an educational integer-BPE version; it does not implement all serialization details of the published tokenizer. Higher scale retains more precision but may reduce compression. Entropy per symbol and symbol count are not directly byte size, which also depends on vocabulary and encoding.

With an orthonormal DCT, total squared signal error equals total squared coefficient error before any additional clipping. If each coefficient is rounded to a grid of step 1/s1/s, absolute error is at most 1/(2s)1/(2s). This bound does not imply every temporal value has the same maximum error, because the inverse mixes coefficients. Subsequent BPE merges symbols losslessly if sender and receiver share rules; example error comes from quantization, not merging. Compare out-of-training samples, lengths, and error in physical units after reversing normalization.

InteractiveActions before and after compression
  • original action
  • reconstructed
00.51control step

Correlation uses consecutive uniform indices of the chosen dimension in 12 simulated chunks from two episodes held out; it is not computed over arbitrary BPE identifiers. Symbol length excludes bytes and dictionary transmission cost.

Trajectory
Method / DCT scale
Dimension
Tokens per chunk (mean)11.25
Normalized RMSE0.00697
Entropy per symbol5.675 bits
Consecutive uniform-bin correlation0.994
Compare a held-out simulated Push-T chunk, two dimensions at 10 Hz, with a synthetic seven-dimensional chunk at 50 Hz. DCT and BPE are an educational implementation; figures come from held-out chunks of each dataset.

The seven-dimensional option uses smooth synthetic trajectories and a gripper signal with one discrete change, not physical-arm data. Each chunk has 50 steps and uniform tokenization produces 350 indices. After training BPE on 64 chunks and testing on 16 different ones, DCT scale 30 produces a mean 77.31 symbols and RMSE 0.00587 in this example’s normalized units; uniform has RMSE 0.01440, with clipping outside quantiles. Consecutive-bin correlation for the seventh dimension is 0.960. These figures depend on distribution and dictionary and exclude dictionary storage cost.

Chunk size is another hyperparameter with opposing effects. A long chunk can concentrate temporal energy better and amortize special markers, but delays the next decision and makes correcting a wrong prediction more costly. A short one allows frequent re-observation at the cost of repeated context and limited temporal compression. When evaluating reconstruction, separate normalized-space error from physical error after reversing quantiles and explicitly inspect contact and gripper activation: aggregate RMSE can hide a small error in a decisive dimension.

Continuous expert

A flow-matching action expert receives visual and language context and learns a field transforming noise into a sequence of continuous actions. For linear path xt=(1−t)ϵ+tax_t=(1-t)\epsilon+t a, with noise ϵ\epsilon and target action aa, a network vθ(xt,t,c)v_\theta(x_t,t,c) is trained to approximate a−ϵa-\epsilon. At inference the field is integrated from noise, conditioned on cc. The SmolVLA implementation below reverses time convention: it writes xt=tϵ+(1−t)ax_t=t\epsilon+(1-t)a, learns ϵ−a\epsilon-a, and runs from t=1t=1 to t=0t=0. This is the same linear path traversed backward; preserve sign and limits when implementing integration. More integration steps may increase cost and change accuracy; no universal guarantee says an expert is always faster or more accurate than discrete actions. π0 and SmolVLA study this family with specific designs and data.

InteractiveA command's path
Image+ textVLM+ stateFlowActions

Cameras, instruction and state become inputs with positions and masks. Figure times assume serial execution: overlapping stages can change actual latency.

Stage
8
Selected stage1 / 4
Hypothetical stage time30 ms
Hypothetical serial total240 ms
Conceptual diagram of input, VLM, continuous expert and execution. Times are assumptions illustrating integration cost, not measurements or a description of every VLA.

The expert should not be confused with an autoregressive decoder emitting one token per step. Here the integrated object is the entire continuous chunk and each field evaluation operates on the sequence. Context can include visual features, language, and proprioceptive state; where they fuse and what cache is reused depend on the architecture. To reproduce an action, retain the seed or initial noise, integration-step count, normalization, and queue state as well as weights.

Asynchronous inference decouples generation and execution: while the robot consumes part of a chunk, the next is prepared. This can improve control rate but introduces observation age, queues, and overlap decisions. Measure camera, preprocessing, generation, and communication times and action age at execution. A chunk that is too long can continue acting after the scene changes.

Imagine a chunk covering 800 ms and the environment changing halfway through. If the system finishes all old steps before consuming a new prediction, it can act for 400 ms on stale information. Immediate interruption reduces age but requires a rule for already sent actions and control continuity. An overlapping buffer must also define which part to discard when a new chunk arrives. In every case report latency percentiles, not just the mean: one long delay can be decisive at contact.

Preserving language and mixing robots

Web–robot co-training mixes image–language tasks with action prediction to reduce forgetting of general abilities. Proportion, losses, and gradient scale influence results; there is no universally optimal mixture. Evaluate seen tasks, new objects and commands, and held-out visual questions before and after tuning. Language and control may compete for capacity; also retain a baseline without web data.

InteractiveA published co-training ablation
  • From scratch
  • Robot only
  • Web + robot
0%25%50%75%100%0%24%60%

The table omits 55B training from scratch and seen-task or VQA results in this ablation. Each rounded percentage describes the paper’s specific evaluation.

Size
Unseen change
Difficulty
From scratch0 %
Robot only24 %
Web + robot60 %
RT-2-PaLI-X success percentages on unseen objects, backgrounds, and environments, table 6 of the paper. Compare recipes and sizes; it does not interpolate mixture proportions or show local results or held-out VQA.

In RT-2 table 6, 55B joint tuning rises from 60% to 70% on easy novel objects and from 38% to 48% on hard novel backgrounds compared with robot-only tuning. At 5B, by contrast, easy backgrounds fall from 79% to 67% in this comparison. Rounded figures concern specific categories; the table does not directly measure VQA forgetting or infer any intermediate mixture’s effect. Authors evaluated each instruction one to five times depending on dataset; do not interpret each percentage as one homogeneous episode sample. An independent experiment should also record seen tasks and held-out visual questions under the same budget and seeds.

Another co-training study separately evaluated visual questions for the VLM extracted from each policy. Its table S4 reports GQA 31.68 for the pretrained VLM, 0.06 after robot-only training, and 57.69 with added vision–language data; RealWorldQA uses another scale and moves from 0.24 to 0.02 and 0.39 respectively. The final mixture also includes annotations and other-robot data: it is not an isolated change in web percentage. In the paper’s proportion ablation, too much vision–language data degraded in-distribution performance; authors chose a 9:1 robot-to-co-training sample ratio for their configuration, not a universal constant. The recipe comparison is published evidence, not our lab result or interpolation between mixtures.

InteractiveVisual questions after tuning
  • Pretrained VLM
  • Robot only
  • Robot + vision-language
  • Final mixture
025507510031.680.0657.6958.02

Original table scales: GQA 0–100 and RealWorldQA 0–1. Recipes add modalities, not just change a proportion; the final mixture also includes other-robot data and annotations.

Visual-question benchmark
Pretrained VLM31.68
Robot only0.06
Robot + vision-language57.69
Final mixture58.02
Original table S4 scores: switch between GQA and RealWorldQA. The initial VLM and those extracted from three policies are compared; scales differ and recipes do not isolate one variable.

A mixture can be written L=λLrobot+(1−λ)LwebL=\lambda L_{robot}+(1-\lambda)L_{web}, but λ\lambda alone does not specify each source’s contribution. Loss may be averaged per token, sequence, or episode, and gradients can have different scales. Declare sampling, normalization of each term, and total updates; changing both proportion and budget prevents attributing the difference solely to the mixture. To study forgetting, hold out web examples before tuning and measure using the same interface before and after.

Cross-embodiment training combines cameras, arms, and grippers with different units, frequencies, limits, and conventions. Open X-Embodiment studies multi-robot data and models. A common interface must declare coordinate frames, whether actions are positions or increments, gripper, channel order, frequency, and masks for absent dimensions. Resampling actions without respecting dynamics and timestamps can introduce false labels. A shared representation does not make two machines’ controls interchangeable.

A 10 Hz trajectory of position targets cannot become a 50 Hz one merely by repeating numbers and declaring them velocities. For positions, interpolation and speed limits define a path; for velocities, the value is integrated for the corresponding duration. If cameras have different orientations, “move left” must specify whether left refers to image, table, or robot base. A mask for nonexistent dimensions must also apply to loss: padding with zeros and penalizing them as real degrees of freedom changes the training objective.

The dataset must preserve provenance too. If a demonstration and a cropped variant of the same scene appear in training and test, the result may measure background or object memorization. Split by scene, object, or episode according to the question, retain identifiers, and evaluate instructions swapping present objects. In a language test, the same image with two commands requiring different actions is more informative than simultaneously changing image, object, and phrase: if the policy acts identically, it has ignored at least one relevant distinction.

Efficient fine-tuning can freeze VLM parts and train LoRA adapters and an action expert, using gradient accumulation and reduced precision when hardware and operations permit. Quantization saves memory but requires quality and latency evaluation. Compare with a specialized policy using the same demonstrations, held-out data, action duration, and episodes, and declare trainable parameters, peak memory, and time. Measure available GPU and effective precision; do not attribute results to another device.

A SmolVLA interface check before performance evaluation used 96×96 RGB images and Push-T XY state and actions in millimeters. The base checkpoint was loaded and new statistics calculated from training episodes; one CPU update produced finite loss 0.1757. The optimizer saved state for 99 880 992 trainable parameters out of 450 046 212, about 22.2%; this excludes activation memory and does not show it fits in 8 GiB. One inference then returned a finite chunk of 16 pairs and the first target was applied to the simulator. A paired L-piece scene and instruction naming it also yielded and applied a finite chunk; coverage did not change after that single action. This shows the data path runs for that example: one update and action do not estimate success, generalization, or GPU training memory. The original checkpoint used horizon 50; the pilot changed to 16 full steps and planned to execute eight, a modification that must be stated in comparisons.

Gradient accumulation simulates a larger batch if loss is correctly scaled and the optimizer updated after the declared microbatch count. It does not necessarily reproduce the same result with batch-statistics-dependent layers or different stochastic sampling. Also record activation and optimizer memory: freezing weights reduces gradients and optimizer states, but visual context still needs memory during the pass. Comparison with equal episode and seed counts and uncertainty intervals helps distinguish performance changes from chance variation.

Adapting to a new body requires checking the interface both ways. If a control represents absolute position in millimeters, denormalize every prediction before applying it and verify the point lies within workspace. If it represents an increment, check frame and active duration. A wrong conversion can produce finite numbers and small loss while commanding incoherent motion. A round-trip test with known examples should recover physical units, and normalization statistics must use training episodes only.

Masks also have two distinct axes. A dimension absent from a robot is not a zero physical action; a padded step at episode end is not an observed command. A loss averaging all dimensions and times including padding can favor near-zero predictions instead of learning available movements. For componentwise loss, select physical dimensions and valid steps, sum errors, and divide by valid-component count. Reject the batch if the denominator is zero. This loss mask alone does not ensure padding is excluded from attention: that depends on the model and must be tested separately.

When evaluating language understanding, prepare paired scenes with the same objects at the same positions and only the command changing. A policy always going to the blue goal can succeed in many episodes if blue dominates the set, without using language. Separately record requested goal, reached goal, and whether the piece actually met the geometric threshold. Also hold out paraphrases and object compositions without changing every factor simultaneously, so vocabulary failure is not automatically confused with perception or control failure.

Fine-tuning budget matters for reproducibility. Two methods may share 160 episodes but use very different numbers of updates or sampled examples, and a pretrained policy may have seen additional data unavailable to a model trained from scratch. Declare initial checkpoint, frozen parameters, step count, effective batch, and training and inference cost. Then evaluate both on the same held-out seeds with uncertainty intervals; prior-data advantages are part of the result and must not be hidden as architecture-only differences.

Lab: two encodings

The cell contains actions from training episodes 0–9 and test episodes 80 and 81 of the blue-goal task in Push-T MuJoCo. Each chunk’s 20 steps are contiguous and do not cross episodes; they are divided by 512 and rounded to four decimals. The sample is small and instruction fixed: it checks reconstruction, not language generalization. Ranges and BPE merges are learned only on training. The compressed base64 payload retains these data so the lab works without downloads.

[ ]Quantization and BPEBrowser
import base64,zlib
from collections import Counter
import numpy as np
from scipy.fft import dct,idct

# Chunks reales normalizados de Push-T, 10 episodios de train y dos de test.
blob='eJw92GlcVFUfB/A0mJm7nXPPcvd7ZwZERcNMFLceUTGXFBXFSjMKSiuoUFMxxX1JMkpTKbU0JYEMTQoStxQTS82NSkxJTFHpUXINk0R77p3nM/Pi+3Lmfuae8/svs8GX5b3g7WpFehuNl6wyfaM5WbtoxKqtjZvyy3qJVKhNpPVqR9JWvYZeVbaIm+TX4X+lR0B76Qr/Gt3EFZN0tgFHM0k419MKRXj+huXuw2Coe51Q53IUCYXur4R0z06hA7NfuMEcFUrZaiGLC5oA9rKOqWA+lw368/OBRwgqBHH8MGE1d4drZj9lU9mBTCVz3R3NJLsrmVrXSTbdVc/dDr/Lzw5nQaZrIXje/SCgwf0WmOG5JXiY10Ouu1kQ7vYJuiuOr3K9yC12L2V7eXYzjl89ndkpzCYWsj4uKJpJZTGbxTSzuR6FT2E6CR3ZIaAFNx7+zM0VC/g1aJrgmIS6gidRI/CjMhhUihLgdkzE3aROrKCl6CcyC1/EA4mjD2bIJ+hHHJSEc8gQNJoOFNtJCbBJetva4T3l7eaN9pdZ0yNircORJebLraj5aqu+RnqrCbqjPNKvh0VWaSMj5muf+jtrDb46tadvZcgYv0sb48+39dZ7+0r01l6/wVkfBCw2Wxotzcn6LKNOa9JHaVP0A+p1LS5ks342oKU+W31G86ub1X1KS/VF5RnlYWWzvFEOWqG0VBxn5d1yGzlLnig9Ju+gV6WHaYGUSF4IiaJN0vckVkknGSpH8rUtuEZPwtQsRSXmBfEdE4kvBrwrHjLCUSdjDlqlN6GH9Mn4Fe1PfFwN+gpv1hwX8XVVIZ3VwSRLmUV2ylvJfek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XCZPwLz6GB6n3UK79VJETQWVmE+I2eZEODDgJ7jOiBMb9Y/ERL1J/Ex7Dt1T96CRIe+ibprja/SWehptV1rgJjka95SH4xlSFt5Fg5znVRMoVdAK2otOJjtJG9yNnBbLcC7shOPBFnSTd1wRL/HR4ml+PDzK54N9/DnhG94UNoWw9u7+F0gWauGb4JC4DJaireI6fNTujg3YmSan4jdoGhohOdqhYnpTDAspRRX0kJgS+H/F+R/tSVBPhwsniWOt0J1cFdZgx/8A+u0L3Q=='
x=np.frombuffer(zlib.decompress(base64.b64decode(blob)),dtype='<i2').reshape(-1,20,2)/10000
train=x[:55];test=x[55:]
print('chunks train/test:',len(train),len(test))

# 256 intervalos de ancho uniforme entre cuantiles 1 y 99 del entrenamiento.
lo=np.quantile(train,.01,axis=(0,1));hi=np.quantile(train,.99,axis=(0,1))
def uniform_encode(a):
    return np.clip(np.floor((a-lo)/(hi-lo)*256),0,255).astype(int)
def uniform_decode(q): return lo+(q+.5)*(hi-lo)/256

def frequency_encode(a,scale):return np.rint(dct(a,axis=0,norm='ortho')*scale).astype(int)
def frequency_decode(q,scale):return idct(q/scale,axis=0,norm='ortho')

# BPE didáctico sobre enteros DCT; las fusiones no cruzan límites de chunk.
def merge_one(seq,pair,new):
    out=[];i=0
    while i<len(seq):
        if i+1<len(seq) and (seq[i],seq[i+1])==pair:out.append(new);i+=2
        else:out.append(seq[i]);i+=1
    return out
def fit_bpe(sequences,merges=100):
    seq=[list(s) for s in sequences];rules=[]
    for i in range(merges):
        counts=Counter(pair for s in seq for pair in zip(s,s[1:]))
        if not counts:break
        pair,count=counts.most_common(1)[0]
        if count<2:break
        new=100000+i;rules.append((pair,new));seq=[merge_one(s,pair,new) for s in seq]
    return rules
def apply_bpe(seq,rules):
    for pair,new in rules:seq=merge_one(seq,pair,new)
    return seq
def undo_bpe(seq,rules):
    for pair,new in reversed(rules):
        seq=[v for symbol in seq for v in (pair if symbol==new else (symbol,))]
    return seq
def entropy(tokens):
    counts=np.array(list(Counter(tokens).values()),float);p=counts/counts.sum()
    return float(-(p*np.log2(p)).sum())
for scale in (10,30,100):
    qtrain=[frequency_encode(a,scale).ravel().tolist() for a in train]
    rules=fit_bpe(qtrain);packed=[apply_bpe(frequency_encode(a,scale).ravel().tolist(),rules) for a in test]
    reconstructed=[]
    for tokens in packed:
        decoded=np.array(undo_bpe(tokens,rules)).reshape(20,2)
        reconstructed.append(frequency_decode(decoded,scale))
    err=np.sqrt(np.mean((np.array(reconstructed)-test)**2))
    print('escala',scale,'tokens/chunk',round(np.mean([len(t) for t in packed]),2),'RMSE',round(float(err),5),'entropía/token',round(entropy(sum(packed,[])),3),'fusiones',len(rules))
u=uniform_encode(test);print('uniforme tokens/chunk',u.shape[1]*u.shape[2],'RMSE',round(float(np.sqrt(np.mean((uniform_decode(u)-test)**2))),5),'entropía/token',round(entropy(u.ravel().tolist()),3))
print('correlación de bins consecutivos por dimensión:',[round(float(np.corrcoef(u[:,:-1,i].ravel(),u[:,1:,i].ravel())[0,1]),3) for i in range(u.shape[2])])

To contrast the scale of a seven-dimensional arm, this second cell generates a one-second synthetic signal at 50 Hz. Six components vary smoothly and the seventh changes state once. The distribution is educational and results do not represent physical-robot contact or noise.

[ ]Synthetic seven-dimensional chunkBrowser
rng7=np.random.default_rng(320);t7=np.arange(50)/50
def chunk7():
    phase=rng7.uniform(0,2*np.pi,6);freq=rng7.uniform(.3,1.2,6)
    offset=rng7.uniform(-.4,.4,6);amp=rng7.uniform(.1,.4,6)
    six=offset+amp*np.sin(2*np.pi*t7[:,None]*freq+phase)
    gripper=(t7>=rng7.uniform(.3,.7)).astype(float)*.8-.4
    return np.column_stack((six,gripper))
all7=np.stack([chunk7() for _ in range(80)]);train7=all7[:64];test7=all7[64:]
lo7=np.quantile(train7,.01,axis=(0,1));hi7=np.quantile(train7,.99,axis=(0,1))
def uniform7(a):return np.clip(np.floor((a-lo7)/(hi7-lo7)*256),0,255).astype(int)
def deuniform7(q):return lo7+(q+.5)*(hi7-lo7)/256
def encode7(a,scale):return np.rint(dct(a,axis=0,norm='ortho')*scale).astype(int)
def decode7(q,scale):return idct(q/scale,axis=0,norm='ortho')
for scale in (10,30,100):
    rules=fit_bpe([encode7(a,scale).ravel().tolist() for a in train7])
    packed=[apply_bpe(encode7(a,scale).ravel().tolist(),rules) for a in test7]
    recon=np.stack([decode7(np.asarray(undo_bpe(s,rules)).reshape(50,7),scale) for s in packed])
    print('7D escala',scale,'símbolos/chunk',round(float(np.mean([len(s) for s in packed])),2),'RMSE',round(float(np.sqrt(np.mean((recon-test7)**2))),5),'entropía/token',round(entropy(sum(packed,[])),3))
u7=uniform7(test7)
print('7D uniforme símbolos/chunk',350,'RMSE',round(float(np.sqrt(np.mean((deuniform7(u7)-test7)**2))),5),'entropía/token',round(entropy(u7.ravel().tolist()),3))
print('7D correlación por dimensión:',[round(float(np.corrcoef(u7[:,:-1,i].ravel(),u7[:,1:,i].ravel())[0,1]),3) for i in range(7)])

The DCT is orthonormal and BPE reversible in this example; error comes from rounding coefficients. Uniform encoding also has clipping error for values outside learned quantiles. Compare both accuracy and length and test abrupt-motion data: a smooth signal does not represent every task.

Local lab: adapting a small VLA

To run fine-tuning, download into one directory LoRA training, LoRA layers, LoRA resumption, shared loader, evaluation, adapter, physical-dimension loss, new object, paired seeds, seed verification, simulator, window reader, resumption, language tasks, demonstration generator, collector and shift conditions. In the repository the public/data folders are used directly. An isolated environment needs NumPy, pandas, MuJoCo, PyArrow, Pillow, PyTorch, Transformers, Safetensors, huggingface_hub, num2words, datasets 3.6.0 and LeRobot 0.3.3; the pilot used Torch 2.11.0+cu128, Transformers 5.23.0 and Safetensors 0.8.0.

First generate 100 demonstrations per goal with collect_language.py --goal azul --out oryon-language-blue --count 100 --seed 50000 and the equivalent command for naranja, prefixing python and keeping downloaded modules together. Each set holds out the last 20 episodes. The model uses an RGB camera and absolute XY state and actions in millimeters, with normalizers calculated exclusively from 80 training episodes per goal. Loss ignores the 30 padded dimensions of the internal 32-dimensional projection and only full 16-step windows train; the original checkpoint used 50. The model still generates noise in all 32 components and projects them together: excluding 30 loss terms does not remove their indirect network influence or equal rebuilding the architecture with only two inputs. Execute eight actions per prediction and observe again.

The next block pins revisions and verifies weights before 2000 updates with microbatch 1 and accumulation 4: 8000 sampled windows total. This LoRA tuning is shared with practice 13; each lesson retains its own evaluation. Download only configuration and tokenizer of the auxiliary VLM: the SmolVLA checkpoint already contains its weights. SmolVLA and SmolVLM2 cards declare Apache 2.0. Tuning freezes the base and trains rank-8 LoRA adapters on expert query and value projections plus state and action heads; activation recomputation is used. Set ORYON_L32_CODE_DIR if modules are elsewhere; data and weight paths can also be changed using the indicated variables. ORYON_L32_DEVICE=cpu checks the interface, but the memory experiment requires a bf16-compatible GPU.

[ ]Fine-tuning multitask SmolVLALocal GPU
import hashlib, os, subprocess, sys
from pathlib import Path
from huggingface_hub import snapshot_download
base=Path(os.environ.get('ORYON_SMOLVLA_BASE','oryon-smolvla-base'))
backbone=Path(os.environ.get('ORYON_SMOLVLM_CONFIG','oryon-smolvlm-config'))
code=Path(os.environ.get('ORYON_L32_CODE_DIR','public/data/m24/l32'))
lora_code=Path(os.environ.get('ORYON_LORA_CODE_DIR','public/data/p13/l09'))
if not (lora_code/'train_smolvla_lora.py').exists():lora_code=Path('.')
env=os.environ.copy();extra=[str(code.resolve()),str(lora_code.resolve()),str(Path('public/data/p13/l06').resolve()),str(Path('public/data/p13/l02').resolve()),str(Path('public/data/p13/l08').resolve())]
env['PYTHONPATH']=os.pathsep.join(extra+[env.get('PYTHONPATH','')])
if not (base/'model.safetensors').exists() or not (base/'config.json').exists():
    snapshot_download('lerobot/smolvla_base',revision='5e8d12a6e2975b0e5e5fce7c8caf47c371d257b6',local_dir=base,allow_patterns=['config.json','model.safetensors'])
if any(not (backbone/name).exists() for name in ('config.json','tokenizer.json','tokenizer_config.json','processor_config.json','preprocessor_config.json')):
    snapshot_download('HuggingFaceTB/SmolVLM2-500M-Video-Instruct',revision='4cde9d208e19519c36917aa170fffc7e381aa0ad',local_dir=backbone,allow_patterns=['config.json','*token*','*processor*','special_tokens_map.json','added_tokens.json','chat_template.json'])
with (base/'model.safetensors').open('rb') as f:
    assert hashlib.file_digest(f,'sha256').hexdigest()=='7cd549ac2351fb069c0ddb3c34ad2d09cfc92b56a15dccdfc2e41467aaca01eb'
blue=os.environ.get('ORYON_BLUE_DATA','oryon-language-blue');orange=os.environ.get('ORYON_ORANGE_DATA','oryon-language-orange')
out=os.environ.get('ORYON_L32_CHECKPOINT','oryon-smolvla-lora.pt');device=os.environ.get('ORYON_L32_DEVICE','cuda')
cmd=[sys.executable,str(lora_code/'train_smolvla_lora.py'),'--blue',blue,'--orange',orange,
 '--base',str(base),'--backbone',str(backbone),'--out',out,'--device',device,
 '--steps','2000','--batch','1','--accumulate','4','--rank','8','--alpha','16',
 '--save-every','250','--seed','0']
if Path(str(out)+'.resume.pt').exists():cmd.append('--resume')
subprocess.run(cmd,check=True,env=env)
This cell needs the local lab (PyTorch with your GPU). Start it with npm run lab and open the connection link.

Evaluation runs in separate processes because each condition changes simulator geometry. The new-l condition changes both shape from T to L and textual description: it measures that joint shift, not an isolated object ablation. To pair initial positions between T and L, 90 of 100 seeds from 70000 to 70099 produced identical resets for both shapes. The first 50 of those 90 were selected using geometry alone before running policies; the sample is conditioned on those compatible resets. To check selection, run verify_paired_starts.py with --condition id and --condition new-l in separate processes; then use --condition compare --id-starts and --l-starts with generated files. Prefixing python and --output in each call yields the published list. CUDA evaluation uses bf16 autocast; the next lesson’s hierarchical evaluation uses model precision without that autocast, so inference arithmetic also changes. Results save proposed and applied action and number of workspace-clipped components per episode. Compare diffusion under the same protocol and declare observation, data, horizon, and budget differences.

[ ]Evaluating instructions and a new objectLocal GPU
import os, subprocess, sys
from pathlib import Path
code=Path(os.environ.get('ORYON_L32_CODE_DIR','public/data/m24/l32'))
if not (code/'eval_smolvla_candidate.py').exists():code=Path('.')
base=os.environ.get('ORYON_SMOLVLA_BASE','oryon-smolvla-base');backbone=os.environ.get('ORYON_SMOLVLM_CONFIG','oryon-smolvlm-config')
checkpoint=os.environ.get('ORYON_L32_CHECKPOINT','oryon-smolvla-lora.pt');device=os.environ.get('ORYON_L32_DEVICE','cuda')
blue=os.environ.get('ORYON_BLUE_DATA','oryon-language-blue');orange=os.environ.get('ORYON_ORANGE_DATA','oryon-language-orange')
lora_code=Path(os.environ.get('ORYON_LORA_CODE_DIR','public/data/p13/l09'))
if not (lora_code/'train_smolvla_lora.py').exists():lora_code=Path('.')
env=os.environ.copy();extra=[str(code.resolve()),str(lora_code.resolve()),str(Path('public/data/p13/l06').resolve()),str(Path('public/data/p13/l02').resolve()),str(Path('public/data/p13/l08').resolve())]
env['PYTHONPATH']=os.pathsep.join(extra+[env.get('PYTHONPATH','')])
for condition in ('id','new-l'):
    for goal in ('azul','naranja'):
        output=f'oryon-smolvla-{condition}-{goal}.json'
        subprocess.run([sys.executable,str(code/'eval_smolvla_candidate.py'),'--base',base,'--backbone',backbone,
         '--checkpoint',checkpoint,'--policy-type','lora','--blue',blue,'--orange',orange,
         '--output',output,'--device',device,'--condition',condition,'--goal',goal,
         '--episodes','50','--seeds',str(code/'paired-seeds.json'),'--resume'],check=True,env=env)
This cell needs the local lab (PyTorch with your GPU). Start it with npm run lab and open the connection link.

To reproduce the baseline, add text diffusion experiment, text model, diffusion model, paired evaluation and per-scene comparison to the files above. The network receives 96 × 96 RGB, XY state, and a frozen MiniLM representation at revision 1110a243fdf4706b3f48f1d95db1a4f5529b4d41. It trains on the same 160 demonstrations but 10000 batch-64 updates; optimization budget and parameterization differ. It predicts 16 actions, executes eight, and uses ten DDIM steps. For final training windows diffusion repeats the last available action; LoRA uses only full windows. Diffusion clips normalized output to [-1, 1] before converting to the training-observed range, while the VLA clips coordinates to workspace. The following evaluation uses CPU and float32, while SmolVLA was measured on CUDA with bf16; do not compare latencies as if they shared a device.

[ ]Comparison with text diffusionLocal GPU
import os, subprocess, sys
from pathlib import Path
code=Path(os.environ.get('ORYON_L32_CODE_DIR','public/data/m24/l32'))
text_code=Path(os.environ.get('ORYON_LORA_CODE_DIR','public/data/p13/l09'))
if not (code/'paired-seeds.json').exists():code=Path('.')
if not (text_code/'text_diffusion_experiment.py').exists():text_code=Path('.')
model=text_code/'text_diffusion_experiment.py';runner=text_code/'evaluate_text_l32_reference.py'
blue=os.environ.get('ORYON_BLUE_DATA','oryon-language-blue');orange=os.environ.get('ORYON_ORANGE_DATA','oryon-language-orange')
out=os.environ.get('ORYON_TEXT_CHECKPOINT','oryon-text-diffusion.pt')
env=os.environ.copy();env['OMP_NUM_THREADS']='1';env['MKL_NUM_THREADS']='1'
extra=[code,text_code,Path('public/data/p13/l07'),Path('public/data/p13/l06'),Path('public/data/p13/l02'),Path('public/data/p13/l08')]
env['PYTHONPATH']=os.pathsep.join([str(p.resolve()) for p in extra]+[env.get('PYTHONPATH','')])
cmd=[sys.executable,str(model),'train','--blue',blue,'--orange',orange,'--out',out,'--device','cpu',
 '--steps','10000','--batch','64','--seed','0','--save-every','250']
if Path(str(out)+'.resume.pt').exists():cmd.append('--resume')
subprocess.run(cmd,check=True,env=env)
subprocess.run([sys.executable,str(runner),'--script',str(model),'--checkpoint',out,
 '--seeds-json',str(code/'paired-seeds.json'),'--out','oryon-text-results','--device','cpu'],check=True,env=env)
lora_checkpoint=os.environ.get('ORYON_L32_CHECKPOINT','oryon-smolvla-lora.pt')
subprocess.run([sys.executable,str(code/'compare_policies.py'),'--lora-checkpoint',lora_checkpoint,
 '--text-checkpoint',out,'--seeds',str(code/'paired-seeds.json')],check=True,env=env)
This cell needs the local lab (PyTorch with your GPU). Start it with npm run lab and open the connection link.
InteractiveFine-tuning on two pieces
  • Simulation success
0%25%50%75%100%0/50T0/50L

Full 16-action windows; eight execute before observing again. Seeds were selected for compatible resets, not outcome.

T: Wilson 95 % [0.0, 7.1] % · clipped components 6/30000
L: Wilson 95 % [0.0, 7.1] % · clipped components 86/30000
Requested goal
T piece0/50
L piece0/50
In-house SmolVLA with LoRA results on 200 MuJoCo episodes: change goal and compare 50 paired T and L scenes. The L condition changes both shape and phrase.

Shared fine-tuning completed 2000 updates with 160 training demonstrations, LoRA, and recomputation; peak reserved training memory was 1.32 GiB on the RTX 3060. On test, all four piece–goal combinations had 0 successes in 50: each 95% Wilson interval is approximately [0 %, 7.1 %]. Every episode exhausted the 300 allowed actions. There were 6, 32, 86 and 111 action components clipped out of 30000 per condition respectively. This is a negative result for this seed and protocol; it does not show all VLAs fail or T and L are equivalent. The 50 scenes were selected for geometric compatibility before evaluation.

The text-diffusion baseline completed 10000 updates and the same battery of 50 scenes per condition. Both methods ended with no successes in all four conditions; final coverage adds description without replacing the 95% success threshold. The table uses means across 50 scenes, expressed as goal-coverage percentages:

Piece and goalVLA coverageDiffusion coverage
T, blue2.11 %3.49 %
T, orange0.48 %4.52 %
L, blue0.26 %2.65 %
L, orange5.69 %3.81 %

In each condition the 95% Wilson interval for each method’s success rate is approximately [0 %, 7.1 %], assuming independent scenes. There were no pairs where only one method succeeded; this does not demonstrate equivalence. Each policy was fine-tuned once and coverage is a descriptive mean. Architecture, update budget, window padding, and action clipping differ; the comparison does not attribute the result to one difference. The L condition changes both piece and phrase, and devices and inference precision also differ. See the summary with hashes and paired results to reproduce the comparison.

Exercises

Numeric
How many action tokens per chunk are generated with 7 dimensions and 50 steps, using one symbol per dimension and step?
Quiz
What problem arises using one symbol per dimension and step in high-frequency control?
Quiz
Which comparison of discrete actions and a continuous expert is defensible?
Quiz
How can understanding be distinguished from a memorized visual association?
Code
Implement fast_encode(chunk,scale) and fast_decode(tokens,scale) without BPE. The chunk is (time, dimensions). Apply orthonormal DCT over time per dimension, multiply by scale and round to integers; invert with orthonormal IDCT.
def fast_encode(chunk,scale):
  pass
def fast_decode(tokens,scale):
  pass
Shift+Enter to run
Key idea
A VLA links observations and language to actions, but compression, latency, forgetting, and generalization must be checked on held-out episodes and commands.