Commit 5a7fa46
committed
Bound best-of fallback; figure-caption prompt rule; VLM loop-collapse scrub
Three general improvements to the LightOnOCR pipeline, validated on the full 20:
- Best-of fallback bound: only spend the penalty-free fallback generation when
it could plausibly win (retry ran away, or dropped 2+ source headers). A clean
retry covering all-but-one header is kept as-is. Cuts a doomed fallback on
already-recovered runaways (5128504 1287s -> 581s) with no outcome change.
- EXTRACTION_PROMPT: figure captions take the poster's "Figure N:" line, not the
Markdown image auto-description; never write the bracketed alt-text into a
caption or section. General rule for all figures. Recovers AISec rougeL
0.70 -> 0.92.
- vlm_scrub._collapse_loops: collapse a VLM decode runaway (a short token/line
repeated >5x) to one instance before the other passes. O(n), fires only on
pathological repetition; touched only isporeu of 19 caches (33316 -> 12791
chars, KBA x4109 -> x4), the rest byte-stable.
Full-20 LightOnOCR (ranks 1-4): rougeL 0.792 -> 0.830 (now BEATS pdfplumber
0.819), field_proportion 0.856 -> 0.939, pass 13 -> 15/20. Known: rank-3 caption
extraction inflates 4552067 field_proportion to 1.58 (content fine, rougeL 0.81);
refinement pending.1 parent d6df9bc commit 5a7fa46
2 files changed
Lines changed: 53 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
172 | 212 | | |
173 | 213 | | |
174 | 214 | | |
| 215 | + | |
175 | 216 | | |
176 | 217 | | |
177 | 218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1588 | 1588 | | |
1589 | 1589 | | |
1590 | 1590 | | |
1591 | | - | |
| 1591 | + | |
1592 | 1592 | | |
1593 | 1593 | | |
1594 | 1594 | | |
| |||
3271 | 3271 | | |
3272 | 3272 | | |
3273 | 3273 | | |
3274 | | - | |
| 3274 | + | |
3275 | 3275 | | |
3276 | 3276 | | |
3277 | 3277 | | |
| |||
3281 | 3281 | | |
3282 | 3282 | | |
3283 | 3283 | | |
3284 | | - | |
3285 | | - | |
3286 | | - | |
3287 | | - | |
| 3284 | + | |
| 3285 | + | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
3288 | 3292 | | |
3289 | | - | |
3290 | | - | |
| 3293 | + | |
| 3294 | + | |
3291 | 3295 | | |
3292 | 3296 | | |
3293 | 3297 | | |
| |||
0 commit comments