# siyuhsu/vla-cache architecture

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

- Interactive diagram: https://gitdiagram.com/siyuhsu/vla-cache
- Repository: https://github.com/siyuhsu/vla-cache

## Overview

VLA-Cache is a training-free acceleration layer for OpenVLA and OpenVLA-OFT robot policies: during evaluation, it reuses visual-token key/value computations when frames are unchanged, aiming to speed inference with minimal accuracy loss. The documented user path is checkpoint download, then LIBERO evaluation with caching enabled or disabled. The repository also contains model, dataset, and fine-tuning subsystems. Several links beyond the sampled evaluation and utility references are dashed because their implementation was not excerpted.

Main entry points: [`src/openvla/experiments/robot/libero/run_libero_eval.py`](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/experiments/robot/libero/run_libero_eval.py) (OpenVLA LIBERO Eval), [`src/openvla-oft/experiments/robot/libero/run_libero_eval.py`](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla-oft/experiments/robot/libero/run_libero_eval.py) (OFT LIBERO Eval), [`src/openvla/prismatic/extern/hf/modeling_prismatic.py`](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/prismatic/extern/hf/modeling_prismatic.py) (OpenVLA Action Model), [`src/openvla-oft/vla-scripts/finetune.py`](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla-oft/vla-scripts/finetune.py) (OFT Fine-Tuning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_model["VLA Models"]
  node_openvla_model["OpenVLA Action Model"]
  node_oft_model["OFT Action Model"]
  node_processor["Image Text Processor"]
  node_model_config["Model Configuration"]
  node_action_tokenizer["Action Tokenizer"]
  node_oft_heads["Action Heads<br/>[action_heads.py]"]
end

subgraph group_data["Data and Training"]
  node_rlds["RLDS Datasets<br/>[dataset.py]"]
  node_open_finetune["OpenVLA Fine-Tuning<br/>[finetune.py]"]
  node_oft_finetune["OFT Fine-Tuning<br/>[finetune.py]"]
end

subgraph group_eval["Robot Evaluation"]
  node_openvla_eval["OpenVLA LIBERO Eval<br/>[run_libero_eval.py]"]
  node_oft_eval["OFT LIBERO Eval<br/>[run_libero_eval.py]"]
  node_openvla_utils["OpenVLA Policy Utils<br/>[openvla_utils.py]"]
  node_robot_utils["Robot Utilities<br/>[robot_utils.py]"]
  node_libero_utils["LIBERO Tasks<br/>[libero_utils.py]"]
  node_robot_env["Robot Environment"]
end

subgraph group_cache["Adaptive Caching"]
  node_cache_utils["OpenVLA Cache Hooks<br/>[vla_cache_utils.py]"]
  node_oft_cache["OFT Cache Hooks<br/>[vla_cache_utils.py]"]
end

node_user(("Robot Developer"))
node_checkpoint["Model Checkpoint"]

node_user -->|"downloads"| node_checkpoint
node_user -->|"runs evaluation"| node_openvla_eval
node_user -->|"runs evaluation"| node_oft_eval
node_checkpoint -.->|"loads checkpoint"| node_openvla_eval
node_checkpoint -.->|"loads checkpoint"| node_oft_eval
node_openvla_eval -->|"uses policy utilities"| node_openvla_utils
node_openvla_eval -->|"uses robot utilities"| node_robot_utils
node_openvla_eval -->|"uses task utilities"| node_libero_utils
node_oft_eval -->|"uses robot utilities"| node_robot_utils
node_oft_eval -->|"uses task utilities"| node_libero_utils
node_openvla_utils -->|"uses cache hooks"| node_cache_utils
node_oft_eval -.->|"uses cache hooks"| node_oft_cache
node_openvla_eval -.->|"runs policy"| node_openvla_model
node_oft_eval -.->|"runs policy"| node_oft_model
node_openvla_model -.->|"consumes inputs"| node_processor
node_openvla_model -->|"uses configuration"| node_model_config
node_open_finetune -->|"loads training data"| node_rlds
node_open_finetune -.->|"fine-tunes model"| node_openvla_model
node_oft_finetune -->|"trains action heads"| node_oft_heads
node_oft_finetune -->|"loads training data"| node_rlds
node_oft_finetune -->|"uses tokenizer"| node_action_tokenizer
node_openvla_eval -.->|"evaluates in"| node_robot_env
node_oft_eval -.->|"evaluates in"| node_robot_env

click node_openvla_eval "https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/experiments/robot/libero/run_libero_eval.py"
click node_oft_eval "https://github.com/siyuhsu/vla-cache/blob/main/src/openvla-oft/experiments/robot/libero/run_libero_eval.py"
click node_openvla_utils "https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/experiments/robot/openvla_utils.py"
click node_robot_utils "https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/experiments/robot/robot_utils.py"
click node_libero_utils "https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/experiments/robot/libero/libero_utils.py"
click node_robot_env "https://github.com/siyuhsu/vla-cache/tree/main/src/openvla/experiments/robot/libero"
click node_cache_utils "https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/experiments/robot/vla_cache_utils.py"
click node_oft_cache "https://github.com/siyuhsu/vla-cache/blob/main/src/openvla-oft/experiments/robot/vla_cache_utils.py"
click node_openvla_model "https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/prismatic/extern/hf/modeling_prismatic.py"
click node_oft_model "https://github.com/siyuhsu/vla-cache/blob/main/src/openvla-oft/prismatic/extern/hf/modeling_prismatic.py"
click node_processor "https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/prismatic/extern/hf/processing_prismatic.py"
click node_model_config "https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/prismatic/extern/hf/configuration_prismatic.py"
click node_rlds "https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/prismatic/vla/datasets/rlds/dataset.py"
click node_action_tokenizer "https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/prismatic/vla/action_tokenizer.py"
click node_open_finetune "https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/vla-scripts/finetune.py"
click node_oft_finetune "https://github.com/siyuhsu/vla-cache/blob/main/src/openvla-oft/vla-scripts/finetune.py"
click node_oft_heads "https://github.com/siyuhsu/vla-cache/blob/main/src/openvla-oft/prismatic/models/action_heads.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_openvla_model,node_oft_model,node_processor,node_model_config,node_action_tokenizer,node_oft_heads toneBlue
class node_rlds,node_open_finetune,node_oft_finetune toneAmber
class node_openvla_eval,node_oft_eval,node_openvla_utils,node_robot_utils,node_libero_utils,node_robot_env toneMint
class node_cache_utils,node_oft_cache toneRose
class node_user,node_checkpoint toneIndigo
```

## Components

### VLA Models

- [OpenVLA Action Model](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/prismatic/extern/hf/modeling_prismatic.py): `src/openvla/prismatic/extern/hf/modeling_prismatic.py`
- [OFT Action Model](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla-oft/prismatic/extern/hf/modeling_prismatic.py): `src/openvla-oft/prismatic/extern/hf/modeling_prismatic.py`
- [Image Text Processor](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/prismatic/extern/hf/processing_prismatic.py): `src/openvla/prismatic/extern/hf/processing_prismatic.py`
- [Model Configuration](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/prismatic/extern/hf/configuration_prismatic.py): `src/openvla/prismatic/extern/hf/configuration_prismatic.py`
- [Action Tokenizer](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/prismatic/vla/action_tokenizer.py): `src/openvla/prismatic/vla/action_tokenizer.py`
- [Action Heads](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla-oft/prismatic/models/action_heads.py): `src/openvla-oft/prismatic/models/action_heads.py`

### Data and Training

- [RLDS Datasets](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/prismatic/vla/datasets/rlds/dataset.py): `src/openvla/prismatic/vla/datasets/rlds/dataset.py`
- [OpenVLA Fine-Tuning](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/vla-scripts/finetune.py): `src/openvla/vla-scripts/finetune.py`
- [OFT Fine-Tuning](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla-oft/vla-scripts/finetune.py): `src/openvla-oft/vla-scripts/finetune.py`

### Robot Evaluation

- [OpenVLA LIBERO Eval](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/experiments/robot/libero/run_libero_eval.py): `src/openvla/experiments/robot/libero/run_libero_eval.py`
- [OFT LIBERO Eval](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla-oft/experiments/robot/libero/run_libero_eval.py): `src/openvla-oft/experiments/robot/libero/run_libero_eval.py`
- [OpenVLA Policy Utils](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/experiments/robot/openvla_utils.py): `src/openvla/experiments/robot/openvla_utils.py`
- [Robot Utilities](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/experiments/robot/robot_utils.py): `src/openvla/experiments/robot/robot_utils.py`
- [LIBERO Tasks](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/experiments/robot/libero/libero_utils.py): `src/openvla/experiments/robot/libero/libero_utils.py`
- [Robot Environment](https://github.com/siyuhsu/vla-cache/tree/main/src/openvla/experiments/robot/libero): `src/openvla/experiments/robot/libero`

### Adaptive Caching

- [OpenVLA Cache Hooks](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla/experiments/robot/vla_cache_utils.py): `src/openvla/experiments/robot/vla_cache_utils.py`
- [OFT Cache Hooks](https://github.com/siyuhsu/vla-cache/blob/main/src/openvla-oft/experiments/robot/vla_cache_utils.py): `src/openvla-oft/experiments/robot/vla_cache_utils.py`

### Other components

- **Robot Developer**
- **Model Checkpoint**

## Connections

- Robot Developer → Model Checkpoint: downloads (evidence: `README.md`)
- Robot Developer → OpenVLA LIBERO Eval: runs evaluation (evidence: `README.md`)
- Robot Developer → OFT LIBERO Eval: runs evaluation (evidence: `README.md`)
- Model Checkpoint → OpenVLA LIBERO Eval: loads checkpoint
- Model Checkpoint → OFT LIBERO Eval: loads checkpoint
- OpenVLA LIBERO Eval → OpenVLA Policy Utils: uses policy utilities (evidence: `src/openvla/experiments/robot/libero/run_libero_eval.py`)
- OpenVLA LIBERO Eval → Robot Utilities: uses robot utilities (evidence: `src/openvla/experiments/robot/libero/run_libero_eval.py`)
- OpenVLA LIBERO Eval → LIBERO Tasks: uses task utilities (evidence: `src/openvla/experiments/robot/libero/run_libero_eval.py`)
- OFT LIBERO Eval → Robot Utilities: uses robot utilities (evidence: `src/openvla-oft/experiments/robot/libero/run_libero_eval.py`)
- OFT LIBERO Eval → LIBERO Tasks: uses task utilities (evidence: `src/openvla-oft/experiments/robot/libero/run_libero_eval.py`)
- OpenVLA Policy Utils → OpenVLA Cache Hooks: uses cache hooks (evidence: `src/openvla/experiments/robot/openvla_utils.py`)
- OFT LIBERO Eval → OFT Cache Hooks: uses cache hooks
- OpenVLA LIBERO Eval → OpenVLA Action Model: runs policy
- OFT LIBERO Eval → OFT Action Model: runs policy
- OpenVLA Action Model → Image Text Processor: consumes inputs
- OpenVLA Action Model → Model Configuration: uses configuration (evidence: `src/openvla/prismatic/extern/hf/modeling_prismatic.py`)
- OpenVLA Fine-Tuning → RLDS Datasets: loads training data (evidence: `src/openvla/vla-scripts/finetune.py`)
- OpenVLA Fine-Tuning → OpenVLA Action Model: fine-tunes model (evidence: `src/openvla/vla-scripts/finetune.py`)
- OFT Fine-Tuning → Action Heads: trains action heads (evidence: `src/openvla-oft/vla-scripts/finetune.py`)
- OFT Fine-Tuning → RLDS Datasets: loads training data (evidence: `src/openvla-oft/vla-scripts/finetune.py`)
- OFT Fine-Tuning → Action Tokenizer: uses tokenizer (evidence: `src/openvla-oft/vla-scripts/finetune.py`)
- OpenVLA LIBERO Eval → Robot Environment: evaluates in (evidence: `src/openvla/experiments/robot/libero/run_libero_eval.py`)
- OFT LIBERO Eval → Robot Environment: evaluates in (evidence: `src/openvla-oft/experiments/robot/libero/run_libero_eval.py`)
