How dreamzero0/dreamzero works
1. Repository purpose and top-level split
- This repo is a research codebase for DreamZero, a world-action model that predicts both robot actions and future video.
- The architecture splits cleanly into four flows: data preparation, training, distributed inference, and evaluation / serving.
2. Core package layout
- groot/vla is the main library. It contains:
- data for dataset schemas, conversions, registries, and transforms
- model for DreamZero and a smaller n1_5 policy variant
- experiment for training/evaluation orchestration
- utils and common/utils for shared helper code
- scripts/ contains runnable entry points for training, data conversion, and TensorRT engine building.
- eval_utils/ contains a separate policy server/client and simulation evaluation harness.
3. Data ingestion and normalization boundary
- Raw robotics datasets are not consumed directly by the model.
- The repo defines a conversion boundary from source formats such as DROID RLDS/TFDS into LeRobot v2.0-style data.
- This layer lives under groot/vla/data/conversion and groot/vla/data/dataset, with dataset metadata and registry support to select the correct loader.
4. Dataset schema and modality handling
- groot/vla/data/schema defines embodiment-specific conventions, especially camera names and action/state structure.
- groot/vla/data/transform is the modality pipeline:
- language processing
- video frame handling
- state/action formatting
- concatenation and common transforms
- This is where raw episodes become model-ready multimodal samples.
5. Model architecture boundary
- groot/vla/model/dreamzero is the primary model stack.
- It is organized into:
- backbone for the visual/video foundation model
- action_head for action generation
- modules for attention, schedulers, video encoders/decoders, memory/VRAM management, and Wan-specific submodules
- transform for model-side feature adaptation
- The model is built on Wan2.1 / Wan2.2 video backbones, with optional LoRA or full fine-tuning.
6. How perception-to-action works
- DreamZero does not just regress actions from observations; it jointly uses a video generation backbone and an action head.
- The data flow is: multimodal observations and language prompt → backbone/video-token processing → action head → predicted control sequence, with video generation as an auxiliary or coupled output.
- This coupling is the main architectural idea of the repo.
7. Training orchestration
- groot/vla/experiment manages experiment configuration, lifecycle, and glue between dataset, model, and optimization.
- Training is launched from scripts/train/* and uses:
- Hydra configs under groot/vla/configs
- DeepSpeed ZeRO configs under groot/vla/configs/deepspeed
- distributed multi-GPU execution via standard PyTorch launch patterns
- The repo supports both full fine-tuning and parameter-efficient adaptation.
8. Configuration structure
- Configs are organized by concern:
- configs/data/... for embodiment/dataset-specific settings
- configs/model/... for backbone, action head, and transform variants
- configs/deepspeed/... for memory/distribution strategies
- This separation suggests the architecture is meant to swap datasets, embodiments, and model backbones without changing code paths.
9. Inference serving path
- Real-time inference is split from training and implemented as a distributed WebSocket server.
- The main runtime entry points are socket_test_optimized_AR.py and eval_utils/policy_server.py, with clients in eval_utils/policy_client.py and test_client_AR.py.
- Inference runs across multiple GPUs using torch.distributed, which is an important system boundary: the model is sharded/parallelized for serving, not just for training.
10. Inference optimization and deployment
- groot/control/tensorrt_utils.py and scripts/inference/build_trt_engine.* provide a TensorRT path for faster generation.
- The README indicates optional DiT caching and a cached generation path, which means the serving architecture includes both standard PyTorch execution and an accelerated TensorRT execution branch.
- This is a meaningful deployment boundary for architecture diagrams.
11. Evaluation and simulation integration
- eval_utils/run_sim_eval.py connects the policy server to external simulation benchmarks, specifically sim_evals.
- This is not part of the training loop; it is a separate evaluation pipeline that treats DreamZero as a remote policy service.
- The repo also supports saving generated videos and per-request inputs, which is useful for debugging and offline analysis.
12. Support for new embodiments
- The docs and scripts show a second major data/model branch beyond DROID: AgiBot and YAM.
- The new-embodiment flow is: convert dataset → align camera/views and action schema → choose the matching config → fine-tune from the AgiBot checkpoint.
- This indicates the architecture is intentionally embodiment-agnostic at the library level, but embodiment-specific at the dataset/schema/config level.
13. Utility and shared infrastructure
- groot/vla/common/utils provides lower-level helpers for IO, tensors, arrays, images, video, JSON/HDF5, and tree/shape utilities.
- These are foundational support modules used across conversion, preprocessing, training, and inference, but they are not themselves primary application subsystems.
14. Secondary model path
- groot/vla/model/n1_5 is a smaller policy stack with its own action encoder and simulation policy.
- It appears to be a sibling model family rather than the main DreamZero path, so in a diagram it should be shown as an alternate policy implementation, not part of the core DreamZero training/inference flow.
15. Overall architecture summary
- The repo is best diagrammed as a pipeline:
- raw robotics data → dataset conversion/normalization → multimodal transforms → DreamZero model training → distributed WebSocket/TensorRT inference → simulation or real-world evaluation.
- The key architectural boundaries are dataset schema, model family, training vs serving, and standard PyTorch vs TensorRT acceleration.
Main entry points: dreamzero DreamZero · policy_server.py Policy server · experiment.py Experiment runtime · utils Shared utils
Components 21
Data pipeline
Dataset conversion, schema, and sample transforms.
- Raw robotics data · Input datasets such as DROID, AgiBot, and YAM before normalization.
- Conversion · Dataset-specific conversion scripts and normalization boundary into repo-friendly formats.
groot/vla/data/conversion - Dataset registry · Dataset metadata and registry used to choose loaders and sharded variants.
groot/vla/data/dataset/registry.py - Embodiment schema · Embodiment tags and LeRobot-style action/state conventions.
groot/vla/data/schema - Modal transforms · Language, video, state/action, and concatenation transforms that build model-ready samples.
groot/vla/data/transform - LeRobot dataset · Main dataset implementation for normalized LeRobot-style data, including sharded loading.
groot/vla/data/dataset/lerobot.py
Models
DreamZero and alternate policy family.
- DreamZero · Primary model family that couples video generation with action prediction.
groot/vla/model/dreamzero - Video backbone · Wan2.1/Wan2.2-based visual-video foundation stack.
groot/vla/model/dreamzero/backbone - Action head · Generates control sequences from backbone features.
groot/vla/model/dreamzero/action_head - Dream modules · Attention, flow scheduling, VRAM management, and Wan-specific submodules.
groot/vla/model/dreamzero/modules - Model transforms · Model-side adaptation layers for co-training and common feature formatting.
groot/vla/model/dreamzero/transform - N1.5 policy · Smaller sibling policy stack with its own action encoder and simulation policy.
groot/vla/model/n1_5
Training
Experiment orchestration and launch configs.
- Experiment runtime · Lifecycle glue between data, model, optimization, and evaluation hooks.
groot/vla/experiment/experiment.py - Data configs · Embodiment and dataset-specific configuration presets.
groot/vla/configs/data - Model configs · Backbone, action head, and transform configuration presets.
groot/vla/configs/model - DeepSpeed configs · ZeRO and offload settings for memory/distribution strategy.
groot/vla/configs/deepspeed
Serving
Distributed inference and acceleration path.
- Policy server · Real-time inference service that exposes the policy over sockets.
eval_utils/policy_server.py - TensorRT engine · Optional accelerated execution path for faster generation.
groot/control/tensorrt_utils.py
Evaluation
Remote policy evaluation and simulation harness.
- Policy client · Client-side caller for the distributed policy service.
eval_utils/policy_client.py - Sim eval · Connects the remote policy to simulation evaluation harnesses.
eval_utils/run_sim_eval.py
Shared utils
Common helpers used across the repo.
- Shared utils · IO, tensor, image, video, and data-structure utilities reused across the repo.
groot/vla/common/utils
Connections 23
- Raw robotics data → Conversion: normalize · Convert raw robotics data into repository-supported formats.
- Conversion → Dataset registry: register · Register dataset variants and metadata for loader selection.
- Dataset registry → Embodiment schema: bind schema · Use embodiment conventions to interpret actions, states, and cameras.
- Embodiment schema → Modal transforms: format samples · Apply multimodal transforms to produce model-ready inputs.
- Modal transforms → LeRobot dataset: load · Feed normalized transformed samples into dataset implementations.
- Data configs → Dataset registry: select data · Hydra presets choose dataset/embodiment settings.
- Model configs → DreamZero: configure model · Hydra presets choose backbone, action head, and transform variants.
- DeepSpeed configs → Experiment runtime: memory plan · DeepSpeed settings control distributed training strategy.
- LeRobot dataset → Experiment runtime: batch data · Dataset loaders feed the training runtime.
- Experiment runtime → DreamZero: train · Experiment runtime orchestrates DreamZero optimization.
- DreamZero → Video backbone: uses · DreamZero builds on the Wan video backbone.
- DreamZero → Action head: predicts · The action head maps backbone features to controls.
- DreamZero → Dream modules: supports · Shared attention, scheduling, and VRAM modules support the model stack.
- DreamZero → Model transforms: adapts · Model-side transforms align features for co-training and inference.
- DreamZero → Policy server: serve · Trained policy is exposed through the distributed server path.
- Policy server → TensorRT engine: accelerate · Server can switch to TensorRT-accelerated execution.
- Policy server → Policy client: remote calls · Clients send observations and receive predicted actions.
- Policy client → Sim eval: evaluate · Remote policy is evaluated inside simulation benchmarks.
- Policy server → Sim eval: policy service · Simulation evaluation treats the server as a remote policy backend.
- N1.5 policy → Policy server: alternate policy · Smaller policy family can also participate in serving/evaluation flows.
- Shared utils → Conversion: helpers · Shared utilities support conversion and normalization code.
- Shared utils → Experiment runtime: helpers · Shared utilities support orchestration and runtime glue.
- Shared utils → Policy server: helpers · Shared utilities support socket serving and request handling.