Skip to content
GalaxyGeneralRoboticsPublic

About

No description, website, or topics provided.

Resources

Stars

13 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🦿 ALV

Advancing Whole-Body Intelligence in Reverse, from Action to Language to Vision

arXiv Project Page Backbone License

ALV: whole-body intelligence from the body up


πŸ“– Overview

Whole-body demonstrations are scarce, and imperfect motion can compromise a humanoid's balance. ALV therefore builds whole-body intelligence from the body up: it learns Action, Language and Vision in this order (how to move, what to do, and where to act), establishing reliable motor capabilities before introducing language and vision.

  1. Action: how to move. Candidate motions are executed by a whole-body tracker, and only stable, faithfully tracked trajectories are kept. A four-stream residual-VQ tokenizer learns a compact motion vocabulary from these realized trajectories: an action space grounded in what the robot can actually perform.
  2. Language: what to do. A flow-matching diffusion transformer generates motion in this space from language instructions, conditioned on proprioception and on motion already committed for execution. Rolling replanning and transition-aware post-training let the same network revise its future motion when the instruction changes while the robot is moving.
  3. Vision: where to act. The language-stage generative trunk is transferred to a vision-language-action policy and post-trained on scarce teleoperated demonstrations, so visual grounding builds on an established motion prior.

This repository releases the Action and Language stages: the motion tokenizer, the language-conditioned flow policy ALV-L with its streaming variant ALV-L-S, and the bounded-lookahead decoder for online execution, covering data preparation, training, offline generation and streaming execution.

πŸ”¬ Key Results
  • Execution-Grounded Action Space: after the encode, decode and track round trip, motion executes with 12.08 mm MPJPE, against 12.01 mm for tracking the reference directly; the causal decoder needs only 240 ms of look-ahead.
  • Physical Reliability: 0.0% maximum fall rate in 5Γ— prolonged open-loop rollouts under 100 N pushes, against 2.2–63.2% for text-to-motion baselines.
  • Language Alignment: R@3 of 90.4 and FID of 0.088 on Noitom test, the best among the compared text-to-motion models.
  • Interactive Control: 40.0% rule success after an instruction changes mid-motion, up from 26.6% for the single-instruction ALV-L, with no added parameters.
  • Vision Transfer: +16.7 points overall success on HumanoidArena over random action initialization (79.0 vs. 62.4).

ALV framework

✨ Highlights

Feature Description
🦿 Motion Tokenizer Four-stream residual VQ (root, lower body, upper body, contact) learned from tracker-executed motion; each 80 ms row is 65 codes (638 bits) and a 304-dimensional latent
🧠 Backbone The first 16 language layers of a frozen Qwen3-VL-2B-Instruct supply instruction features without image inputs
🌊 Flow Policy 32-layer DiT (width 1,536) with a four-layer text refiner, conditioned on instruction, proprioception and committed motion; 32 Euler steps with classifier-free guidance
πŸ” Rolling Replanning Every P = 7 rows (0.56 s), a new W = 40-row window (3.2 s) keeps C = 12 committed rows (0.96 s) and regenerates the future
πŸ”€ Transition-Aware Post-Training Instruction-switch chains, cross-instruction roll-in and short-segment continuations turn ALV-L into ALV-L-S
⏱️ Bounded-Lookahead Decoding A causal decoder, distilled from the context-aware decoder, needs 3 rows (240 ms) of look-ahead instead of 7 (560 ms)

πŸ“¦ Installation

Prerequisites

  • CUDA GPUs for training and generation
  • Python 3.12 and conda (or any other environment manager)

Environments

The motion tokenizer and the language stage use separate environments with different pinned versions. Language-stage tools run tokenizer steps in the tokenizer's own interpreter (--codec-python).

git clone https://github.com/GalaxyGeneralRobotics/ALV.git && cd ALV

# language stage
conda create -n alv python=3.12 -y && conda activate alv
pip install -e ".[train]"

# motion tokenizer
conda create -n alv-codec python=3.12 -y && conda activate alv-codec
pip install -e ".[tokenizer]"

All commands below run from the ALV directory.

Assets and Data

Paths in configs/ are relative to the working directory:

Path Contents
assets/backbone the frozen 16-layer Qwen3-VL backbone: python -m alv.la.prepare_backbone --base BASE_DIR --out assets/backbone --expect CHECKPOINT, where BASE_DIR is a download of Qwen3-VL-2B-Instruct (its first 16 language layers are kept; --checkpoint VLA_DIR takes the weights from a VLA checkpoint instead) and --expect confirms that the files match the ones CHECKPOINT was trained with
CODEC/ tokenizer directory: checkpoint-*.pt with its .json sidecar, stats.npz with its sidecar, and robot/scene_mjx_track.xml (the Unitree G1 model the motion was tracked with)
assets/codebooks.npz the tokenizer's frozen codebooks: python -m alv.la.codec.worker export --codec CODEC --output assets/codebooks.npz
assets/stats.json train-split normalization of latents and robot state: distributed with the checkpoints (<step>/pretrained_model/stats.json); for a newly trained tokenizer or new data, python -m alv.la.data.stats (below)
data/tokens/<dataset> tokenized motion, one token run per dataset (alv.la.codec.tokens)
data/index segment index over tokenized motion (alv.la.data.index_clips)
data/text-cache, data/mirror, data/switch-index instruction embeddings, mirrored motion bank, instruction-switch table

Checkpoints record the SHA-256 of every backbone file and refuse a different backbone; --backbone-check warn (generate), backbone_check="warn" (load_policy) and run.backbone_check: warn (training) accept it with a warning.


πŸš€ Training

1. Action: Motion Tokenizer

The tokenizer learns from tracker-executed recordings at 50 Hz (qpos, qvel, keypoint poses and velocities, foot contact), each with a .json identity sidecar; python -m alv.tokenizer.train.corpus --help lists the fields. Each --tracked-root SOURCE=DIR is one source, and training draws the sources equally often. The split is drawn per group_id, which is shared across sources; subject, recording and source ids belong to their source.

# corpus index (group-safe train/val/test split), feature statistics and training statistics, once per corpus
python -m alv.tokenizer.train.corpus index --spec configs/tokenizer/codec.yaml \
    --tracked-root SOURCE=DIR [--tracked-root SOURCE2=DIR2] --output CORPUS/tracked.jsonl
python -m alv.tokenizer.train.corpus stats --index CORPUS/tracked.jsonl --robot-xml G1.xml --output CORPUS/stats.npz
python -m alv.tokenizer.train.statistics --spec configs/tokenizer/codec.yaml --index CORPUS/tracked.jsonl \
    --stats CORPUS/stats.npz --robot-xml G1.xml --output CORPUS/training-statistics.json

# progressive training: continuous, then quantized with progressively added levels, then decoder adaptation
torchrun --nproc_per_node 8 -m alv.tokenizer.train.train --spec configs/tokenizer/codec.yaml \
    --index CORPUS/tracked.jsonl --stats CORPUS/stats.npz --training-stats CORPUS/training-statistics.json \
    --robot-xml G1.xml --run-dir runs/codec
torchrun --nproc_per_node 8 -m alv.tokenizer.train.validate --checkpoint runs/codec/checkpoint-00045000.pt \
    --split test --out runs/codec/test.json

Tokenizer training resumes from its newest checkpoint in --run-dir, exactly, on the same number of GPUs with the same --micro-windows.

Encode one tracked recording into tokens, and decode tokens back into robot motion:

python -m alv.tokenizer.inference encode --codec CODEC --input tracked.npz --output codes.npz --device cuda:0
python -m alv.la.codec.worker decode --codec CODEC --input codes.npz --output motion.npz --device cuda:0

2. Language: Training Inputs

Tokenized motion comes from encoding tracker-executed recordings with the frozen tokenizer. Build the training inputs once: one token run and one segment index per dataset, merged into one index, then the instruction embeddings, the mirrored motion bank and the instruction-switch table.

Each dataset is named after its key in data.windows.dataset_mix (source_a, source_a_translation, …, source_f_translation in the released configs; edit dataset_mix to train on other datasets). A token run encodes the recordings of the tokenizer's corpus index (--source keeps those of one tracked root; the split is the tokenizer's) with an optional captions file, either one caption per recording (--schema clip, indexed with index_clips build) or timed captions (--schema segment, indexed with index_clips build-segments); python -m alv.la.codec.tokens --help describes the captions file. --mirror lets training mirror a dataset's motion (data.windows.mirror); --no-mirror is for datasets whose mirrored motions are recordings of their own.

for r in 0 1 2 3 4 5 6 7; do     # tokenizer environment; once per dataset
  python -m alv.la.codec.tokens encode --codec CODEC --corpus CORPUS/tracked.jsonl --source SOURCE \
      --captions CAPTIONS.jsonl --schema clip --codebooks assets/codebooks.npz \
      --out data/tokens/source_a --rank $r --world 8 &
done; wait
python -m alv.la.codec.tokens finalize --out data/tokens/source_a

python -m alv.la.data.index_clips build --tokens-run data/tokens/source_a --out data/index-source_a \
    --dataset source_a --mirror
python -m alv.la.data.index_clips build-segments --tokens-run data/tokens/source_b --out data/index-source_b \
    --dataset source_b --no-mirror
# ... one index per dataset of dataset_mix
python -m alv.la.data.index_clips merge --source source_a=data/index-source_a \
    --source source_b=data/index-source_b --out data/index

for r in 0 1 2 3 4 5 6 7; do
  RANK=$r WORLD_SIZE=8 python -m alv.la.data.text_cache shard --backbone assets/backbone \
      --index data/index --out data/text-cache &
done; wait
python -m alv.la.data.text_cache merge --backbone assets/backbone --index data/index --out data/text-cache --world 8

for r in 0 1 2 3 4 5 6 7; do     # tokenizer environment
  python -m alv.la.codec.mirror build --codec CODEC --index data/index --out data/mirror --rank $r --world 8 \
      --codebooks assets/codebooks.npz &
done; wait

python -m alv.la.data.switch_index --index data/index --text-cache data/text-cache \
    --out data/switch-index/switch_index.npz

The checkpoints' stats.json holds for the released tokenizer. After training a tokenizer of your own (whose codebooks differ), compute the normalization from the index's training split:

python -m alv.la.data.stats --index data/index --codebooks assets/codebooks.npz --out assets/stats.json

3. Language: ALV-L and ALV-L-S

python -m alv.la.train.launch --config configs/la/alv_l.yaml --world 4
python -m alv.la.train.launch --config configs/la/alv_l_s.yaml --world 4
Recipe Model Initialization Steps Released weights
configs/la/alv_l.yaml ALV-L, single-instruction policy action model from scratch, frozen backbone 100,000 EMA at step 80,000
configs/la/alv_l_s.yaml ALV-L-S, transition-aware post-training ALV-L at step 80,000 30,000 EMA at step 30,000

Runs resume from their newest complete step directory (<output>/last) automatically. The step plan fixes each step's draws and global batch of 256 windows, so the world size only changes gradient accumulation; global_batch must be divisible by microbatch Γ— world and data.windows.micro_long Γ— world (on 8 GPUs, set both to 32). A run resumed on the same number of GPUs with the same micro-batches continues exactly; one resumed on another number of GPUs keeps every step's draws and global batch, with the flow-matching noise drawn from freshly seeded streams.


🎯 Generation & Streaming

Offline Generation

Text-to-motion uses the EMA weights, W = 40-row windows with C = 12 committed rows, and guidance 3 (32 Euler steps per window):

python -m alv.la.generate --checkpoint runs/alv_l_s/0030000 --ema --instruction "walk forward, then wave" \
    --frames 600 --guidance 3 --window 40 --committed 12 --codec CODEC \
    --codec-python /path/to/alv-codec/bin/python --output out/walk

Streaming Execution

At deployment, each predicted chunk is a revisable plan. alv.la.realtime.Streamer predicts one W-row window per request, retaining C committed rows from the preceding plan while regenerating the future; instruct(text) switches the instruction from the next request on. Request every P = 7 rows, or immediately when the instruction changes (interrupt). Replacement is seamless when the planning delay d and the decoder look-ahead β„“ satisfy d + β„“ ≀ C (d = 7 and β„“ = 3 in the paper). Streaming uses guidance 1.5.

from alv.la.checkpoint import load_policy
from alv.la.normalization import latent_space
from alv.la.realtime import Streamer

policy = load_policy("runs/alv_l_s/0030000", ema=True, device="cuda:0")
codebooks, normalizer = latent_space(policy.config, "cuda:0")
streamer = Streamer(policy, codebooks=codebooks, normalizer=normalizer, guidance_scale=1.5)

streamer.instruct("walk forward")
codes, prefix_rows = streamer.request(0)     # rows 0-39 as native codes [40, 65]
streamer.instruct("wave both arms")
codes, prefix_rows = streamer.request(7)     # rows 7-46; the first 12 repeat the current plan

Bounded-Lookahead Decoder

The causal decoder is distilled from the frozen context-aware decoder with the encoder and codebooks fixed, so these commands run in the tokenizer environment:

python -m alv.la.codec.causal_train pack --data-run data/tokens/source_a --bank data/causal-bank
torchrun --standalone --nproc_per_node 8 -m alv.la.codec.causal_train train --codec CODEC \
    --bank data/causal-bank --output runs/causal-L3 --lookahead 3 --upsample delayed --start-prob 0.3 --keep best
python -m alv.la.codec.worker decode --codec CODEC --input codes.npz --output motion.npz --decoder runs/causal-L3/best.pt

πŸ“Š Results

Stage Benchmark Metric ALV Comparison
Action TK-test, 638 bits per row Joint MAE (10⁻³ rad) ↓ 2.53 Product VQ 3.93
Action Codec-to-tracker round trip, Noitom test Executed MPJPE (mm) ↓ 12.08 Β· causal 12.78 MotionBricks 22.29 (ground truth 12.01)
Language Noitom test / OMG test R@3 ↑ 90.4 / 85.0 Kimodo-G1 82.2 / OMG-500M 65.1
Language Sealed rule-checked suite Primary score (%) ↑ 63.4 Kimodo-G1 57.7
Language 5Γ— open loop, 100 N pushes Max fall rate (%) ↓ 0.0 ARDY-G1 2.2
Language Three trackers, 5Γ— open loop, 100 N pushes Success (%) ↑ 98.7–100.0 ARDY-G1 86.6–97.1
Streaming SwitchBench, periodic / interrupt Rule success (%) ↑ ALV-L-S 40.0 / 48.8 ALV-L 26.6 / 35.8 Β· ARDY-G1 25.1 / –
Vision HumanoidArena, seven tasks Overall success (%) ↑ 79.0 Random init. 62.4
Vision SIMPLE, nine tasks Γ— four levels Successful episodes ↑ 239/360 Random init. 165/360

Vision results come from vision post-training, which is not part of this release.


πŸ“ Project Structure

ALV/
β”œβ”€β”€ πŸ“‚ alv/
β”‚   β”œβ”€β”€ tokenizer/         # Action: motion tokenizer (model, RVQ, features, kinematics and contacts, losses, evaluator)
β”‚   β”‚   β”œβ”€β”€ inference.py   #   load the frozen tokenizer, encode tracked motion into tokens
β”‚   β”‚   └── train/         #   corpus index and statistics, spec, progressive schedule, update step, validation
β”‚   └── la/                # Language: flow policy on tokenizer latents
β”‚       β”œβ”€β”€ models/        #   latent policy, DiT action head, frozen backbone
β”‚       β”œβ”€β”€ codec/         #   tokenizer bridge: token runs, codebook export and decoding, mirror augmentation, causal decoder
β”‚       β”œβ”€β”€ data/          #   segment index, captions, text-embedding cache, windows and sampling, switch index, statistics
β”‚       β”œβ”€β”€ train/         #   trainer (DDP, optional ZeRO-1, EMA), launcher, run configuration
β”‚       β”œβ”€β”€ generate.py    #   offline generation with committed prefixes and classifier-free guidance
β”‚       β”œβ”€β”€ realtime.py    #   streaming chunk producer for rolling replanning
β”‚       └── contract.py    #   representation contract Β· state.py Β· normalization.py Β· checkpoint.py Β· prepare_backbone.py
└── πŸ“‚ configs/            # tokenizer/codec.yaml Β· la/alv_l.yaml Β· la/alv_l_s.yaml

πŸ“š Citation

@article{cao2026alv,
    title   = {ALV: Advancing Whole-Body Intelligence in Reverse, from Action to Language to Vision},
    author  = {Cao, Zhuo and Zhang, Yingsheng and Qi, Zekun and Chen, Xuchuan and Li, Zekai and Liu, Dairu and
               Yu, Ruixi and Niu, Luyang and Wang, He and Yi, Li},
    journal = {arXiv preprint arXiv:2611.37854},
    year    = {2026}
}

πŸ“„ License Β· Acknowledgments

Licensed under Apache 2.0; see LICENSE and NOTICE. Pretrained backbones, the tokenizer checkpoint, robot models and motion datasets are governed by their own licenses. Built on top of Qwen3-VL, PyTorch, Transformers, Diffusers and MuJoCo.

About

No description, website, or topics provided.

Resources

Stars

13 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages