Run this model with HF Jobs
Run AlexWortega/tinyvla on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/AlexWortega/tinyvla. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/AlexWortega/tinyvla on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use AlexWortega/tinyvla with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LeRobot
How to use AlexWortega/tinyvla with LeRobot:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Upload CLAUDE.md with huggingface_hub
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153# TinyVLA β project context
Small vision-language-action models. Two lines of work:
- **v1 (shipped)** β dual-rate VLA for LIBERO: slow Qwen3.5 semantic path (cacheable, 0.5β2 Hz) + fast flow-matching expert (10β20 Hz). **86% LIBERO-spatial, 84% 4-suite average** β beats OpenVLA-7B on every suite at 0.64B params / 140M online.- **v2 (research)** β cross-embodiment: canonical action space + morphology conditioning across 10 robots. Best: `tv2_C_scaled` (ratio-to-baseline **0.81** in-training / **0.88** held-out; was 0.99/1.17 before scaling).
Everything (checkpoints, results, wiring) lives in the **private** HF repo`AlexWortega/tinyvla` (v1 at the root, v2 under `tinyvla2/`).
## Environment
```bashsource ~/tinyvla_venv/bin/activate # NOT physics_venv```
Pinned, non-obvious, and hard-won:- lerobot **0.6.1**, torch **2.10.0+cu128**, transformers **5.5.4** (lerobot's `transformers-dep` extra; older breaks `eo1`).- **torchcodec 0.10 CPU build from PyPI** β the cu128 wheel clashes with the system NPP libs. Video decode is the training bottleneck, use 12+ dataloader workers.- `placo` for SO-101 forward kinematics; needs `assets/so_arm/so101_new_calib.urdf` **plus the 13 STL meshes** (placo loads collision geometry, it won't run without them).- `fla-core` + `causal-conv1d` give Qwen3.5 linear-attention its fast path (~5Γ); they require CUDA β any CPU-only smoke test of the model will crash inside `causal_conv1d`.- Data lives in `~/tinyvla_data` (gitignored), HF cache in `~/.cache/huggingface`.
## Architecture
```SLOW (cacheable @1Hz) FAST (10β20 Hz, ~140M online)image β Qwen3.5-0.8B vision tower ββ¬βββββΊ 64 spatial tokens/cam βββinstruction βββββββββββββββββββββββ€ β βΌ proprio β€ LM (first 12 of 24 layers) morphology/ID β€ βΌ βΌ 8β16 readout latents βββββββββββββββββΊ flow-matching expert (38M, chunk 50, 10 Euler)```
Variant switches in `TinyVLAConfig`:- `conditioning`: `id` (learned embedding) | `morph` (16-number descriptor β MLP) | `morph_qwen` (robot text through the shared LM)- `action_space`: `native` | `canonical` (base-frame EE deltas)- `vlm_native`: demos + robot text go INTO the LM sequence (dual-rate preserved)- `use_demo_conditioning`, `demo_only`: in-context exemplar channels (all dead, see below)
## Data pipeline
```LeRobot dataset β scripts/build_ee_sidecar.py (offline, once, NO video decode) SO-101: FK(joints) via placo; others: EE pose from state β ~/tinyvla_data/ee_sidecar/<name>.parquet β src/tinyvla/data/canonical.py (10 Hz resample, base-frame left-delta rotvec, gripper q1βq99, quantile norm to [-1,1]) β CanonicalSource β WeightedMixtureDataset β policy```
`docs/WIRING.md` has the full embodiment registry (id β morph_key β dataset βcanonicalization source β weight β train/held-out).
Robot pool: SO-101 (40 community sets, FK), Bridge/WidowX 53K eps, RT-1/Google 87K eps,UR5, xArm, DLR-EDAN, TidyBot, Stretch, Jaco, LeKiwi (held out), RoboCasa365/PandaOmron.
## Running things
```bash# training (any variant β the config picks the mode)PYTHONUNBUFFERED=1 python scripts/train.py --config configs/tv2_C_scaled.yaml
# physical-space eval across robots (the metric that matters)python scripts/eval_similar_robots.py # ratio = endpoint err Γ· zero-floor
# LIBERO closed-loop (v1)MUJOCO_GL=egl python scripts/eval_libero.py --checkpoint <ckpt> \ --suite libero_spatial --episodes 100 --n-action-steps 10 --action-repeat 1```
Long runs: launch with `nohup`, watch via checkpoints (stdout is block-bufferedunder nohup β use `PYTHONUNBUFFERED=1` or you see nothing for hours).
## Evaluation β read this before trusting any number
1. **Always run the zero-prediction control.** Per-step action error is degenerate (jaco moves ~3.6 mm/step; predicting zeros scores ~4 mm). Use the **integrated-trajectory endpoint error over the 50-step chunk**, and divide by the per-robot **zero-floor** (what "predict mean motion" achieves). Only the ratio is comparable across robots; ratio < 1.0 means the model beats the trivial baseline.2. **Check both held-out robots, not one.** "canonical β« native" looked decisive on jaco and reversed on stretch.3. Absolute mm are meaningless across robots β different motion scales.
## Results
### v1 β LIBERO (closed-loop success)| suite | TinyVLA | OpenVLA-7B ||---|---|---|| spatial | **86%** (dual-rate @1 Hz; 79% full-rate) | 84.7% || object | **94%** | 88.4% || goal | **86%** | 79.2% || long | **70%** | 53.7% || **avg** | **84.0%** | 76.5% |
Dual-rate (semantic latent refreshed at 1 Hz) matched or beat full-rate β the corearchitectural claim, verified closed-loop.
### v2 β cross-embodiment (ratio to zero-floor, lower is better)| | in-training | held-out ||---|---|---|| C-diverse (8 robots, 20k steps, frozen LM) | 0.99 | 1.17 || **C-scaled (9.1M frames, 60k steps, LM unfrozen)** | **0.81** | **0.88** |
Per-robot final: jaco 0.69, xarm 0.64, dlr_edan 0.69, stretch 0.69, LeKiwi (held-out)1.07, ur5 1.22 (hardest β the fastest robot, 9.9 mm/step; its canonicalization is fine).
**Negative results (all documented in `tinyvla2/RESULTS.md`):**- Robot description as text in the prompt (frozen LM) β hurts.- Morphology via the shared Qwen + unfrozen LM β 3Γ more content-sensitive, no absolute gain.- In-context demo conditioning β **five architectures**, all dead (real vs garbage exemplars indistinguishable): MLP same-task β MLP cross-task β 24Γ capacity β demos inside the LM attention stream β demos as the only identity channel.
## Lessons
1. **Check against the trivial baseline before running ablations.** Five conditioning mechanisms moved nothing while the model sat at ratio 0.99 β we were comparing variants of an underfit model and measuring noise. Data + steps + unfreezing the LM moved everything.2. **Silent data-convention bugs cost the most time.** LIBERO went 0% β 60% purely by fixing three of them: robosuite renders are **180Β°-rotated** (a vertical flip alone leaves a mirror), eef rotvec is antipodal vs the dataset, and the dataset's `fps: 10` metadata is wrong (frames are native 20 Hz). A **GT-action replay harness** (`scripts/replay_libero.py`) diagnoses all of these independently of the policy β build it first.3. **Unfreezing the LM is the single biggest lever** (LIBERO 60% β 86%).4. Cross-morphology transfer converges slowest β LeKiwi was still improving at 60k (1.24 β 1.13 β 1.07) when in-training had plateaued at 40k.5. Some community datasets are broken at source (meta frame count β parquet rows); validate `len(reader.hf_dataset) == meta.total_frames` and quarantine mismatches.
## State
Best checkpoints: **v1** `outputs/libero_ft4/final` (86% LIBERO) Β· **v2**`outputs/tv2_C_scaled/final` (0.81/0.88). Currently training: `tv2_robocasa` βcontinue-train from C-scaled on RoboCasa365 (sim kitchens, PandaOmron mobilemanipulator, 1.5M frames) at weight 0.5 with the old robots replayed at 0.5, toseparate new-domain integration from catastrophic forgetting.CLAUDE.mdAdded+153