Skip to content

ocr: lighton-ocr3-live.py, LightOnOCR-3 with a live view of the run (experimental) - #191

Merged
davanstrien merged 5 commits into
mainfrom
ocr/lighton-ocr3-live
Nov 11, 2026
Merged

davanstrien merged 5 commits into
mainfrom
ocr/lighton-ocr3-live

Conversation

@davanstrien

Copy link
Copy Markdown
Owner

An experimental LightOnOCR-3 recipe with a live view of the run. lighton-ocr3-saturate.py is not changed and stays the recipe for normal runs.

What it does

  • Same OCR, flags and output as lighton-ocr3-saturate.py (the OCR code is a copy), with saturate pinned to 0.3.1.
  • --live-port serves a page from inside the Job. Each finished page moves past on a belt, and the belt moves at the rate the pages finish. Under it: the pages read a second, the model and GPU, the page count, and the text the model wrote for one recent page.
  • ?view=single on the same link shows one page at a time, each laid on the last at the same pace, with that page's text beside it.
  • A page is drawn only after its text came back, about 1.5 seconds later. The rate is the pages finished in the last 10 seconds; after the run it is the average over the reading time.
  • The header picks rtx-pro-6000. The Job, and the page, end 20 seconds after the run.
hf jobs uv run --detach --expose-public 7860 \
    https://huggingface.co/datasets/uv-scripts/ocr/raw/main/lighton-ocr3-live.py \
    <input-dataset> <output-dataset> --live-port 7860

Cost of the live view

One 480 px JPEG per page in the preparation threads, and one small request per open tab every half second. It does not change what is sent to the model or what is written.

Measured

One run with the live view open, on one rtx-pro-6000: 14,483 typed pages (about 780 output tokens a page) in 1,881 s, 7.7 pages a second, 0 error rows. saturate reported the engine as the limit in 910 of 911 samples. That run fed pages from multi-page TIFFs with a one-off source and this recipe's settings; it is not the committed file.

A run of the first version on 2,724 dense pages from a 1771 encyclopaedia read 1.5 pages a second and was input-bound, so the belt is slow on material like that.

Checks

  • Smoke Job with the committed file (0c07326), header only, 60 rows: 60 of 60, 0 error rows, every finish_reason stop. During the run the page, ?view=single, a page image and the feed were fetched and were correct. Record in maintenance/verifications.jsonl.
  • tools/build-catalog.py --verify-models and tools/recipe-status.py --check pass. ruff check passes.

Known gaps

  • The command that Run on Jobs generates for this recipe has --live-port but not --expose-public, so the page is not reachable from that command as written. unlimited-ocr2-live.py has the same gap.
  • The single view scales the 480 px image up, so the page is soft at full height.
  • No independent review yet.

🤖 Generated with Claude Code

https://claude.ai/code/session_016isSPqmhWLsJ9njKL2JUSQ

davanstrien and others added 5 commits November 10, 2026 18:07
…pages (experimental)

Same OCR, flags and output as lighton-ocr3-saturate.py, plus --live-port: a page
served from the Job that shows each finished page moving past at the rate the
pages finish, pages per second, one finished page with its text, and counters.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016isSPqmhWLsJ9njKL2JUSQ
…entences, one text sample)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016isSPqmhWLsJ9njKL2JUSQ
…its text

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016isSPqmhWLsJ9njKL2JUSQ
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016isSPqmhWLsJ9njKL2JUSQ
@davanstrien
davanstrien merged commit f3b0ec8 into main Nov 11, 2026
1 check passed
@davanstrien
davanstrien deleted the ocr/lighton-ocr3-live branch November 11, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant