# Repository Briefing: DANG-ai/ScreenSpot-Efficiency-Code
> Source: https://repoforai.com/repo/DANG-ai/ScreenSpot-Efficiency-Code (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/DANG-ai/ScreenSpot-Efficiency-Code
- **Official Docs / Website**: https://dang-ai.github.io/ScreenSpot-Efficiency/
- **Category**: LLMs & Inference (大模型与推理微调)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: B+ (67/100 · Maintenance 35/35 · Adoption 1/25 · Releases 11/20 · License 20/20)
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: GPU, CLI, API
- **Momentum**: 26 ★ total (+18 24h / +26 7d) · 0 forks
- **When to Use**: Best for: Evaluating whether GUI grounding models can locate targets accurately and quickly relative to expert completion times, with per-sample traces for investigating regressions. Skip if: You need full GUI task completion, concurrent serving throughput, or only a quick static-accuracy check without downloading the SS-E recordings.

## Overview
```text
### Architecture & Core Mechanics
ScreenSpot-Efficiency (SS-E) separates model serving from evaluation. `serve_h200.py` starts the local checkpoint server; `run_test.py` drives the benchmark, judges responses, and writes JSONL. The file tree separates model-family code under `families/`, judging code under `judges/`, and serving environments under `environments/`. `requirements.txt` lists `av`, `Pillow`, `jinja2`, `pyarrow>=14`, and `huggingface-hub>=0.24`; the SS-E input path uses Hugging Face test-split Parquet shards.

The API boundary lets the same runner work with an external OpenAI-compatible service via `--endpoint` and `--served-model-name`. Compatibility extends beyond the request schema: the service must preserve the model's required trailing marker, and MolmoPoint-GUI responses must expose `native_parse.points_rel`, `native_parse.parse_ok`, and `native_parse.no_action`. Check that contract before running the full suite; otherwise, parser behavior can be mistaken for model performance.

### Key Capabilities & Differentiators
SS-E covers 9,160 GUI grounding tasks from real screen recordings across 36 scenario types. Each task pairs an instruction with target geometry, timing annotations, and an expert completion time. H-GATE scores grounding accuracy and latency against the expert time for each task. The runner also reports accuracy, spatial accuracy, mean latency, and Acc@Human, and writes the sample ID, verdict, latency in milliseconds, and request trace to JSONL for each sample and run.

The same harness supports ScreenSpot-v2, ScreenSpot-Pro, OSWorld-G, and VisualWebBench. Set `--benchmark` on both server and client and point the client at a local dataset directory containing `annotations/` and `images/`. Human-referenced metrics for these datasets require `human_mean_ms` or `human_mean` in the annotations, or `--human-times` with a JSON mapping from sample IDs to expert times in milliseconds.

### Trade-offs & Limitations
Compared with evaluating ScreenSpot-v2 or ScreenSpot-Pro solely on static localization accuracy, SS-E can distinguish models that locate the same targets correctly but take different amounts of time relative to an expert. That extra signal costs more to collect: the dataset needs about 26 GB, and five sequential runs are the default. Use `--runs 1` for a smoke test and a fresh output filename for each invocation. Keep one request active during timing; this setup measures latency, not concurrent serving throughput.

An external API avoids running the model server locally, but network and service overhead can affect the comparison. Hold the serving path and request policy constant when comparing latency, and verify that the API preserves the parser fields and markers the benchmark expects. Local serving gives you more control over those variables but requires managing the checkpoint and its environment. The H200 example establishes neither a minimum GPU nor an exact VRAM requirement.

### Hardware & Deployment Guide
Run `python run_test.py --list-models` to check the supported model, mode, checkpoint, and environment combinations. Keep each serving stack in a separate Python 3.12 environment, except `tars073`, which uses Python 3.11. The concrete local example installs `environments/qwen017.txt` alongside `requirements.txt`, starts `qwen35_9B` in `no_think` mode on one NVIDIA H200, and runs the client separately with the same environment and checkpoint path. No project release is listed, so pin the repository revision when comparing runs over time.

Allow about 26 GB of disk space for SS-E. The runner downloads the Hugging Face test split on first use and reuses the cached shards; `--data-dir` can point to an existing snapshot containing `data/test-*.parquet`. Install the base requirements and use `--check-inputs` to verify sample IDs, annotations, and judging rules without a GPU. If inference already runs on a compatible service, use the endpoint flags rather than bringing up the local GPU server.
```

## Key Capabilities
```text
- Dataset: 9,160 GUI grounding tasks from real screen recordings across 36 scenario types, with target geometry, timing annotations, and expert completion times.
- Metrics: H-GATE evaluates grounding accuracy and latency against task-level expert times; the runner also reports accuracy, spatial accuracy, mean latency, and Acc@Human.
- Inference boundary: `run_test.py` can use the local server started by `serve_h200.py` or an external OpenAI-compatible endpoint that preserves the required response details.
- Run artifacts: JSONL records the sample ID, verdict, millisecond latency, and request trace for each sample and run; the default is five sequential runs.
- Input validation: `--check-inputs` checks sample IDs, annotations, and judging rules without a GPU; cached Parquet shards can be reused across runs.
- Static benchmarks: ScreenSpot-v2, ScreenSpot-Pro, OSWorld-G, and VisualWebBench share a benchmark selector and accept separately supplied expert times.
```

## Quick Start / Clone
```bash
git clone https://github.com/DANG-ai/ScreenSpot-Efficiency-Code.git
cd ScreenSpot-Efficiency-Code
python run_test.py --list-models
```
