File size: 3,081 Bytes
7469b2c
 
3aa087b
 
 
 
 
7469b2c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3aa087b
7469b2c
3aa087b
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# X-VLA evaluation harness

Two kinds of evaluation live here, separate from the fixed timing harness
`benchmark/run_benchmark.py`. Every script takes `--weights <checkpoint dir>`;
without it, `$XVLA_WEIGHTS_DIR` or the Hugging Face snapshot of `$HF_MODEL`
(default `lerobot/xvla-base`) at `$TT_WEIGHTS_REVISION` is used. The measurement
scripts behind the model card are in `scripts/` (`scripts/README.md`).

## 1. Relative PCC — implementation fidelity vs torch fp32 reference

What it answers: *how much numerical error did the TT-NN port introduce,
holding the algorithm fixed?* Differs from `run_benchmark.py`'s PCC line
in that both the reference and the test run use the same
`num_denoising_steps` (default 10), so only precision/implementation
differences show up.

```
python3 eval/eval_relative_pcc.py \
  --backends torch_cpu,ttnn \
  --steps 10 \
  --seeds 5
```

Prints, per backend: mean / min PCC vs the fp32 torch reference, plus
max abs error on the action chunk. A healthy port is `>= 99.9%` mean PCC.

## 2. GT-dataset evaluation — action prediction error on real data

What it answers: *how well does the model match real robot actions from
a LeRobot dataset?* Input observations are taken from the dataset (so
we exercise real images and state vectors), and predicted action chunks
are compared to the dataset's ground-truth future actions.

```
# LIBERO image benchmark, 100 samples, torch fp32 reference + ttnn port
python3 eval/eval_gt_dataset.py \
  --dataset lerobot/libero_10_image \
  --num-samples 100 \
  --backends torch_cpu,ttnn
```

Metrics reported per backend:
- **MSE** and **MAE** of the predicted action chunk vs GT.
- **Per-action-step degradation** (bucketed: 1st action vs chunk-end).
- **Backend delta**: MAE(ttnn) - MAE(torch_cpu_fp32) — the portion of
  the error attributable to the port vs the model itself.

Pass `--rename-images` to map your dataset's image keys to the X-VLA
schema (`observation.images.image{,2,3}`). Two forms are accepted:

- **Short form** — rewrites the image-key SUFFIX:
  `--rename-images top=image,wrist=image2,left_wrist=image3`
  (`observation.images.top` -> `observation.images.image`, etc.)
- **Full form** — dots in either side map full keys, including
  duplicating a single camera into multiple X-VLA slots:
  `--rename-images observation.image=observation.images.image,observation.image=observation.images.image2,observation.image=observation.images.image3`

Example (pusht — single-view dataset, populate all 3 X-VLA views from
the same camera):

```
python3 eval/eval_gt_dataset.py \
  --dataset lerobot/pusht_image \
  --num-samples 100 --steps 10 --backends torch_cpu,ttnn \
  --rename-images 'observation.image=observation.images.image,observation.image=observation.images.image2,observation.image=observation.images.image3'
```

Note that base X-VLA was NOT fine-tuned on pusht, so absolute MAE will
be large. The useful signal is the delta between backends.

## Not included

Closed-loop task success in a simulator (LIBERO, ALOHA sim, robosuite) is not
measured by these scripts.