Skip to main content

Module tableformer

Module tableformer 

Source
Expand description

TableFormer: table-structure recovery via docling-ibm-models, exported to ONNX by scripts/install/export_tableformer.py. The image encoder + tag-transformer encoder run once to a memory tensor; the decoder is then stepped autoregressively to emit an OTSL structure-token sequence (the same model docling runs). See docs/PDF_CONFORMANCE.md.

Structs§

TableFormer

Functions§

resolved_paths
Resolve the encoder / decoder / bbox files exactly as TableFormer::load will (shared with model_inventory, so diagnostics can never drift from what actually loads). Explicit DOCLING_TABLEFORMER_* overrides win; the decoder otherwise picks by preference — INT8 variants first unless DOCLING_RS_FP32 opts out, and within a precision the true-KV-cache export (decoder_kv*, one token per step, O(past) step cost) ranks ahead of the legacy layer-output-cache graph it matches byte-for-byte (91/91 snapshot corpus exact with either; the KV graph re-measured ~13–17% faster warm, so speed wins the default and the legacy file stays as the smaller fallback). decoder_kv ranks ABOVE decoder_int8: the #97 hoisted fp32 KV graph is faster than the quantized legacy graph on every machine measured, and it is byte-exact (its own int8 variant is not produced — see quantize_models.py).