Skip to content
SaM-0777Public

About

ZULU Vision-language-action (VLA) policy for robotic manipulation using DINOv2 visual representations, FLAN-T5 language conditioning, a block-causal Diffusion Transformer, and flow matching.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ZULU

ZULU is an exploratory vision-language-action (VLA) policy for robotic manipulation. It combines dense DINOv2 patch representations, FLAN-T5 language conditioning, a block-causal Diffusion Transformer (DiT), and flow matching to generate continuous joint and gripper trajectories.

The implementation is designed around the LeRobot v2.1 dataset format and the DROID/Panda data schema. It includes full-model training, LoRA fine-tuning, dataset replay, and a Robosuite Panda simulation rollout.

Contents

Overview

ZULU models robot behavior as conditional continuous trajectory generation. At each control query, the policy consumes:

  • a temporal context of synchronized RGB frames from three cameras;
  • the current robot state, represented by seven joint positions and one gripper value;
  • a natural-language task instruction; and
  • an embodiment identifier.

The model predicts padded action vectors whose physical DROID/Panda payload is seven joint-position values plus one gripper-position value. Joint actions are trained as relative targets and converted back to absolute joint positions during inference. The implementation also trains a visual dynamics objective that predicts the next-frame DINOv2 patch representation.

The linked technical report presents ZULU as an architectural experiment inspired by the joint video-and-action prediction paradigm of DreamZero. The report describes an early 216M-parameter DiT with frozen DINOv2 and FLAN-T5 components, for a total system footprint of approximately 412.21M parameters.

Model card

Field Details
Model type Conditional flow-matching action policy with a Diffusion Transformer backbone
Primary task Vision-language-conditioned robotic manipulation
Embodiment in the checked-in configuration oxe_droid / Franka-style 7-DoF arm with a 1-DoF gripper payload
Visual inputs video.exterior_image_1_left, video.exterior_image_2_left, video.wrist_image_left
Visual format RGB, 15 FPS, source resolution 180 × 320; resized by the ZULU pipeline to 160 × 320 before DINOv2 processing
State inputs state.joint_position (7) and state.gripper_position (1)
Action outputs action.joint_position (7) and action.gripper_position (1), padded to 32 channels
State padding 64 channels
Language encoder Frozen FLAN-T5-base encoder, 768-dimensional hidden states, maximum length 200
Vision encoder Frozen DINOv2 with registers, 768-dimensional patch features, patch size 14
DiT 12 layers, hidden width 1024, 16 attention heads, FFN width 4096, input/output width 768
Action flow process linear noise/data interpolation with a shifted flow schedule
Fine-tuning method PEFT LoRA on attention projections and FFN linear layers
Primary data format LeRobot v2.1 metadata, Parquet state/action data, and MP4 videos
License The repository currently provides source and dependency metadata without a top-level license file; review the individual asset and dataset licenses before redistribution

Intended use

Use ZULU for research into flow-matching policies, dense visual representations for robot control, multimodal trajectory prediction, dataset replay, and simulated manipulation experiments.

Evaluation scope

The technical report reports exploratory train/test trajectory errors and qualitative closed-loop observations. It also describes a 16,000-step base checkpoint and a 5,000-step LoRA experiment. The published report frames these results as an early research iteration; use task success, safety, generalization, and physical-robot metrics from your own evaluation protocol for deployment decisions.

Architecture and method

1. Visual representation

src/embeds/dinov2.py loads a local DINOv2-with-registers checkpoint from models/dinov2breg. The model is frozen and kept in evaluation mode when the surrounding policy enters training mode. The preprocessing configuration resizes each camera frame to 154 × 308. With a 14-pixel patch size, each frame contributes an 11 × 22 grid, or 242 spatial patch tokens. The CLS token and register tokens are removed; the remaining patch sequence is passed to the DiT.

The ZULU transform creates a multi-view spatial layout for the DROID embodiment:

[ wrist | wrist ]
[ left  | right ]

The layout is represented as a single two-by-two image canvas before the DINOv2 encoder. The source transform also contains training-time hooks for exterior-view dropout and photometric augmentation.

2. Language representation

src/embeds/text_encoder.py loads the local FLAN-T5-base encoder and tokenizer from models/flan-t5-base. Instructions are whitespace-normalized, padded or truncated to 200 tokens, and encoded into 768-dimensional hidden states. The DiT receives these states through cross-attention.

For oxe_droid, the collator wraps an instruction in a camera-layout prompt describing the wrist and exterior views. The dataset can provide three language annotation fields; the training transform selects among them for DROID examples.

3. State and action representation

The active configuration selects:

state.joint_position      -> 7 dimensions
state.gripper_position    -> 1 dimension
action.joint_position     -> 7 dimensions
action.gripper_position   -> 1 dimension

The dataset pipeline concatenates these fields, applies q99-based normalization, and pads them to max_state_dim=64 and max_action_dim=32. relative_action=True with relative_action_keys=["joint_position"] makes joint-position actions relative to the current joint state. The gripper field remains in its configured representation. Inference unnormalizes the prediction and adds the latest joint state back to the predicted relative joint trajectory.

The active src/configs/train.py uses video deltas 0..24, giving 25 visual frames, one state step, and 24 action steps per action block. With num_frame_per_block=8, the inference path derives three image blocks and therefore a 72-step action trajectory (3 × 24). Several older comments and the Robosuite helper retain a 33-frame/96-action example; use the active configuration and inspect returned tensor shapes when adapting those helpers.

4. Block-causal DiT

src/policies/dit.py interleaves visual patch tokens, noisy action tokens, and state tokens. The attention routing is block-causal across temporal visual blocks. The implementation uses separate action and state encoders, rotary positional structure for visual/action/state streams, timestep modulation through adaptive layer normalization, and language cross-attention.

The checked-in DiT configuration is:

Parameter Value
Transformer layers 12
Model width 1,024
Attention heads 16
FFN width 4,096
Input/output feature width 768
Frequency embedding width 256
Action channels 32 padded channels
State channels 64 padded channels
Actions per image block 24
States per image block 1
Frames per image block 8

5. Flow-matching objective

During training, the model samples Gaussian action noise epsilon and a scheduler timestep, then constructs the noisy action state:

x_t = (1 - sigma_t) * action + sigma_t * epsilon
target = epsilon - action

The DiT predicts the action vector field. The action loss is a masked, timestep-weighted MSE over real action dimensions. In parallel, the visual branch predicts residual next-frame DINOv2 patch features with an MSE dynamics loss. The active DiT weights are action_loss_weight=1.0 and dynamics_loss_weight=0.5.

At inference, Model.lazy_joint_frame_action initializes the complete action horizon with Gaussian noise and integrates the predicted vector field with FlowUniPCMultistepScheduler. The visual and state context remain clean conditioning inputs throughout action sampling.

Repository layout

Path Purpose
src/policies/model.py Top-level ZULU model, DINOv2 feature preparation, flow-matching loss, and action sampling
src/policies/dit.py Block-causal Diffusion Transformer, attention routing, timestep modulation, and action/state decoding
src/policies/scheduler.py Training-time flow-matching scheduler and target construction
src/policies/flow_unipc_multistep_scheduler.py Multistep predictor-corrector sampler used by inference
src/embeds/dinov2.py Frozen DINOv2 patch encoder
src/embeds/text_encoder.py Frozen FLAN-T5 text encoder and tokenizer
src/data/lerobot.py LeRobot v2.1 dataset loading, sharding, statistics, relative actions, and temporal sampling
src/data/lerobot_mixture.py Mixture/sharded dataset wrapper
src/data/zulu_transform.py Multi-view composition, padding, masks, language preparation, and collation
src/configs/train.py Dataset modality selection, transforms, model dimensions, and training arguments
src/experiment/wam_experiment.py Training entrypoint, checkpoint loading, trainer construction, and LoRA setup
src/experiment/trainer.py Hugging Face Trainer extension, checkpoint serialization, and dataset sampling
src/experiment/wam_inference.py WAMPolicy, checkpoint loading, preprocessing, action unnormalization, and trajectory generation
src/experiment/lora_setup.py LoRA target discovery, base checkpoint loading, adapter application, and saving helpers
test/wam_inference_test.py Dataset-driven inference loop
rollout/robosuite_env_rollout.py Panda/Robosuite replay and policy rollout helper
env/franka_emika_panda/ Panda XML assets and environment resources
demo/ Saved trajectory figures from experiments
pyproject.toml Project metadata and direct dependencies
uv.lock Locked dependency resolution

Datasets and checkpoint assets

Datasets

Dataset Role Metadata-backed contents
DreamZero-DROID-Data-2000 Pretraining 2,000 episodes, 499,592 frames, 3 synchronized videos per episode, 15 FPS, 180 × 320 RGB frames, 7-joint plus gripper state/action fields
Panda-PickPlace-DROID Fine-tuning 150 episodes, 36,194 frames, one task, 450 videos, 15 FPS, 180 × 320 RGB frames, the same 7-joint plus gripper schema

Both datasets use LeRobot v2.1 metadata with:

meta/info.json
meta/modality.json
meta/stats.json
data/chunk-*/episode_*.parquet
videos/chunk-*/<camera-key>/episode_*.mp4

The source maps the original LeRobot keys as follows:

observation.images.exterior_image_1_left -> video.exterior_image_1_left
observation.images.exterior_image_2_left -> video.exterior_image_2_left
observation.images.wrist_image_left       -> video.wrist_image_left
observation.state                         -> state.*
action                                    -> action.*

Model and backbone assets

The ZULU model repository contains:

  • the checkpoint-16650 base checkpoint, including pytorch_model.bin, trainer state, optimizer state, scheduler state, and experiment metadata;
  • LoRA adapter archives under pick_n_place_sim_finetune/;
  • additional fine-tuning archives such as checkpoint-1500-finetune.tar.gz; and
  • local DINOv2 and FLAN-T5 backbone directories under models/.

The inference loader expects a base checkpoint directory containing pytorch_model.bin, a metadata file at experiment_cfg/metadata.json, and an optional LoRA adapter directory. The source fine-tuning path expects its base model at ./checkpoint-0; copy or rename a downloaded base checkpoint to that path before launching LoRA training.

Requirements

Software

  • Python 3.12 or newer, as declared in pyproject.toml and .python-version.
  • PyTorch 2.13 or newer and torchvision 0.28 or newer.
  • CUDA 12.6 on Linux/Windows.

Setup

Clone the repository and install the locked dependencies:

git clone https://github.com/SaM-0777/zulu.git
cd zulu
uv sync

Download the local pretrained backbones from the published model repository:

hf download SamLegion888/zulu models/dinov2breg models/flan-t5-base --local-dir .

Download a dataset into a local directory. The dataset directory name can be chosen freely when the corresponding source path in src/experiment/wam_experiment.py is updated:

hf download SamLegion888/DreamZero-DROID-Data-2000 \
  --repo-type dataset \
  --local-dir data/dreamzero_droid_2000

hf download SamLegion888/Panda-PickPlace-DROID \
  --repo-type dataset \
  --local-dir data/panda_pickplace_droid_v3

Authenticate with Hugging Face when the local account requires access to the selected files. Authenticate Weights & Biases before training:

wandb login

Platform note

The lockfile selects a CUDA 12.6 PyTorch index on non-macOS platforms. The checked-in decord==0.6.0 package publishes Linux x86_64 and Windows wheels; Apple arm64 requires a platform-specific decoder/PyTorch environment before uv sync can complete. Use a Linux x86_64 NVIDIA environment for the repository’s documented lockfile path.

Verification matrix

Workflow Status Source evidence
Environment resolution Lockfile verified; Linux x86_64 CUDA path documented uv.lock, pyproject.toml
Python source integrity Compile check passes across src, test, rollout, and main.py Python 3.12 compileall check
Full pretraining Source-implemented configuration path WAMExperiment.create_model with train_architecture="full"
LoRA fine-tuning Source-implemented and active in the checked-in configuration lora_setup.py, WAMExperiment.create_model
Offline inference Source-implemented WAMPolicy and test/wam_inference_test.py
Robosuite rollout Source-implemented integration requiring local HDF5 and simulation assets rollout/robosuite_env_rollout.py

Runtime training and rollout require the external datasets, local backbone weights, compatible GPU/software, and checkpoint directories described below.

Pretraining

Verification status

The full-training branch is implemented in WAMExperiment.create_model: train_architecture="full" leaves the ZULU trainable modules in the standard Trainer path. The checked-in entrypoint is python -m src.experiment.wam_experiment. The checked-in data path currently selects the Panda directory for the active fine-tuning experiment, so pretraining requires the explicit source-path and architecture changes below.

Configure the pretraining run

Edit src/configs/train.py:

training_args = {
    # keep the existing fields and update the run-specific values
    "run_name": "zulu_pretrain_droid_001",
    "learning_rate": 1e-5,
    "max_steps": 50000,
}

action_head_cfg = {
    # keep the existing architecture fields
    "train_architecture": "full",
}

Edit src/experiment/wam_experiment.py in BaseExperiment.create_train_dataset:

dataset_path = os.path.join(
    self.output_abs_dir,
    "data",
    "dreamzero_droid_2000",
)

The modality selection and preprocessing already match the DROID schema: three camera streams, one state step, 25 visual deltas, 24 action deltas, q99 normalization, relative joint actions, and a 24-step action block.

Launch pretraining

From the repository root:

uv run python -m src.experiment.wam_experiment

For multi-GPU execution, the trainer reads the standard distributed environment variables and computes gradient accumulation from the configured global batch size. A typical launch is:

uv run torchrun --standalone --nproc_per_node=4 \
  -m src.experiment.wam_experiment

The source configuration targets a global batch size of 32, per_device_train_batch_size=1, and cosine decay with a 5% warmup ratio. Checkpoints are written under checkpoint/ and include the Trainer state plus the source experiment metadata. The final save path is checkpoint/pytorch_model.bin.

Pretraining outputs

The trainer and callbacks write:

checkpoint/
├── checkpoint-<step>/
│   ├── pytorch_model.bin
│   ├── trainer_state.json
│   ├── optimizer.pt
│   ├── scheduler.pt
│   └── experiment_cfg/metadata.json
├── experiment_cfg/metadata.json
├── loss_log.jsonl
└── wandb_config.json

Frozen top-level encoders are omitted from the serialized trainable state when the custom trainer saves a full model. Keep the local models/ backbones beside the repository for later model reconstruction.

LoRA fine-tuning

Verification status

The LoRA workflow is implemented in src/experiment/wam_experiment.py and src/experiment/lora_setup.py. It loads a base checkpoint, discovers attention and FFN linear layers, wraps the model with PEFT, and saves adapter checkpoints. The active config uses rank 8, alpha 16, and a default adapter dropout of 0.05.

Prepare the base checkpoint

Create the layout expected by the source:

zulu/
├── checkpoint-0/
│   ├── pytorch_model.bin
│   └── ...
├── data/
│   └── panda_pickplace_droid_v3/
└── models/
    ├── dinov2breg/
    └── flan-t5-base/

The base checkpoint can come from a completed pretraining run or a published checkpoint after placing its pytorch_model.bin at checkpoint-0/. The source model loader handles DDP and torch.compile prefixes and loads matching tensor shapes with strict=False.

Configure the fine-tuning data path

The checked-in source already selects:

dataset_path = os.path.join(
    self.output_abs_dir,
    "data",
    "panda_pickplace_droid_v3",
)

The Hugging Face command in Setup creates that directory name. The dataset metadata identifies 150 Panda pick-and-place episodes and one task.

Launch LoRA fine-tuning

uv run python -m src.experiment.wam_experiment

The active training arguments use:

per_device_train_batch_size = 1
global_batch_size           = 32
gradient_accumulation_steps = 32 on one device
learning_rate               = 2e-4
max_steps                   = 10,000
save_steps                  = 500
bf16                        = True
report_to                   = wandb

detect_lora_target_modules(..., strategy="attention_and_ffn") selects the final-name suffixes q, k, v, o, ffn.0, and ffn.2 from the DiT attention and feed-forward layers. The source prints the discovered modules and trainable-parameter count at startup.

Adapter checkpoints use the PEFT format. The published model repository contains packaged adapter archives under pick_n_place_sim_finetune; extract an archive into a directory with its adapter files and experiment_cfg/metadata.json before inference.

Inference

Policy loader

WAMPolicy loads the base model and optional LoRA adapter as follows:

from pathlib import Path
import torch

from src.experiment.wam_inference import WAMPolicy
from src.data.schema import EmbodimentTag

policy = WAMPolicy(
    checkpoint_path=Path("checkpoint-0"),
    metadata_json_path=Path(
        "checkpoint-sim-finetune-1500/experiment_cfg/metadata.json"
    ),
    finetuned_checkpoint_path=Path("checkpoint-sim-finetune-1500"),
    embodiment=EmbodimentTag.OXE_DROID,
)

The loader:

  1. constructs the architecture from experiment_conf;
  2. loads checkpoint-0/pytorch_model.bin;
  3. loads and merges a PEFT adapter when finetuned_checkpoint_path is provided;
  4. loads the saved dataset metadata for normalization and modality validation; and
  5. moves the frozen evaluation model to CUDA when available.

Expected observation dictionary

The inference transform consumes the source modality keys:

from tianshou.data import Batch

observation = {
    "video.exterior_image_1_left": exterior_left,   # [T, 180, 320, 3]
    "video.exterior_image_2_left": exterior_right, # [T, 180, 320, 3]
    "video.wrist_image_left": wrist,               # [T, 180, 320, 3]
    "state.joint_position": joint_state,           # [1, 7] or source-compatible state horizon
    "state.gripper_position": gripper_state,       # [1, 1]
    "annotation.language.language_instruction": instruction,
}

batch = Batch(obs=observation)

The source dataset helper get_step_data is the preferred way to create this dictionary because it applies the configured delta indices and edge padding:

from pathlib import Path
import numpy as np

from src.data.lerobot import ShardedLeRobotSubLangSingleActionChunkDatasetDROID

dataset = ShardedLeRobotSubLangSingleActionChunkDatasetDROID(
    dataset_path=Path("data/panda_pickplace_droid_v3"),
    modality_configs=policy.modality_configs,
    embodiment_tag=policy.embodiment_tag,
    video_backend="decord",
    transforms=policy.eval_transform,
    max_chunk_size=4,
    relative_action=True,
    relative_action_per_horizon=False,
    relative_action_keys=["joint_position"],
)
dataset.start_cache_shard(0)
dataset.finish_cache_shard()

episode_index = 0
step = 0
indices = {
    key: np.clip(values + step, 0, int(dataset.trajectory_lengths[episode_index]) - 1)
    for key, values in dataset.delta_indices.items()
}
batch = Batch(obs=dataset.get_step_data(episode_index, indices))

Generate a trajectory:

with torch.inference_mode():
    result_batch, predicted_frame_features = policy.lazy_joint_forward(
        batch=batch,
        check_quality=False,
        plot_trajectory=False,
    )

joint_targets = result_batch.act["action.joint_position"]
gripper_targets = result_batch.act["action.gripper_position"]

result_batch.act contains unnormalized actions in the source action representation, with relative joint actions converted to absolute joint targets. The model’s action horizon is derived from the number of image blocks in the supplied context; the active 25-frame configuration yields 72 action rows.

Dataset-driven inference smoke test

test/wam_inference_test.py provides a complete dataset-driven forward loop. Arrange the local directories used by its main block:

checkpoint-0/
checkpoint-sim-finetune-1500/
data/panda_pickplace_droid_v3_fix_state_action_gripper_inverted_2i/

Run:

uv run python test/wam_inference_test.py

The test loads one episode, samples action chunks across its length, calls WAMPolicy.lazy_joint_forward, and resets the streaming KV caches after the episode.

Robosuite simulation rollout

rollout/robosuite_env_rollout.py builds a Panda PickPlaceCan environment with three camera observations, restores a reference MuJoCo state from an HDF5 demonstration, and applies predicted joint/gripper targets at 15 Hz. The script’s main block uses these paths:

checkpoint-0/
checkpoint-sim-finetune-1500/
data/panda_pickplace_droid_v3_fix_state_action_gripper_inverted_2i/
robosuite_data/pickplace_teleop_droid/20260801_151327.hdf5

Launch the included evaluation loop with:

uv run python rollout/robosuite_env_rollout.py

The helper writes wrist and front-camera MP4 recordings using the configured output prefix. Before changing max_steps, action_horizon, camera names, or gripper scaling, validate the returned action shape and the simulator’s joint and gripper conventions.

Safety and limitations

Use the policy as a research controller with a human supervisor and an accessible emergency stop. Apply joint limits, velocity limits, acceleration limits, workspace bounds, collision checks, and gripper limits in the downstream controller. Validate the action units and sign conventions against the target robot before any physical motion.

Run dataset replay and Robosuite evaluation before hardware execution. Start with low speed, low force, a clear workspace, and a mechanically isolated test fixture. Keep a human in the loop for task interruption and use conservative action horizon execution.

The model is trained on fixed camera geometry, DROID/Panda-style state/action conventions, and a limited set of demonstration distributions. Performance depends on camera calibration, lighting, object appearance, robot embodiment, action normalization statistics, language phrasing, and dataset coverage. Evaluate each domain shift explicitly.

The technical report describes the released model as an early exploratory checkpoint with limited convergence, task success reporting, ablations, and broad physical evaluation. Treat published trajectory figures and qualitative stability observations as research evidence for further testing rather than as a deployment certificate.

The source also contains experimental helpers with fixed paths and legacy horizon constants. Adapt those paths and verify tensor shapes, metadata, gripper semantics, and simulator state restoration before reuse.

References

  1. S. R. Sahu, “ZULU: A Flow-Matching Action Model Architecture with DINOv2 Dense Representations,” technical report, 2026.
  2. DreamZero Team, “World Action Models are Zero-shot Policies,” 2026. ZULU follows the joint visual-dynamics and action-conditioning direction described by DreamZero.
  3. M. Oquab et al., “DINOv2: Learning Robust Visual Features without Supervision,” arXiv:2304.07193, 2023.
  4. Y. Lipman et al., “Flow Matching for Generative Modeling,” arXiv:2210.02747, 2022.
  5. W. Peebles and S. Xie, “Scalable Diffusion Models with Transformers,” arXiv:2212.09748, 2022.
  6. C. Raffel et al., “Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer,” JMLR 21, 2020. ZULU uses the FLAN-T5-base encoder family for language conditioning.
  7. E. Hu et al., “LoRA: Low-Rank Adaptation of Large Language Models,” arXiv:2106.09685, 2021.
  8. R. Walke et al., “BridgeData V2: A Dataset for Robot Learning at Scale,” arXiv:2308.12952, 2023. The DROID/LeRobot data organization used here follows the broader robot-demonstration dataset ecosystem.
  9. M. Mandlekar et al., “robosuite: A Modular Simulation Framework and Benchmark for Robot Learning,” arXiv:2009.08922, 2020.
  10. LeRobot, Hugging Face, dataset and robot-learning tooling used as the on-disk data convention.

Citation

If ZULU contributes to your work, cite the repository and technical report with one of the following entries.

@software{sahu2026zulu,
  author  = {Sahu, Soumya Ranjan},
  title   = {{ZULU}: A Flow-Matching Action Model Architecture with {DINOv2} Dense Representations},
  year    = {2026},
  url     = {https://github.com/SaM-0777/zulu},
  note    = {Open-source robotics action-model implementation}
}
@misc{sahu2026zulu_report,
  author       = {Sahu, Soumya Ranjan},
  title        = {{ZULU}: A Flow-Matching Action Model Architecture with {DINOv2} Dense Representations},
  year         = {2026},
  howpublished = {Technical report},
  url          = {https://www.soumyaranjansahu.com/blog/zulu}
}

About

ZULU Vision-language-action (VLA) policy for robotic manipulation using DINOv2 visual representations, FLAN-T5 language conditioning, a block-causal Diffusion Transformer, and flow matching.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages