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
//! # xberg-candle-ocr
//!
//! Candle-based VLM OCR engines for Xberg. Pure-Rust transformer OCR.
//!
//! ## Per-model sub-features
//!
//! - `trocr` — Microsoft TrOCR (printed and handwritten variants). **Line-level
//! only**: TrOCR is trained to recognise a single line of text per image and
//! produces poor output on full-page documents. Combine with a text-detection
//! step (e.g. PaddleOCR's text detector) that crops text regions before
//! handing each crop to TrOCR.
//! - `paddleocr-vl` — PaddleOCR-VL 0.9B vision-language model. Full-page
//! multi-task: OCR, tables, formulas, charts. Emits markdown directly.
//! - `glm-ocr` — Z.ai GLM-OCR 0.9B vision-language model (CogViT + GLM-4 +
//! Multi-Token Prediction). Full-page multi-task: OCR, tables, formulas,
//! charts, key-information extraction. Emits markdown directly.
//!
//! ## Device acceleration
//!
//! Pass-through features to candle: `cuda`, `metal`, `mkl`, `accelerate`.
pub
pub
pub use DevicePreference;
pub use ;
pub use DType;
/// Identifier for the model emitted by a [`CandleEngine`]. Used by the
/// backend layer to record telemetry and pick decoding hyperparameters.
/// Output produced by a candle OCR engine for a single image.