NaserJamal commited on
Commit
ce8af6c
·
verified ·
1 Parent(s): bbda86e

Upload LightOnOCR-2-1B model

Browse files
.gitattributes CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
+ benchmark.png filter=lfs diff=lfs merge=lfs -text
38
+ lightonocr-banner.png filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: image-text-to-text
4
+ language:
5
+ - en
6
+ - fr
7
+ - de
8
+ - es
9
+ - it
10
+ - nl
11
+ - pt
12
+ - sv
13
+ - da
14
+ - zh
15
+ - ja
16
+ library_name: transformers
17
+ tags:
18
+ - ocr
19
+ - document-understanding
20
+ - vision-language
21
+ - pdf
22
+ - tables
23
+ - forms
24
+ ---
25
+
26
+ <div align="center">
27
+ <img src="lightonocr-banner.png" alt="LightOnOCR-2-1B Banner" width="600"/>
28
+ </div>
29
+
30
+ # LightOnOCR-2-1B
31
+
32
+ **Best OCR model .** LightOnOCR-2-1B is our flagship OCR model, refined with RLVR training for maximum accuracy. We recommend this variant for most OCR tasks.
33
+
34
+ ## About LightOnOCR-2
35
+
36
+ LightOnOCR-2 is an efficient end-to-end 1B-parameter vision-language model for converting documents (PDFs, scans, images) into clean, naturally ordered text without relying on brittle pipelines. This second version is trained on a larger and higher-quality corpus with stronger French, arXiv, and scan coverage, improved LaTeX handling, and cleaner normalization. LightOnOCR-2 achieves state-of-the-art performance on OlmOCR-Bench while being ~9× smaller and significantly faster than competing approaches.
37
+
38
+ ## Highlights
39
+
40
+ * ⚡ **Speed:** 3.3× faster than Chandra OCR, 1.7× faster than OlmOCR, 5× faster than dots.ocr, 2× faster than PaddleOCR-VL-0.9B, 1.73× faster than DeepSeekOCR
41
+ * 💸 **Efficiency:** Processes 5.71 pages/s on a single H100 (~493k pages/day) for **<$0.01 per 1,000 pages**
42
+ * 🧠 **End-to-End:** Fully differentiable, no external OCR pipeline
43
+ * 🧾 **Versatile:** Handles tables, receipts, forms, multi-column layouts, and math notation
44
+ * 📍 **Image detection:** Predicts bounding boxes for embedded images (bbox variants)
45
+
46
+ ---
47
+
48
+ 📄 **[Paper]( https://arxiv.org/pdf/2601.14251)** | 📝 **[Blog Post](https://huggingface.co/blog/lightonai/lightonocr-2)** | 🚀 **[Demo](https://huggingface.co/spaces/lightonai/LightOnOCR-2-1B-Demo)** | 📊 **[Dataset](https://huggingface.co/datasets/lightonai/LightOnOCR-mix-0126)** | 📊 **[BBox Dataset](https://huggingface.co/datasets/lightonai/LightOnOCR-bbox-mix-0126)** | 📓 **[Finetuning Notebook](https://colab.research.google.com/drive/1WjbsFJZ4vOAAlKtcCauFLn_evo5UBRNa?usp=sharing)**
49
+
50
+ ---
51
+
52
+ ## Model Variants
53
+
54
+ | Variant | Description |
55
+ |---------|-------------|
56
+ | **[LightOnOCR-2-1B](https://huggingface.co/lightonai/LightOnOCR-2-1B)** | Best OCR model |
57
+ | **[LightOnOCR-2-1B-base](https://huggingface.co/lightonai/LightOnOCR-2-1B-base)** | Base model, ideal for fine-tuning |
58
+ | **[LightOnOCR-2-1B-bbox](https://huggingface.co/lightonai/LightOnOCR-2-1B-bbox)** | Best model with image bounding boxes |
59
+ | **[LightOnOCR-2-1B-bbox-base](https://huggingface.co/lightonai/LightOnOCR-2-1B-bbox-base)** | Base bbox model, ideal for fine-tuning |
60
+ | **[LightOnOCR-2-1B-ocr-soup](https://huggingface.co/lightonai/LightOnOCR-2-1B-ocr-soup)** | Merged variant for extra robustness |
61
+ | **[LightOnOCR-2-1B-bbox-soup](https://huggingface.co/lightonai/LightOnOCR-2-1B-bbox-soup)** | Merged variant: OCR + bbox combined |
62
+
63
+ ---
64
+
65
+ ## Benchmarks
66
+
67
+ <div align="center">
68
+ <img src="benchmark.png" alt="OlmOCR-Bench Results" width="900"/>
69
+ </div>
70
+
71
+ *See the [paper](https://arxiv.org/pdf/2601.14251) for full benchmark details and methodology.*
72
+
73
+ ---
74
+
75
+ ## Usage with Transformers
76
+
77
+ > **Note:** LightOnOCR-2 is avaible in latest transformers release starting from v5.
78
+
79
+ ```bash
80
+ uv pip install transformers # => 5.0.0
81
+ uv pip install pillow pypdfium2
82
+ ```
83
+
84
+ ```python
85
+ import torch
86
+ from transformers import LightOnOcrForConditionalGeneration, LightOnOcrProcessor
87
+
88
+ device = "mps" if torch.backends.mps.is_available() else "cuda" if torch.cuda.is_available() else "cpu"
89
+ dtype = torch.float32 if device == "mps" else torch.bfloat16
90
+
91
+ model = LightOnOcrForConditionalGeneration.from_pretrained("lightonai/LightOnOCR-2-1B", torch_dtype=dtype).to(device)
92
+ processor = LightOnOcrProcessor.from_pretrained("lightonai/LightOnOCR-2-1B")
93
+
94
+ url = "https://huggingface.co/datasets/hf-internal-testing/fixtures_ocr/resolve/main/SROIE-receipt.jpeg"
95
+
96
+ conversation = [{"role": "user", "content": [{"type": "image", "url": url}]}]
97
+
98
+ inputs = processor.apply_chat_template(
99
+ conversation,
100
+ add_generation_prompt=True,
101
+ tokenize=True,
102
+ return_dict=True,
103
+ return_tensors="pt",
104
+ )
105
+ inputs = {k: v.to(device=device, dtype=dtype) if v.is_floating_point() else v.to(device) for k, v in inputs.items()}
106
+
107
+ output_ids = model.generate(**inputs, max_new_tokens=1024)
108
+ generated_ids = output_ids[0, inputs["input_ids"].shape[1]:]
109
+ output_text = processor.decode(generated_ids, skip_special_tokens=True)
110
+ print(output_text)
111
+ ```
112
+
113
+ ---
114
+
115
+ ## Usage with vLLM
116
+
117
+ ```bash
118
+ vllm serve lightonai/LightOnOCR-2-1B \
119
+ --limit-mm-per-prompt '{"image": 1}' --mm-processor-cache-gb 0 --no-enable-prefix-caching
120
+ ```
121
+
122
+ ```python
123
+ import base64
124
+ import requests
125
+ import pypdfium2 as pdfium
126
+ import io
127
+
128
+ ENDPOINT = "http://localhost:8000/v1/chat/completions"
129
+ MODEL = "lightonai/LightOnOCR-2-1B"
130
+
131
+ # Download PDF from arXiv
132
+ pdf_url = "https://arxiv.org/pdf/2412.13663"
133
+ pdf_data = requests.get(pdf_url).content
134
+
135
+ # Open PDF and convert first page to image
136
+ pdf = pdfium.PdfDocument(pdf_data)
137
+ page = pdf[0]
138
+ # Render at 200 DPI (scale factor = 200/72 ≈ 2.77)
139
+ pil_image = page.render(scale=2.77).to_pil()
140
+
141
+ # Convert to base64
142
+ buffer = io.BytesIO()
143
+ pil_image.save(buffer, format="PNG")
144
+ image_base64 = base64.b64encode(buffer.getvalue()).decode('utf-8')
145
+
146
+ # Make request
147
+ payload = {
148
+ "model": MODEL,
149
+ "messages": [{
150
+ "role": "user",
151
+ "content": [{
152
+ "type": "image_url",
153
+ "image_url": {"url": f"data:image/png;base64,{image_base64}"}
154
+ }]
155
+ }],
156
+ "max_tokens": 4096,
157
+ "temperature": 0.2,
158
+ "top_p": 0.9,
159
+ }
160
+
161
+ response = requests.post(ENDPOINT, json=payload)
162
+ text = response.json()['choices'][0]['message']['content']
163
+ print(text)
164
+ ```
165
+
166
+ ---
167
+
168
+ ## Rendering and Preprocessing Tips
169
+
170
+ * Render PDFs at 200 DPI to images using a target longest dimension of **1540px**
171
+ * Maintain aspect ratio to preserve text geometry
172
+
173
+ ---
174
+
175
+ ## Fine-tuning
176
+
177
+ LightOnOCR-2 is fully differentiable and supports:
178
+
179
+ * LoRA fine-tuning
180
+ * Domain adaptation (receipts, scientific articles, forms, etc.)
181
+ * Multilingual fine-tuning with task-specific corpora
182
+
183
+ For fine-tuning, we recommend starting with the **[LightOnOCR-2-1B-base](https://huggingface.co/lightonai/LightOnOCR-2-1B-base)** variant.
184
+
185
+ ---
186
+
187
+ ## License
188
+
189
+ Apache License 2.0
190
+
191
+ ---
192
+
193
+ ## Citation
194
+
195
+ ```bibtex
196
+ @misc{lightonocr2_2026,
197
+ title = {LightOnOCR: A 1B End-to-End Multilingual Vision-Language Model for State-of-the-Art OCR},
198
+ author = {Said Taghadouini and Adrien Cavaill\`{e}s and Baptiste Aubertin},
199
+ year = {2026},
200
+ howpublished = {\url{https://arxiv.org/pdf/2601.14251}}
201
+ }
202
+ ```
added_tokens.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</think>": 151668,
3
+ "</tool_call>": 151658,
4
+ "</tool_response>": 151666,
5
+ "<think>": 151667,
6
+ "<tool_call>": 151657,
7
+ "<tool_response>": 151665,
8
+ "<|box_end|>": 151649,
9
+ "<|box_start|>": 151648,
10
+ "<|endoftext|>": 151643,
11
+ "<|file_sep|>": 151664,
12
+ "<|fim_middle|>": 151660,
13
+ "<|fim_pad|>": 151662,
14
+ "<|fim_prefix|>": 151659,
15
+ "<|fim_suffix|>": 151661,
16
+ "<|im_end|>": 151645,
17
+ "<|im_start|>": 151644,
18
+ "<|image_pad|>": 151655,
19
+ "<|object_ref_end|>": 151647,
20
+ "<|object_ref_start|>": 151646,
21
+ "<|quad_end|>": 151651,
22
+ "<|quad_start|>": 151650,
23
+ "<|repo_name|>": 151663,
24
+ "<|video_pad|>": 151656,
25
+ "<|vision_end|>": 151653,
26
+ "<|vision_pad|>": 151654,
27
+ "<|vision_start|>": 151652
28
+ }
benchmark.png ADDED

Git LFS Details

  • SHA256: 588f08c83690be0564e0275a369911b17fae02c4bfaac46a243323bd4efe23b8
  • Pointer size: 131 Bytes
  • Size of remote file: 327 kB
chat_template.jinja ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% set image_count = namespace(value=0) %}
2
+ {% for message in messages %}
3
+ {% if loop.first and message['role'] != 'system' %}
4
+ <|im_start|>system<|im_end|>
5
+ {% endif %}
6
+ <|im_start|>{{ message['role'] }}
7
+ {% if message['content'] is string %}
8
+ {{ message['content'] }}<|im_end|>
9
+ {% else %}
10
+ {% for content in message['content'] %}
11
+ {% if content['type'] == 'image' or 'image' in content or 'image_url' in content %}
12
+ {% set image_count.value = image_count.value + 1 %}
13
+ {% if add_vision_id %}
14
+ Picture {{ image_count.value }}:
15
+ {% endif -%}
16
+ <|image_pad|>
17
+ {%- elif 'text' in content %}
18
+ {{ content['text'] }}
19
+ {% endif %}
20
+ {% endfor %}
21
+ <|im_end|>
22
+ {% endif %}
23
+ {% endfor %}
24
+ {% if add_generation_prompt %}
25
+ <|im_start|>assistant
26
+ {% endif %}
config.json ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LightOnOCRForConditionalGeneration"
4
+ ],
5
+ "dtype": "bfloat16",
6
+ "eos_token_id": 151645,
7
+ "image_token_id": 151655,
8
+ "model_type": "mistral3",
9
+ "multimodal_projector_bias": false,
10
+ "pad_token_id": 151643,
11
+ "projector_hidden_act": "gelu",
12
+ "spatial_merge_size": 2,
13
+ "text_config": {
14
+ "architectures": [
15
+ "Qwen3ForCausalLM"
16
+ ],
17
+ "attention_bias": false,
18
+ "attention_dropout": 0,
19
+ "dtype": "bfloat16",
20
+ "head_dim": 128,
21
+ "hidden_act": "silu",
22
+ "hidden_size": 1024,
23
+ "initializer_range": 0.02,
24
+ "intermediate_size": 3072,
25
+ "layer_types": [
26
+ "full_attention",
27
+ "full_attention",
28
+ "full_attention",
29
+ "full_attention",
30
+ "full_attention",
31
+ "full_attention",
32
+ "full_attention",
33
+ "full_attention",
34
+ "full_attention",
35
+ "full_attention",
36
+ "full_attention",
37
+ "full_attention",
38
+ "full_attention",
39
+ "full_attention",
40
+ "full_attention",
41
+ "full_attention",
42
+ "full_attention",
43
+ "full_attention",
44
+ "full_attention",
45
+ "full_attention",
46
+ "full_attention",
47
+ "full_attention",
48
+ "full_attention",
49
+ "full_attention",
50
+ "full_attention",
51
+ "full_attention",
52
+ "full_attention",
53
+ "full_attention"
54
+ ],
55
+ "max_position_embeddings": 16384,
56
+ "max_window_layers": 28,
57
+ "model_type": "qwen3",
58
+ "num_attention_heads": 16,
59
+ "num_hidden_layers": 28,
60
+ "num_key_value_heads": 8,
61
+ "rms_norm_eps": 1e-06,
62
+ "rope_parameters": {
63
+ "rope_theta": 1000000,
64
+ "rope_type": "default"
65
+ },
66
+ "rope_theta": 1000000,
67
+ "sliding_window": null,
68
+ "use_cache": true,
69
+ "use_sliding_window": false,
70
+ "tie_word_embeddings": true,
71
+ "vocab_size": 151936,
72
+ "use_qk_norm": true
73
+ },
74
+ "transformers_version": "5.0.0.dev0",
75
+ "use_cache": false,
76
+ "vision_config": {
77
+ "attention_dropout": 0,
78
+ "dtype": "bfloat16",
79
+ "head_dim": 64,
80
+ "hidden_act": "silu",
81
+ "hidden_size": 1024,
82
+ "image_size": 1540,
83
+ "initializer_range": 0.02,
84
+ "intermediate_size": 4096,
85
+ "model_type": "pixtral",
86
+ "num_attention_heads": 16,
87
+ "num_channels": 3,
88
+ "num_hidden_layers": 24,
89
+ "patch_size": 14,
90
+ "rope_parameters": {
91
+ "rope_theta": 10000,
92
+ "rope_type": "default"
93
+ },
94
+ "rope_theta": 10000
95
+ },
96
+ "vision_feature_layer": -1
97
+ }
generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 151645,
6
+ 151643
7
+ ],
8
+ "pad_token_id": 151643,
9
+ "temperature": 0.2,
10
+ "top_k": 0,
11
+ "top_p": 0.9,
12
+ "transformers_version": "5.0.0.dev0"
13
+ }
lightonocr-banner.png ADDED

Git LFS Details

  • SHA256: e32c44dc131d4e07b344a41bb9651eb97ce4ce73d4e78463821267467810462c
  • Pointer size: 131 Bytes
  • Size of remote file: 351 kB
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbe12d0831cca119facce91268fc7c5fb72babdf919a6e352e3131bda85c8fbb
3
+ size 2011367489
processor_config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_break_token": "<|vision_pad|>",
3
+ "image_end_token": "<|vision_end|>",
4
+ "image_processor": {
5
+ "crop_size": null,
6
+ "data_format": "channels_first",
7
+ "default_to_square": true,
8
+ "device": null,
9
+ "disable_grouping": null,
10
+ "do_center_crop": null,
11
+ "do_convert_rgb": true,
12
+ "do_normalize": true,
13
+ "do_pad": null,
14
+ "do_rescale": true,
15
+ "do_resize": true,
16
+ "image_mean": [
17
+ 0.48145466,
18
+ 0.4578275,
19
+ 0.40821073
20
+ ],
21
+ "image_processor_type": "PixtralImageProcessorFast",
22
+ "image_seq_length": null,
23
+ "image_std": [
24
+ 0.26862954,
25
+ 0.26130258,
26
+ 0.27577711
27
+ ],
28
+ "input_data_format": null,
29
+ "pad_size": null,
30
+ "patch_size": 14,
31
+ "processor_class": "PixtralProcessor",
32
+ "resample": 3,
33
+ "rescale_factor": 0.00392156862745098,
34
+ "return_tensors": null,
35
+ "size": {
36
+ "longest_edge": 1540
37
+ }
38
+ },
39
+ "image_token": "<|image_pad|>",
40
+ "patch_size": 14,
41
+ "processor_class": "PixtralProcessor",
42
+ "spatial_merge_size": 2
43
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|object_ref_start|>",
6
+ "<|object_ref_end|>",
7
+ "<|box_start|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_start|>",
12
+ "<|vision_end|>",
13
+ "<|vision_pad|>",
14
+ "<|image_pad|>",
15
+ "<|video_pad|>"
16
+ ],
17
+ "eos_token": {
18
+ "content": "<|im_end|>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ "pad_token": {
25
+ "content": "<|endoftext|>",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ }
31
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f54b55fa0c3aba0c91ce09ea79ae4e62da24e2a1a630f96c4bae34aba25e234a
3
+ size 11422822
tokenizer_config.json ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "fix_mistral_regex": true,
4
+ "add_prefix_space": false,
5
+ "added_tokens_decoder": {
6
+ "151643": {
7
+ "content": "<|endoftext|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "151644": {
15
+ "content": "<|im_start|>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "151645": {
23
+ "content": "<|im_end|>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ },
30
+ "151646": {
31
+ "content": "<|object_ref_start|>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": true
37
+ },
38
+ "151647": {
39
+ "content": "<|object_ref_end|>",
40
+ "lstrip": false,
41
+ "normalized": false,
42
+ "rstrip": false,
43
+ "single_word": false,
44
+ "special": true
45
+ },
46
+ "151648": {
47
+ "content": "<|box_start|>",
48
+ "lstrip": false,
49
+ "normalized": false,
50
+ "rstrip": false,
51
+ "single_word": false,
52
+ "special": true
53
+ },
54
+ "151649": {
55
+ "content": "<|box_end|>",
56
+ "lstrip": false,
57
+ "normalized": false,
58
+ "rstrip": false,
59
+ "single_word": false,
60
+ "special": true
61
+ },
62
+ "151650": {
63
+ "content": "<|quad_start|>",
64
+ "lstrip": false,
65
+ "normalized": false,
66
+ "rstrip": false,
67
+ "single_word": false,
68
+ "special": true
69
+ },
70
+ "151651": {
71
+ "content": "<|quad_end|>",
72
+ "lstrip": false,
73
+ "normalized": false,
74
+ "rstrip": false,
75
+ "single_word": false,
76
+ "special": true
77
+ },
78
+ "151652": {
79
+ "content": "<|vision_start|>",
80
+ "lstrip": false,
81
+ "normalized": false,
82
+ "rstrip": false,
83
+ "single_word": false,
84
+ "special": true
85
+ },
86
+ "151653": {
87
+ "content": "<|vision_end|>",
88
+ "lstrip": false,
89
+ "normalized": false,
90
+ "rstrip": false,
91
+ "single_word": false,
92
+ "special": true
93
+ },
94
+ "151654": {
95
+ "content": "<|vision_pad|>",
96
+ "lstrip": false,
97
+ "normalized": false,
98
+ "rstrip": false,
99
+ "single_word": false,
100
+ "special": true
101
+ },
102
+ "151655": {
103
+ "content": "<|image_pad|>",
104
+ "lstrip": false,
105
+ "normalized": false,
106
+ "rstrip": false,
107
+ "single_word": false,
108
+ "special": true
109
+ },
110
+ "151656": {
111
+ "content": "<|video_pad|>",
112
+ "lstrip": false,
113
+ "normalized": false,
114
+ "rstrip": false,
115
+ "single_word": false,
116
+ "special": true
117
+ },
118
+ "151657": {
119
+ "content": "<tool_call>",
120
+ "lstrip": false,
121
+ "normalized": false,
122
+ "rstrip": false,
123
+ "single_word": false,
124
+ "special": false
125
+ },
126
+ "151658": {
127
+ "content": "</tool_call>",
128
+ "lstrip": false,
129
+ "normalized": false,
130
+ "rstrip": false,
131
+ "single_word": false,
132
+ "special": false
133
+ },
134
+ "151659": {
135
+ "content": "<|fim_prefix|>",
136
+ "lstrip": false,
137
+ "normalized": false,
138
+ "rstrip": false,
139
+ "single_word": false,
140
+ "special": false
141
+ },
142
+ "151660": {
143
+ "content": "<|fim_middle|>",
144
+ "lstrip": false,
145
+ "normalized": false,
146
+ "rstrip": false,
147
+ "single_word": false,
148
+ "special": false
149
+ },
150
+ "151661": {
151
+ "content": "<|fim_suffix|>",
152
+ "lstrip": false,
153
+ "normalized": false,
154
+ "rstrip": false,
155
+ "single_word": false,
156
+ "special": false
157
+ },
158
+ "151662": {
159
+ "content": "<|fim_pad|>",
160
+ "lstrip": false,
161
+ "normalized": false,
162
+ "rstrip": false,
163
+ "single_word": false,
164
+ "special": false
165
+ },
166
+ "151663": {
167
+ "content": "<|repo_name|>",
168
+ "lstrip": false,
169
+ "normalized": false,
170
+ "rstrip": false,
171
+ "single_word": false,
172
+ "special": false
173
+ },
174
+ "151664": {
175
+ "content": "<|file_sep|>",
176
+ "lstrip": false,
177
+ "normalized": false,
178
+ "rstrip": false,
179
+ "single_word": false,
180
+ "special": false
181
+ },
182
+ "151665": {
183
+ "content": "<tool_response>",
184
+ "lstrip": false,
185
+ "normalized": false,
186
+ "rstrip": false,
187
+ "single_word": false,
188
+ "special": false
189
+ },
190
+ "151666": {
191
+ "content": "</tool_response>",
192
+ "lstrip": false,
193
+ "normalized": false,
194
+ "rstrip": false,
195
+ "single_word": false,
196
+ "special": false
197
+ },
198
+ "151667": {
199
+ "content": "<think>",
200
+ "lstrip": false,
201
+ "normalized": false,
202
+ "rstrip": false,
203
+ "single_word": false,
204
+ "special": false
205
+ },
206
+ "151668": {
207
+ "content": "</think>",
208
+ "lstrip": false,
209
+ "normalized": false,
210
+ "rstrip": false,
211
+ "single_word": false,
212
+ "special": false
213
+ }
214
+ },
215
+ "additional_special_tokens": [
216
+ "<|im_start|>",
217
+ "<|im_end|>",
218
+ "<|object_ref_start|>",
219
+ "<|object_ref_end|>",
220
+ "<|box_start|>",
221
+ "<|box_end|>",
222
+ "<|quad_start|>",
223
+ "<|quad_end|>",
224
+ "<|vision_start|>",
225
+ "<|vision_end|>",
226
+ "<|vision_pad|>",
227
+ "<|image_pad|>",
228
+ "<|video_pad|>"
229
+ ],
230
+ "bos_token": null,
231
+ "clean_up_tokenization_spaces": false,
232
+ "eos_token": "<|im_end|>",
233
+ "errors": "replace",
234
+ "extra_special_tokens": {},
235
+ "model_max_length": 131072,
236
+ "pad_token": "<|endoftext|>",
237
+ "processor_class": "LightOnOCRProcessor",
238
+ "split_special_tokens": false,
239
+ "tokenizer_class": "Qwen2Tokenizer",
240
+ "unk_token": null,
241
+ "image_token": "<|image_pad|>",
242
+ "image_break_token": "<|vision_pad|>",
243
+ "image_end_token": "<|vision_end|>"
244
+ }