# openwam-official/openwam architecture

> Architecture diagram of the GitHub repository openwam-official/openwam, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/openwam-official/openwam
- Repository: https://github.com/openwam-official/openwam

## Overview

OpenWAM is a modular research stack for training World–Action Models and serving their robot-action policies. The main workflow runs robot and human episode data through dataset readers and modality transforms, trains a configurable model, then loads a checkpoint for inference and streams action chunks to a robot controller. The graph also shows the model’s video, action, and language-vision components. README capabilities guide the architecture map; sampled excerpts confirm the trainer, architecture, inference engine, and server roles, but not every internal integration.

Main entry points: [`openwam/model/architectures`](https://github.com/OpenWAM-Official/OpenWAM/tree/main/openwam/model/architectures) (WAM architectures), [`openwam/deploy/server.py`](https://github.com/OpenWAM-Official/OpenWAM/blob/main/openwam/deploy/server.py) (WebSocket server), [`openwam/train/openwam_trainer.py`](https://github.com/OpenWAM-Official/OpenWAM/blob/main/openwam/train/openwam_trainer.py) (WAM trainer), [`openwam/dataloader`](https://github.com/OpenWAM-Official/OpenWAM/tree/main/openwam/dataloader) (Dataset readers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_readers["Dataset readers"]
  node_transforms["Modality transforms"]
end

subgraph group_model["Model components"]
  node_architecture["WAM architectures"]
  node_video_backbone["Video backbones"]
  node_action_backbone["Action backbone"]
  node_vlm_backbone["VLM backbone"]
end

subgraph group_training["Training"]
  node_trainer["WAM trainer<br/>[openwam_trainer.py]"]
  node_train_entry["Training entry<br/>[train.py]"]
  node_checkpointing["Checkpoint utilities<br/>[checkpointing.py]"]
end

subgraph group_deployment["Policy deployment"]
  node_model_loader["Checkpoint loader<br/>[model_loader.py]"]
  node_engine["Inference engine<br/>[engine.py]"]
  node_policy["Receding-horizon policy<br/>[policy.py]"]
  node_server["WebSocket server<br/>[server.py]"]
end

node_data_sources[("Episode data")]
node_robot(("Robot controller"))

node_data_sources -->|"provides episodes"| node_readers
node_train_entry -->|"starts training"| node_trainer
node_trainer -->|"builds dataloader"| node_readers
node_readers -->|"supplies samples"| node_transforms
node_trainer -->|"trains model"| node_architecture
node_architecture -->|"uses video model"| node_video_backbone
node_architecture -->|"uses action model"| node_action_backbone
node_architecture -.->|"uses language vision"| node_vlm_backbone
node_trainer -->|"saves state"| node_checkpointing
node_server -->|"loads checkpoint"| node_model_loader
node_model_loader -->|"constructs model"| node_architecture
node_server -->|"handles requests"| node_engine
node_server -->|"initializes policy"| node_policy
node_engine -->|"invokes generation"| node_architecture
node_robot -->|"sends observations"| node_server
node_server -->|"returns actions"| node_robot

click node_readers "https://github.com/OpenWAM-Official/OpenWAM/tree/main/openwam/dataloader"
click node_transforms "https://github.com/OpenWAM-Official/OpenWAM/tree/main/openwam/dataloader/transforms"
click node_trainer "https://github.com/OpenWAM-Official/OpenWAM/blob/main/openwam/train/openwam_trainer.py"
click node_train_entry "https://github.com/OpenWAM-Official/OpenWAM/blob/main/scripts/train.py"
click node_checkpointing "https://github.com/OpenWAM-Official/OpenWAM/blob/main/openwam/train/utils/checkpointing.py"
click node_architecture "https://github.com/OpenWAM-Official/OpenWAM/tree/main/openwam/model/architectures"
click node_video_backbone "https://github.com/OpenWAM-Official/OpenWAM/tree/main/openwam/model/video_backbone"
click node_action_backbone "https://github.com/OpenWAM-Official/OpenWAM/tree/main/openwam/model/action_backbone"
click node_vlm_backbone "https://github.com/OpenWAM-Official/OpenWAM/tree/main/openwam/model/vlm_backbone"
click node_model_loader "https://github.com/OpenWAM-Official/OpenWAM/blob/main/openwam/deploy/model_loader.py"
click node_engine "https://github.com/OpenWAM-Official/OpenWAM/blob/main/openwam/deploy/engine.py"
click node_policy "https://github.com/OpenWAM-Official/OpenWAM/blob/main/openwam/deploy/policy.py"
click node_server "https://github.com/OpenWAM-Official/OpenWAM/blob/main/openwam/deploy/server.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_readers,node_transforms toneBlue
class node_architecture,node_video_backbone,node_action_backbone,node_vlm_backbone,node_data_sources toneAmber
class node_trainer,node_train_entry,node_checkpointing toneMint
class node_model_loader,node_engine,node_policy,node_server toneRose
class node_robot toneIndigo
```

## Components

### Data preparation

- [Dataset readers](https://github.com/OpenWAM-Official/OpenWAM/tree/main/openwam/dataloader): `openwam/dataloader`
- [Modality transforms](https://github.com/OpenWAM-Official/OpenWAM/tree/main/openwam/dataloader/transforms): `openwam/dataloader/transforms`

### Model components

- [WAM architectures](https://github.com/OpenWAM-Official/OpenWAM/tree/main/openwam/model/architectures): `openwam/model/architectures`
- [Video backbones](https://github.com/OpenWAM-Official/OpenWAM/tree/main/openwam/model/video_backbone): `openwam/model/video_backbone`
- [Action backbone](https://github.com/OpenWAM-Official/OpenWAM/tree/main/openwam/model/action_backbone): `openwam/model/action_backbone`
- [VLM backbone](https://github.com/OpenWAM-Official/OpenWAM/tree/main/openwam/model/vlm_backbone): `openwam/model/vlm_backbone`

### Training

- [WAM trainer](https://github.com/OpenWAM-Official/OpenWAM/blob/main/openwam/train/openwam_trainer.py): `openwam/train/openwam_trainer.py`
- [Training entry](https://github.com/OpenWAM-Official/OpenWAM/blob/main/scripts/train.py): `scripts/train.py`
- [Checkpoint utilities](https://github.com/OpenWAM-Official/OpenWAM/blob/main/openwam/train/utils/checkpointing.py): `openwam/train/utils/checkpointing.py`

### Policy deployment

- [Checkpoint loader](https://github.com/OpenWAM-Official/OpenWAM/blob/main/openwam/deploy/model_loader.py): `openwam/deploy/model_loader.py`
- [Inference engine](https://github.com/OpenWAM-Official/OpenWAM/blob/main/openwam/deploy/engine.py): `openwam/deploy/engine.py`
- [Receding-horizon policy](https://github.com/OpenWAM-Official/OpenWAM/blob/main/openwam/deploy/policy.py): `openwam/deploy/policy.py`
- [WebSocket server](https://github.com/OpenWAM-Official/OpenWAM/blob/main/openwam/deploy/server.py): `openwam/deploy/server.py`

### Other components

- **Episode data**
- **Robot controller**

## Connections

- Episode data → Dataset readers: provides episodes
- Training entry → WAM trainer: starts training
- WAM trainer → Dataset readers: builds dataloader
- Dataset readers → Modality transforms: supplies samples
- WAM trainer → WAM architectures: trains model
- WAM architectures → Video backbones: uses video model
- WAM architectures → Action backbone: uses action model
- WAM architectures → VLM backbone: uses language vision
- WAM trainer → Checkpoint utilities: saves state
- WebSocket server → Checkpoint loader: loads checkpoint
- Checkpoint loader → WAM architectures: constructs model
- WebSocket server → Inference engine: handles requests
- WebSocket server → Receding-horizon policy: initializes policy
- Inference engine → WAM architectures: invokes generation
- Robot controller → WebSocket server: sends observations
- WebSocket server → Robot controller: returns actions
