Repository navigation
Commit d68f664
authored
Add OCR and document GGUF projector cohort (#691)
## Summary
- add exact standalone GGUF graph import for `deepseekocr`,
`deepseekocr2`, `dots3note_a`, `dots3note_v`, `dots_ocr`,
`granite4_vision`, `lightonocr`, `paddleocr`, and `youtuvl`
- add role-explicit standalone sidecar dispatch through
`build_mmproj_from_gguf()` without synthesizing a text decoder or gating
export on downstream runtime support
- enforce typed metadata, exact target pairing, suffix-exact tensor
closure, tensor-triggered dense/MoE variants, counted SAM/QFormer
families, complete source roles, shapes, and explicit-float qtypes
- add processor-native vision/audio contracts, dedicated reusable
components, full media assembly, independent numerical parity, fp16
rotary execution, immutable header fingerprints, census updates, and
generated documentation
## Routes and immutable evidence
Pinned semantic source:
`ggml-org/llama.cpp@8d9af256337d1a501250f9bbf4c0859a654bddd6`.
| Route | Role | Paired text architecture | Representative sidecar |
|---|---|---|---|
| `deepseekocr` | vision | `deepseek2-ocr` |
`sabafallah/DeepSeek-OCR-GGUF@d26779bcd1cb301fec3ff82adc672f18384776fc`
|
| `deepseekocr2` | vision | `deepseek2-ocr` |
`sabafallah/DeepSeek-OCR-2-GGUF@d08e5af400c64fa8a9b89b04ba373b600b02e05d`
|
| `dots_ocr` | vision | `qwen2` |
`ggml-org/dots.ocr-GGUF@2c093a32ca360a396bc6d87d60408636130b9d9b` |
| `dots3note_v` / `dots3note_a` | vision + audio | `dots3note` |
`ggml-org/dots3-note-prev-GGUF@e5e7f6692337c0782c2bb4e2395174fd99879448`
|
| `paddleocr` | vision | `paddleocr` |
`PaddlePaddle/PaddleOCR-VL-1.6-GGUF@511b09642bb324401f15f97cc23bc67e8f0a291d`
|
| `lightonocr` | vision | `qwen3` |
`noctrex/LightOnOCR-1B-1025-GGUF@fe9d27bebcd975de319b2129a700791e6c9e00ae`
|
| `youtuvl` | vision | `deepseek2` |
`tencent/Youtu-VL-4B-Instruct-GGUF@1b7e295135d85a169d93823aa4215faf2c427092`
|
| `granite4_vision` | vision | `granite` |
`ibm-granite/granite-vision-4.1-4b-GGUF@b1fa14294b0f5cac04c43076d1c4574091abf117`
|
Only the first 8-16 MiB of each immutable sidecar and paired-text header
were range-read. The complete parsed metadata/tensor inventories and
isolated fingerprints are committed as
`tests/data/gguf_ocr_projector_headers.json.xz`; all downloaded sparse
files and processor caches were deleted. Every selected sidecar is
individually below 16 GiB, including the 15,546,328,640-byte Dots3Note
F16 sidecar.
## Graph and processor contracts
- DeepSeek v1 splits processor-native fused 640-pixel tile rows
in-graph, reconstructs the local raster with learned newlines, and
appends the 1024 overview plus view separator; v2 handles 768 local
tiles and the 1024 overview with dynamic 144/256 query selection.
- Dots3Note emits both co-resident roles, preserves per-head Q/K
normalization, tensor-triggered progressive MoE blocks, selection-only
correction bias, partial audio RoPE, and mel-major 16 kHz/60-second
chunk semantics.
- Dots OCR and PaddleOCR preserve their distinct packed-patch ordering,
M-RoPE layouts, norm types, learned-position interpolation, and
projector merge transforms.
- YouTu-VL preserves merge-block-major patch rows and irregular
window/full-attention scheduling; LightOnOCR preserves Pixtral 2-D RoPE
plus Q/K row reversal; Granite4 preserves all eight selected streams,
Window-QFormer transforms, deep-stack width, symmetric any-resolution
unpadding, and newline assembly.
`runtime=DEFERRED` remains truthful for every route. Standalone export
emits a warning that downstream multimodal assembly is unvalidated.
Packed/quantized mmproj tensors fail closed; callers need F32/F16/BF16
sidecars. There are no production model-ID or revision gates.
## Validation
- focused OCR/projector/registry/census/docs suite: `438 passed`
- broad serial non-integration suite: `9115 passed, 64 skipped, 12
deselected, 1 subtest passed`
- `lintrunner f --output oneline --all-files`
- `lintrunner -a --output oneline`
- `python scripts/generate_gguf_support_docs.py --check`
- `git diff --check origin/main...HEAD`
- changed-line mypy: `0` errors (`13` pre-existing `_mmproj.py` errors
outside changed lines)
- two independent medium-effort review passes; fixed SAM BHWC padding,
Granite odd-padding retention, and fp16/bf16 rotary frequency typing,
each with executable regressions
- no GGUF, ONNX, package, processor-cache, or scratch-log payload
residue
## Capability waivers
Real-weight full-sidecar execution and L4/L5 generation are not claimed:
the cohort uses immutable range-read headers plus reduced independent
numerical graph parity so it stays within the artifact budget.
Downstream runtime validation is intentionally deferred and is not an
ONNX export gate.
Base: `50bb373f0fce5aeb3bda463709ca7beb48d64b00`
Head: `7ef5be18cfe9fe545dba11ec1e221e3f84bd627b`
---------
Signed-off-by: Justin Chu <[email protected]>
Copilot-Session: dc949491-5a7d-40f0-afb8-dd76d1738594
Copilot-Session: f96aa7b0-95a6-473f-a875-5883767c2a241 parent cc40cd7 commit d68f664
18 files changed
Lines changed: 7480 additions & 112 deletions
File tree
- docs/api
- src/mobius
- components
- integrations/gguf
- tasks
- tests/data
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
25 | 32 | | |
26 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
27 | 38 | | |
28 | 39 | | |
29 | 40 | | |
| |||
40 | 51 | | |
41 | 52 | | |
42 | 53 | | |
| 54 | + | |
| 55 | + | |
43 | 56 | | |
44 | 57 | | |
45 | 58 | | |
| |||
68 | 81 | | |
69 | 82 | | |
70 | 83 | | |
| 84 | + | |
| 85 | + | |
71 | 86 | | |
72 | 87 | | |
73 | 88 | | |
| |||
88 | 103 | | |
89 | 104 | | |
90 | 105 | | |
| 106 | + | |
| 107 | + | |
91 | 108 | | |
92 | 109 | | |
93 | 110 | | |
| |||
127 | 144 | | |
128 | 145 | | |
129 | 146 | | |
| 147 | + | |
| 148 | + | |
130 | 149 | | |
131 | 150 | | |
132 | 151 | | |
| |||
299 | 318 | | |
300 | 319 | | |
301 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
302 | 344 | | |
303 | 345 | | |
304 | 346 | | |
| |||
0 commit comments