Back office ops · Production

Hugging Face OCRs 30,000 arXiv papers using Codex, Chandra-OCR 2, and Hugging Face Jobs

The problem

About 27,000 papers indexed on Hugging Face lacked HTML versions on arXiv, making it impossible for the HuggingChat 'chat with paper' feature to work for those papers.

Workflow diagram · grounded in source
1
Identify papers missing HTML
trigger
“about 27,000 papers indexed on Hugging Face do not have a corresponding HTML web page on arXiv, making it not possible to chat with those papers”
2
Codex writes OCR script
ai_action
“We simply asked OpenAI's Codex model (via the Codex Desktop app) to implement a script which runs Chandra-OCR-2 on the 27,000 arXiv IDs which currently have their Markdown version missing on the hub on Jobs. We point it to Chandra's mode…”
3
GPU cost benchmarking by Codex
ai_action
“I first asked Codex to do some comparisons on a small scale (120 papers) to see which GPUs to use and to estimate their costs. It did experiments on an Nvidia A10G-large as well as an Nvidia L40S GPU by launching jobs in parallel. It con…”
4
16 parallel OCR jobs launched
ai_action
“Codex spun up the 16 jobs and monitored their performance. No jobs had to be restarted, they all worked from the first try.”
5
Monitor job progress via Codex
ai_action
“I frequently asked Codex the same thing: "Great. Can you check the progress?". It then got back to me, telling me how many of the 16 parallel jobs had already finished.”
6
Merge results and publish
output
“I then asked it to merge the 16 buckets into a single one. Finally, Mishig integrated them into Paper Pages, so now you can chat with any paper on the hub, not just the ones which have an HTML version on arXiv!”
Reported outcome

All parallel OCR jobs completed in about a day, and the resulting Markdown versions were integrated into Paper Pages, enabling chat with any paper on the hub.

Reported metrics
papers OCR'd total30,000
papers missing HTML (batch size)27,000
Parallel jobs run16
Total processing time (16 parallel jobs)about 29-30 hours
Show all 10 reported metrics
papers OCR'd total30,000
papers missing HTML (batch size)27,000
parallel jobs run16
total processing time (16 parallel jobs)about 29-30 hours
estimated compute cost (L40S x16)about $850
processing rate on L40Sabout 60/hour
processing rate on A10G32/hour
alternative compute cost (A10G x16)about $1350
Chandra API cost (fast/balanced mode)$1,841.07
Chandra API cost (high-accuracy mode)$2,761.60
Reported stack
CodexChandra-OCR 2vLLMJobsHuggingChathf-mountXetCodex Desktop app
Source
https://huggingface.co/blog/nielsr/ocr-papers-jobs
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

All parallel OCR jobs completed in about a day, and the resulting Markdown versions were integrated into Paper Pages, enabling chat with any paper on the hub.

What tools did this team use?

Codex, Chandra-OCR 2, vLLM, Jobs, HuggingChat, hf-mount, Xet, Codex Desktop app.

What results were reported?

papers OCR'd total: 30,000; papers missing HTML (batch size): 27,000; Parallel jobs run: 16; Total processing time (16 parallel jobs): about 29-30 hours (source-reported, not independently verified).

How is this back office ops AI workflow structured?

Identify papers missing HTML → Codex writes OCR script → GPU cost benchmarking by Codex → 16 parallel OCR jobs launched → Monitor job progress via Codex → Merge results and publish.