# TaskVerdict lab — replication pack (runs 1 and 2)

Published 2026-10-09 so anyone can re-run our Cloudflare Workers AI benchmarks. Cloudflare's Self-Serve Subscription Agreement §2.2.2 lets customers publish benchmark results, but only if the publisher makes available "all information necessary to replicate such benchmark tests". This pack is that information. It contains no account data.

Integrity: [`SHA256SUMS`](/lab/replication/SHA256SUMS) lists the sha256 of every file in the pack (everything under `/lab/`, paths relative to `/lab/`). [`served-files.json`](/lab/replication/served-files.json) maps **every** file listed in the run 1 and run 2 manifests (101 + 11) to the public URL that serves those exact bytes, so every manifest hash can be checked.

Licence: our own listed data and docs (see [Licence](#licence) below) are **CC BY 4.0**, our code is **MIT**, and model/vendor outputs are **not** covered by our licence. See [`/lab/LICENSE`](/lab/LICENSE) and the section [Licence](#licence) below.

## How to re-run (exact commands)
Tested from a fresh copy of the pack on Linux with Python 3.13.5 and Tesseract 5.5.0. Run every command from the folder you download into.

```sh
# 1. Download the whole pack (about 33 MB, 146 files) and check every hash
mkdir taskverdict-pack && cd taskverdict-pack
curl -fsSL https://taskverdict.com/lab/replication/FILES.txt | sed 's|^|https://taskverdict.com|' | wget -q -x -nH -i -
(cd lab && sha256sum -c --quiet replication/SHA256SUMS) && echo "all hashes OK"

# 2. Python dependencies, pinned (whisper-normalizer is required for WER)
python3 -m venv .venv && . .venv/bin/activate
pip install -r lab/code/requirements.txt
# OCR also needs Tesseract 5.5.0 (system package), e.g.: sudo apt install tesseract-ocr tesseract-ocr-eng

# 3. Run 1 STT: WER of the three published Whisper transcripts against the reference
python3 lab/code/replicate.py wer

# 4. Runs 1 and 2 OCR: score the published images, then compare with the published OCR text and medians
python3 lab/code/ocr_scorer.py score --input lab/runs/lab1-20261008T2035Z/images --suite lab/suites/image_exact_text.v0.1.json --out rescore --plan-tier replication
python3 lab/code/ocr_scorer.py score --input lab/runs/lab2-20261009T0326Z/images --suite lab/suites/image_exact_text.v0.1.json --out rescore --plan-tier replication
python3 lab/code/replicate.py ocr --rescored rescore
```

- `replicate.py` exits 0 only if every number matches. `replicate.py wer` refuses to run without `whisper-normalizer`: the built-in fallback normaliser gives different WER (about 7.9 / 9.1 / 11.3 % instead of 2.30 / 3.01 / 5.34 %).
- OCR takes a few seconds per image (9 Tesseract passes each). Other Tesseract or Pillow versions can read slightly different text; `replicate.py ocr` tells you which images differ.
- Re-generating the images or transcripts needs your own Cloudflare account and calls the models live (see the tables below). Hosted models can change server-side, so treat a hash mismatch as a model change, not as an error on your side.

## Deviations from the written protocol (read this)
- **One reviewer, not two.** The suite file (`count_rules`, frozen and hash-referenced by the archived runs, so not edited) and the STT answer key (`hallucination_rule`) say "two raters". For runs 1 and 2, **one lab reviewer** made every visual check (exact text and IMG-02 counts) and nobody double-checked them. Each run's `visual_review.json` says so. `ocr_scorer.py finalize` (the two-rater step) was not used for these runs.
- The STT seeded-fact recall in run 1 was checked by the same single reviewer.

## Image exact-text suite (run 1 and run 2)
- Suite: [`/lab/suites/image_exact_text.v0.1.json`](/lab/suites/image_exact_text.v0.1.json). It holds the prompts (byte-exact, each with its `prompt_sha256`), the expected text and counts, the counting rules and the protocol.
- Endpoint: Workers AI `env.AI.run(<model>, inputs)` (REST: `POST /accounts/<your account>/ai/run/<model>`), called with each model's defaults plus the inputs listed below. One request per image, no retries. The first 3 images are kept.

| Run | Model | Inputs sent besides `prompt` | Tasks |
|---|---|---|---|
| 1 | `@cf/black-forest-labs/flux-2-klein-4b` | `width=1024, height=1024, seed=101/202/303` (rep 1/2/3) | IMG-02, IMG-03, IMG-04 |
| 1 | `@cf/black-forest-labs/flux-1-schnell` | none. The schema has no seed, so its outputs are **not** seed-reproducible. | IMG-02, IMG-03, IMG-04 |
| 1 | `@cf/stabilityai/stable-diffusion-xl-base-1.0` | `width=1024, height=1024, seed=101/202/303` | IMG-02, IMG-03, IMG-04 |
| 1 | `@cf/bytedance/stable-diffusion-xl-lightning` | `width=1024, height=1024, seed=101/202/303` | IMG-02, IMG-03, IMG-04 |
| 2 | `@cf/leonardo/phoenix-1.0` | `width=1024, height=1024, seed=101/202/303` | IMG-03 |

- Scoring:
  - OCR uses [`/lab/code/ocr_scorer.py`](/lab/code/ocr_scorer.py) (Tesseract, 9 passes, character accuracy after normalisation). Commands: [How to re-run](#how-to-re-run-exact-commands).
  - Counting (IMG-02) and the final exact-text verdict come from a visual check by one lab reviewer. The per-image verdicts are in each run's `visual_review.json` on its run page.
- Even with the same seed, hosted models can change server-side. Compare your output hashes with ours, and treat a mismatch as a model or version change, not as an error on your side.

## STT-01-TTS (run 1)
Audio is a scripted, fictional 4-speaker meeting with synthetic voices (Kokoro-82M, Apache-2.0). It lasts 1428.6 s.

| File | What it is |
|---|---|
| [`script.txt`](/lab/assets/stt/STT-01/script.txt), [`turns.json`](/lab/assets/stt/STT-01/turns.json) | The script, as written and as turns |
| [`reference_transcript.txt`](/lab/assets/stt/STT-01/reference_transcript.txt), [`reference_plain.txt`](/lab/assets/stt/STT-01/reference_plain.txt) | Ground-truth transcript, with speakers and as plain text (the WER reference) |
| [`answer_key.json`](/lab/assets/stt/STT-01/answer_key.json) | The 12 seeded facts and the answer key |
| [`reference.rttm`](/lab/assets/stt/STT-01/reference.rttm), [`timeline.json`](/lab/assets/stt/STT-01/timeline.json) | Diarization ground truth |
| [`render_tts.py`](/lab/assets/stt/STT-01/render_tts.py), [`render_manifest.json`](/lab/assets/stt/STT-01/render_manifest.json), [`build_ground_truth.py`](/lab/assets/stt/STT-01/build_ground_truth.py) | Deterministic re-render: voices, speed, seed, and the model/voices/script sha256. The only change from our internal copy is that local paths are replaced by a `KOKORO_DIR` env var. |
| [`chunk_plan.json`](/lab/assets/stt/STT-01/chunk_plan.json) + chunks [`chunk00.mp3`](/lab/assets/stt/STT-01/chunks/chunk00.mp3) … [`chunk09.mp3`](/lab/assets/stt/STT-01/chunks/chunk09.mp3) ([list of all 10](/lab/assets/stt/STT-01/chunks/)) | **The exact audio bytes we sent**: 10 chunks cut on turn gaps. The sha256 values in `chunk_plan.json` match the files. |

- Models and inputs:
  - `@cf/openai/whisper-large-v3-turbo`: `{audio: <base64 of chunk>}`, language unset.
  - `@cf/openai/whisper`: `{audio: [byte array]}`.
  - `@cf/openai/whisper-tiny-en`: `{audio: [byte array]}`.
  - All three run with defaults, one request per chunk, and the texts are concatenated in chunk order.
- WER: `wer_whisper()` in [`/lab/code/checkers.py`](/lab/code/checkers.py) (Whisper-style English normaliser from `whisper-normalizer` 0.1.15, then word-level Levenshtein) against `reference_plain.txt`. Command: `python3 lab/code/replicate.py wer`.
- The 35 MB lossless `mix.flac` is not hosted here because it is over the static file size limit, and the chunks above are what was actually tested. The FLAC can be re-rendered with `render_tts.py`, or requested from lab@taskverdict.com.

## Not covered
- Deepgram models were not tested, because Deepgram's terms ban competitive benchmarking.
- FLUX.2 [dev] and FLUX.2 [klein] 9B are on hold (non-commercial weight licences).
- No consumer app was tested in these runs. All results are model-level.

## Run files
Each run folder under `/lab/runs/<run>/` serves its `manifest.json`, `summary.json`, `results.jsonl`, `visual_review.json`, the per-image OCR text (`ocr/`) and logs (`meta/`). Run 1 also serves the raw Whisper responses per chunk (`stt/raw/`), `stt/stt_log.jsonl` and `stt/audio_sanity.json`. Images and transcripts are served under `images/` and `transcripts/` rather than the manifest's `outputs/` and `stt/` paths: same bytes, see `served-files.json`.

## Licence
- **CC BY 4.0** ([legal code](https://creativecommons.org/licenses/by/4.0/legalcode)) covers our own data and docs: the prompt suite, the STT script, answer key, reference transcripts and ground truth, our scores, summaries, review verdicts, run metadata, this README and the index files. Credit "TaskVerdict" with a link to this page.
- **MIT** ([`/lab/code/LICENSE`](/lab/code/LICENSE)) covers our code: `/lab/code/*.py`, `render_tts.py` and `build_ground_truth.py`.
- **Not covered:** model outputs, i.e. the generated images, model transcripts and raw model responses, the OCR text read from those images, and the synthetic speech chunks. They are AI-generated, we claim no copyright in them, and we publish them only as test evidence. Any use of them stays subject to each model provider's or service's terms and to third-party rights. No trademark rights are granted.
- Full notice: [`/lab/LICENSE`](/lab/LICENSE).
