mlboydaisuke commited on
Commit
097bcdf
·
verified ·
1 Parent(s): b1bc45a

Card: the fastest passing form on the phones, in place of the speed note

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -21,7 +21,7 @@ base_model_relation: quantized
21
 
22
  # Unlimited-OCR — LiteRT-LM (OCR)
23
 
24
- On a Galaxy S26 this file reads a page in 18–22 s on the CPU, engine creation included (2026-11-15). This repository is a conversion of [baidu/Unlimited-OCR](https://huggingface.co/baidu/Unlimited-OCR) to LiteRT-LM (`.litertlm`), made with [hf-to-litertlm](https://github.com/john-rocky/hf-to-litertlm) for Google's [LiteRT-LM](https://github.com/google-ai-edge/LiteRT-LM) (tested with 0.19.2, and one page with 0.19.1). Speed is still being tuned; faster forms will be published here as updates.
25
 
26
  [Unlimited-OCR](https://huggingface.co/baidu/Unlimited-OCR) (Baidu, 2026-06-22) is a 3.3B document-parsing model: a vision encoder (DeepEncoder: SAM ViT-B and CLIP-L, with a projector; 401M parameters) and a 12-layer DeepSeek-V2 text decoder (2.9B parameters; the first layer dense, then 11 mixture-of-experts layers of 64 routed experts, 6 per token, and 2 shared) with sliding-window attention: while it writes, each new token attends to the whole prompt and to the last 128 generated tokens. It writes a page as its layout blocks, each with a label (`title`, `text`, `equation`, `table`, …), a box and the block's content (in our tests, tables as HTML and formulas as LaTeX). This file reads one page per request, as one 1,024 × 1,024 view of 273 image tokens: the original's base setting, one of the two single-page settings in its README and the view it takes of each page of a multi-page document.
27
 
@@ -108,7 +108,7 @@ Peak is the process's peak resident memory (VmHWM). On the Galaxy S26 GPU row it
108
 
109
  On the Mac each row holds four requests made on 2026-11-16 (LiteRT-LM 0.19.2 from PyPI on macOS 27.0, 4 threads for the decoder on the CPU, a runtime cache directory for each row): the page once with an empty cache directory (cold) and once with the cache written, the paragraph twice with the cache written; the Engine, First token, Decode and Peak cells give the range over the four. Each request started right after the model file, and for a cached request its cache files, had been read in full (untimed). Peak there is the process's peak memory footprint as `/usr/bin/time -l` reports it, not VmHWM. The CPU's slowest decode (32.3 tok/s) is the cold page request.
110
 
111
- Speed is still being tuned; faster forms will be published here as updates.
112
 
113
  ## Conversion notes
114
 
 
21
 
22
  # Unlimited-OCR — LiteRT-LM (OCR)
23
 
24
+ On a Galaxy S26 this file reads a page in 18–22 s on the CPU, engine creation included (2026-11-15). This repository is a conversion of [baidu/Unlimited-OCR](https://huggingface.co/baidu/Unlimited-OCR) to LiteRT-LM (`.litertlm`), made with [hf-to-litertlm](https://github.com/john-rocky/hf-to-litertlm) for Google's [LiteRT-LM](https://github.com/google-ai-edge/LiteRT-LM) (tested with 0.19.2, and one page with 0.19.1).
25
 
26
  [Unlimited-OCR](https://huggingface.co/baidu/Unlimited-OCR) (Baidu, 2026-06-22) is a 3.3B document-parsing model: a vision encoder (DeepEncoder: SAM ViT-B and CLIP-L, with a projector; 401M parameters) and a 12-layer DeepSeek-V2 text decoder (2.9B parameters; the first layer dense, then 11 mixture-of-experts layers of 64 routed experts, 6 per token, and 2 shared) with sliding-window attention: while it writes, each new token attends to the whole prompt and to the last 128 generated tokens. It writes a page as its layout blocks, each with a label (`title`, `text`, `equation`, `table`, …), a box and the block's content (in our tests, tables as HTML and formulas as LaTeX). This file reads one page per request, as one 1,024 × 1,024 view of 273 image tokens: the original's base setting, one of the two single-page settings in its README and the view it takes of each page of a multi-page document.
27
 
 
108
 
109
  On the Mac each row holds four requests made on 2026-11-16 (LiteRT-LM 0.19.2 from PyPI on macOS 27.0, 4 threads for the decoder on the CPU, a runtime cache directory for each row): the page once with an empty cache directory (cold) and once with the cache written, the paragraph twice with the cache written; the Engine, First token, Decode and Peak cells give the range over the four. Each request started right after the model file, and for a cached request its cache files, had been read in full (untimed). Peak there is the process's peak memory footprint as `/usr/bin/time -l` reports it, not VmHWM. The CPU's slowest decode (32.3 tok/s) is the cold page request.
110
 
111
+ On the Galaxy S26 and the Pixel 11 Pro, this file on the CPU is the fastest form we found that passes our tests (with the near-tie rule in Correctness). The GPU took longer per page on both phones and missed 5 tests, and a version with the decoder's routed experts in int4 was faster on the Pixel 11 Pro's CPU but missed the second receipt photo at a token that is not a near tie.
112
 
113
  ## Conversion notes
114