Instructions to use winninghealth/WiNGPT-DocLoom with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use winninghealth/WiNGPT-DocLoom with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="winninghealth/WiNGPT-DocLoom") 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("winninghealth/WiNGPT-DocLoom") model = AutoModelForImageTextToText.from_pretrained("winninghealth/WiNGPT-DocLoom") 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 winninghealth/WiNGPT-DocLoom with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "winninghealth/WiNGPT-DocLoom" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "winninghealth/WiNGPT-DocLoom", "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/winninghealth/WiNGPT-DocLoom
- SGLang
How to use winninghealth/WiNGPT-DocLoom 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 "winninghealth/WiNGPT-DocLoom" \ --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": "winninghealth/WiNGPT-DocLoom", "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 "winninghealth/WiNGPT-DocLoom" \ --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": "winninghealth/WiNGPT-DocLoom", "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 winninghealth/WiNGPT-DocLoom with Docker Model Runner:
docker model run hf.co/winninghealth/WiNGPT-DocLoom
DocLoom
![]() |
Performance Comparison of Various Models on the olmOCR-Bench Dataset
| Arxiv | Old scans math | Tables | Old scans | Headers and footers | Multi columnn | Long tiny text | Base | Overall | ||
|---|---|---|---|---|---|---|---|---|---|---|
| Marker 1.10.1 | -- | 83.8 | 66.8 | 72.9 | 33.5 | 86.6 | 80 | 85.7 | 99.3 | 76.1±1.1 |
| MinerU 2.5.4 | -- | 76.6 | 54.6 | 84.9 | 33.7 | 96.6 | 78.2 | 83.5 | 93.7 | 75.2±1.1 |
| DeepSeek-OCR | -- | 77.2 | 73.6 | 80.2 | 33.3 | 96.1 | 66.4 | 79.4 | 99.8 | 75.7±1.0 |
| Nanonts-OCR2-3B | 3B | 75.4 | 46.1 | 86.8 | 40.9 | 32.1 | 81.9 | 93 | 99.6 | 69.5±1.1 |
| Mistral OCR | -- | 77.2 | 67.5 | 60.6 | 29.3 | 93.6 | 71.3 | 77.1 | 99.4 | 72.0±1.1 |
| MonkeyOCR-pro-3B | 3B | 83.8 | 68.8 | 74.6 | 36.1 | 91.2 | 76.6 | 80.1 | 95.3 | 75.8±1.0 |
| Qwen3-VL-4B-Instruct | 4B | 83.1 | 74.5 | 83.9 | 40.5 | 35.5 | 81.7 | 88.7 | 99.3 | 73.4±1.0 |
| olmOCR pipeline v0.4.0 with olmOCR-2-7B-1025 | 7B | 82.9 | 82.1 | 84.3 | 48.3 | 95.7 | 84.3 | 81.4 | 99.7 | 82.3±1.1 |
| DocLoom | 4B | 74.3 | 66.6 | 80.9 | 45.1 | 91.4 | 82.9 | 89.1 | 99.7 | 78.8±1.0 |
Introduction
DocLoom is dedicated to structured text extraction from complex PDFs. Its core goal is to convert unstructured PDF content into linearly organized plain text in natural reading order, while accurately preserving key structural information (e.g., chapter hierarchies, tables, lists, formulas) to provide high-quality data for downstream tasks such as document parsing, information retrieval, and data mining.
- Based on the Qwen3-VL-4B-Instruct architecture, improve the special adaptability of PDF processing through Supervised Fine-Tuning (SFT).
- Adopt "existing data + synthetic data" dual-source training, with a focus on enhancing the performance of PDF processing in the medical field.
- On olmOCR-Bench , compared with other models of the same parameter scale, WiNGPT-OCR-4B has achieved excellent performance.
How to Use
Transformers (Recommended)
Refer to Qwen3-VL-4B-Instruct for guidance on model inference acceleration and PDF processing, etc.
vLLM (Recommended)
For high-performance inference and deployment, we recommend using vLLM. We also provide a standalone script for efficiently processing multi-page PDF documents. This script operates independently and does not require the official olmOCR toolkit, offering a lightweight and fast way to perform OCR on entire documents.
python DocLoom_test.py <pdf_file_path>
Acknowledgement
We express our gratitude to the teams that developed olmOCR and Qwen3-VL, which were instrumental in our research.
- Downloads last month
- 14
