|
Download code/scripts/README.md from changh95/xvla-base-p150: direct link, hf CLI and curl.
- Browser
- Download file 2.04 kB
-
https://huggingface.co/changh95/xvla-base-p150/resolve/main/code/scripts/README.md
- Command line
-
hf download hf://changh95/xvla-base-p150/code/scripts/README.md
-
curl -L -o README.md https://huggingface.co/changh95/xvla-base-p150/resolve/main/code/scripts/README.md
2.04 kB
| # Measurement scripts | |
| The scripts behind the speed and agreement figures of the model card. Paths are relative to | |
| `code/`; inside the image the code is at `/opt/tt-metal/`. | |
| | script | needs | what it measures | | |
| | --- | --- | --- | | |
| | `bench_p150.py` | the device | boots what the server boots (its lifespan: weights, on-chip modules, warm-up, trace capture), then times back-to-back replays of the two metal traces, `policy.predict_action_chunk(batch)` with a split by stage, and the request handler called in-process | | |
| | `bench_http.py` | a running server | `POST /predict` latency over one keep-alive connection: client round trip and the server's `timing_ms` | | |
| | `extract_samples.py` | `pyarrow`, local dataset files | picks frames, instructions, states and ground-truth action chunks from a LeRobot v3 dataset | | |
| | `eval_agreement.py` | a running server (`served`), CPU only (`reference`) | action chunks of the served port and of the upstream LeRobot X-VLA in float32 on the CPU for the same samples, seeds and noise; `compare` reports PCC, MSE, max difference and the error against ground truth | | |
| ```bash | |
| # speed, in the image with the device (the serve environment of the manifest) | |
| python -u scripts/bench_p150.py --image media/pusht_synthetic.png --steps 1,10 --out bench_p150.json | |
| python scripts/bench_http.py --url http://127.0.0.1:<port> --image media/pusht_synthetic.png --steps 1,10 --n 200 --out bench_http.json | |
| # agreement on public frames (lerobot/libero_10_image, lerobot/pusht_image) | |
| python -I scripts/extract_samples.py --dataset-dir <libero_10_image dir> --out samples_libero \ | |
| --views observation.images.image,observation.images.image,observation.images.wrist_image --per-episode 10 | |
| python scripts/eval_agreement.py served --url http://127.0.0.1:<port> --samples samples_libero --steps 1,10 --out tt.npz | |
| python scripts/eval_agreement.py reference --samples samples_libero --steps 1,10 --out ref.npz | |
| python scripts/eval_agreement.py compare --test tt.npz --ref ref.npz --samples samples_libero --out metrics.json | |
| ``` | |