Commit 0c87f72
committed
Lift the 1540px vision ceiling by rebuilding the Pixtral RoPE table; map its limits
Follow-up on the four review questions: better settings, a newer model, a
hidden resolution knob. The useful answer is the third.
The 1540px ceiling is soft, not hard. Last week's file called it a hard
architectural limit. The vision tower precomputes a 110x110 RoPE table
(image_size//patch_size = 1540//14) and a larger image indexes past it and
asserts -- but the table is analytic and can be rebuilt for any image_size
with no retraining. Wired in as run_lightonocr.py --rope-rebuild (acts only
when --longest > 1540; the module lives at
model.vision_encoder.patch_positional_embedding and its buffers need an
explicit .to(device)). At 2464 (176 patches/side) it runs clean, VRAM 4.2
-> 5.1 GB, and on the feasibility probe the duplicate-line fraction on the
most starved poster fell 0.30 -> 0.09.
But bigger is not uniformly better, because extrapolating the grid past the
trained 110 band has its own cost. Full corpus at 2464-rebuild vs 1540:
rField 0.765 -> 0.731 overall, but split by native DPI the picture is clear
-- already-fine posters (>=40 DPI) degrade -0.075 (they gain no detail, only
untrained positions), while starved posters (<40 DPI) are a wash on average
(-0.009) yet swing hard per poster: 42 +0.234 (rField to 0.99), gasimova
-0.167 (its banner was already 1.00 at 1540). Two dense posters truncated at
2464 for want of token budget. So the lever is real but "render bigger" is
wrong: the follow-up is adaptive per-poster resolution -- scale toward ~80-100
DPI, cap near 2464 to stay in safe extrapolation, never upscale a poster
already above target -- plus a higher token cap. RESOLUTION.md and
rope_crossover.py carry the full per-poster table.
Two dead ends confirmed, one a retraction. Generation settings do NOT fix
the isporeu loop: greedy, the card's temp0.2/top_p0.9, and greedy+rep_penalty
all loop identically (dup 0.42-0.43). I implied last week that running greedy
was our bug; it was not. The loop begins exactly at a <th>Treatment</th> HTML
table cell -- the model degenerates transcribing a dense results table, a
model limitation, not a decoding artifact. And no newer or higher-res model
exists: LightOnOCR-2 is the current flagship, the sibling checkpoints
(-ocr-soup, -bbox) are all 1B/1540px, and 0.9B-32k is a pruned vocabulary not
a bigger context.
Adds probe scripts (probe_combined.py, probe_rope2.py), the crossover
analysis, and the 2464 raw outputs so the per-poster claims are reproducible
without a GPU.1 parent 18771d3 commit 0c87f72
27 files changed
Lines changed: 6704 additions & 0 deletions
File tree
- calibration/vlm
- out_rope2464
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
0 commit comments