Image-Text-to-Text
Transformers
Safetensors
English
Chinese
multilingual
qwen3_5_moe
ocr
pdf
document-parsing
document-understanding
layout-analysis
table-recognition
chart-parsing
formula-recognition
chemical-formula
markdown
vision-language
infinity-parser
infinity_parser2
conversational
Eval Results
Instructions to use infly/Infinity-Parser2-Pro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use infly/Infinity-Parser2-Pro with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="infly/Infinity-Parser2-Pro") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("infly/Infinity-Parser2-Pro") model = AutoModelForImageTextToText.from_pretrained("infly/Infinity-Parser2-Pro") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use infly/Infinity-Parser2-Pro with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "infly/Infinity-Parser2-Pro" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "infly/Infinity-Parser2-Pro", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/infly/Infinity-Parser2-Pro
- SGLang
How to use infly/Infinity-Parser2-Pro with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "infly/Infinity-Parser2-Pro" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "infly/Infinity-Parser2-Pro", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "infly/Infinity-Parser2-Pro" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "infly/Infinity-Parser2-Pro", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use infly/Infinity-Parser2-Pro with Docker Model Runner:
docker model run hf.co/infly/Infinity-Parser2-Pro
Update .eval_results/olmocrbench.yaml
Browse files- .eval_results/olmocrbench.yaml +16 -16
.eval_results/olmocrbench.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
- dataset:
|
| 2 |
id: allenai/olmOCR-bench
|
| 3 |
task_id: overall
|
| 4 |
-
value:
|
| 5 |
source:
|
| 6 |
url: https://huggingface.co/papers/2506.03197
|
| 7 |
name: Infinity Parser technical report
|
|
@@ -9,31 +9,31 @@
|
|
| 9 |
- dataset:
|
| 10 |
id: allenai/olmOCR-bench
|
| 11 |
task_id: arxiv_math
|
| 12 |
-
value: 88.
|
| 13 |
source:
|
| 14 |
url: https://huggingface.co/papers/2506.03197
|
| 15 |
name: Infinity Parser technical report
|
| 16 |
user: nielsr
|
| 17 |
- dataset:
|
| 18 |
id: allenai/olmOCR-bench
|
| 19 |
-
task_id:
|
| 20 |
-
value:
|
| 21 |
source:
|
| 22 |
url: https://huggingface.co/papers/2506.03197
|
| 23 |
name: Infinity Parser technical report
|
| 24 |
user: nielsr
|
| 25 |
- dataset:
|
| 26 |
id: allenai/olmOCR-bench
|
| 27 |
-
task_id:
|
| 28 |
-
value:
|
| 29 |
source:
|
| 30 |
url: https://huggingface.co/papers/2506.03197
|
| 31 |
name: Infinity Parser technical report
|
| 32 |
user: nielsr
|
| 33 |
- dataset:
|
| 34 |
id: allenai/olmOCR-bench
|
| 35 |
-
task_id:
|
| 36 |
-
value:
|
| 37 |
source:
|
| 38 |
url: https://huggingface.co/papers/2506.03197
|
| 39 |
name: Infinity Parser technical report
|
|
@@ -41,32 +41,32 @@
|
|
| 41 |
- dataset:
|
| 42 |
id: allenai/olmOCR-bench
|
| 43 |
task_id: multi_column
|
| 44 |
-
value: 83.
|
| 45 |
source:
|
| 46 |
url: https://huggingface.co/papers/2506.03197
|
| 47 |
name: Infinity Parser technical report
|
| 48 |
user: nielsr
|
| 49 |
- dataset:
|
| 50 |
id: allenai/olmOCR-bench
|
| 51 |
-
task_id:
|
| 52 |
-
value:
|
| 53 |
source:
|
| 54 |
url: https://huggingface.co/papers/2506.03197
|
| 55 |
name: Infinity Parser technical report
|
| 56 |
user: nielsr
|
| 57 |
- dataset:
|
| 58 |
id: allenai/olmOCR-bench
|
| 59 |
-
task_id:
|
| 60 |
-
value:
|
| 61 |
source:
|
| 62 |
url: https://huggingface.co/papers/2506.03197
|
| 63 |
name: Infinity Parser technical report
|
| 64 |
user: nielsr
|
| 65 |
- dataset:
|
| 66 |
id: allenai/olmOCR-bench
|
| 67 |
-
task_id:
|
| 68 |
-
value:
|
| 69 |
source:
|
| 70 |
url: https://huggingface.co/papers/2506.03197
|
| 71 |
name: Infinity Parser technical report
|
| 72 |
-
user: nielsr
|
|
|
|
| 1 |
- dataset:
|
| 2 |
id: allenai/olmOCR-bench
|
| 3 |
task_id: overall
|
| 4 |
+
value: 87.6
|
| 5 |
source:
|
| 6 |
url: https://huggingface.co/papers/2506.03197
|
| 7 |
name: Infinity Parser technical report
|
|
|
|
| 9 |
- dataset:
|
| 10 |
id: allenai/olmOCR-bench
|
| 11 |
task_id: arxiv_math
|
| 12 |
+
value: 88.1
|
| 13 |
source:
|
| 14 |
url: https://huggingface.co/papers/2506.03197
|
| 15 |
name: Infinity Parser technical report
|
| 16 |
user: nielsr
|
| 17 |
- dataset:
|
| 18 |
id: allenai/olmOCR-bench
|
| 19 |
+
task_id: baseline
|
| 20 |
+
value: 99.9
|
| 21 |
source:
|
| 22 |
url: https://huggingface.co/papers/2506.03197
|
| 23 |
name: Infinity Parser technical report
|
| 24 |
user: nielsr
|
| 25 |
- dataset:
|
| 26 |
id: allenai/olmOCR-bench
|
| 27 |
+
task_id: headers_footers
|
| 28 |
+
value: 95.8
|
| 29 |
source:
|
| 30 |
url: https://huggingface.co/papers/2506.03197
|
| 31 |
name: Infinity Parser technical report
|
| 32 |
user: nielsr
|
| 33 |
- dataset:
|
| 34 |
id: allenai/olmOCR-bench
|
| 35 |
+
task_id: long_tiny_text
|
| 36 |
+
value: 92.5
|
| 37 |
source:
|
| 38 |
url: https://huggingface.co/papers/2506.03197
|
| 39 |
name: Infinity Parser technical report
|
|
|
|
| 41 |
- dataset:
|
| 42 |
id: allenai/olmOCR-bench
|
| 43 |
task_id: multi_column
|
| 44 |
+
value: 83.7
|
| 45 |
source:
|
| 46 |
url: https://huggingface.co/papers/2506.03197
|
| 47 |
name: Infinity Parser technical report
|
| 48 |
user: nielsr
|
| 49 |
- dataset:
|
| 50 |
id: allenai/olmOCR-bench
|
| 51 |
+
task_id: old_scans
|
| 52 |
+
value: 58.2
|
| 53 |
source:
|
| 54 |
url: https://huggingface.co/papers/2506.03197
|
| 55 |
name: Infinity Parser technical report
|
| 56 |
user: nielsr
|
| 57 |
- dataset:
|
| 58 |
id: allenai/olmOCR-bench
|
| 59 |
+
task_id: old_scans_math
|
| 60 |
+
value: 91.3
|
| 61 |
source:
|
| 62 |
url: https://huggingface.co/papers/2506.03197
|
| 63 |
name: Infinity Parser technical report
|
| 64 |
user: nielsr
|
| 65 |
- dataset:
|
| 66 |
id: allenai/olmOCR-bench
|
| 67 |
+
task_id: table_tests
|
| 68 |
+
value: 91.2
|
| 69 |
source:
|
| 70 |
url: https://huggingface.co/papers/2506.03197
|
| 71 |
name: Infinity Parser technical report
|
| 72 |
+
user: nielsr
|