File size: 2,389 Bytes
addc5a5
 
e6e4e07
 
 
 
 
 
 
 
 
 
addc5a5
e6e4e07
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: cdla-permissive-2.0
base_model: docling-project/CodeFormulaV2
library_name: onnxruntime
pipeline_tag: image-to-text
tags:
  - onnx
  - int8
  - ocr
  - formula
  - latex
  - docling
---

# CodeFormulaV2 ONNX (INT8 decoder)

A mirror of the split CodeFormulaV2 ONNX assets published in the
[Docling Rust models-v1 release](https://github.com/docling-project/docling.rs/releases/tag/models-v1),
derived from [docling-project/CodeFormulaV2](https://huggingface.co/docling-project/CodeFormulaV2).
The weights are mirrored unchanged. Model credit belongs to the upstream Docling authors;
this repository provides downloadable ONNX files and does not claim to train or export them.

**Only the autoregressive decoder is INT8.** The vision encoder and token embeddings are FP32.
The complete download, including the tokenizer, is **777.7 MB** (decimal).

| File | Purpose | Precision | Bytes |
| --- | --- | --- | ---: |
| `vision.onnx` | Vision encoder | FP32 | 374,146,399 |
| `embed.onnx` | Token embeddings | FP32 | 231,506,178 |
| `decoder_kv_int8.onnx` | Autoregressive decoder with KV cache | INT8 weights | 164,870,131 |
| `tokenizer.json` | Tokenizer and special tokens | JSON | 7,160,031 |

## Usage

These are split graphs for a custom ONNX Runtime inference loop, not a drop-in Transformers
`pipeline()` checkpoint. Encode image tiles with `vision.onnx`, embed the prompt tokens with
`embed.onnx`, insert the image embeddings, and decode autoregressively with the decoder's
KV cache. Preprocessing and prompts must match CodeFormulaV2/Idefics3.

The graphs have been exercised with ONNX Runtime Web 1.27.0 on WebGPU for formula recognition.
This mirror is intended for direct browser model downloads; user images and PDFs are processed
on the device and do not need to be uploaded to this repository.

Use immutable revision URLs and verify each file against `manifest.json` before execution.
A successful decode does not guarantee an accurate or renderable formula; compare results
with the source image. Code recognition is an upstream capability and was not evaluated here.

## License and provenance

The upstream CodeFormulaV2 model is distributed under **CDLA-Permissive-2.0**.
The complete license text is included as `LICENSE`. Original release asset URLs, byte counts,
and SHA-256 hashes are recorded in `manifest.json`. This mirror does not change those files.