Tencent/WeVisDoc-4B

Model

WeVisDoc

41

3 commits

2 linked in READMEs

updated Sep 18, 2026

See the code

README

WeVisDoc

English | 简体中文

GitHub Project Page WeVisDoc-4B WeVisDoc-2B Technical Report

WeVisDoc is an end-to-end document parser for page images. Fine-tuned from Qwen3-VL-2B-Instruct and Qwen3-VL-4B-Instruct, it turns a page into structured Markdown, with LaTeX formulas and HTML tables.

WeVisDoc-4B achieves an Overall score of 95.38 on OmniDocBench v1.6 and a mean Overall score of 75.54 across the three PureDocBench tracks, ranking first among the compared end-to-end parsers in all four settings.

WeVisDoc-4B leads the compared end-to-end parsers across all four reported settings.

WeVisDoc-4B leads the compared end-to-end parsers across all four reported settings. Bars show scores on OmniDocBench v1.6 and PureDocBench Clean, Digital, and Real.

Evaluation

The following tables include end-to-end document parsing specialists only. WeVisDoc results are means over three inference runs.

OmniDocBench v1.6

ModelParamsOverall ↑TextEdit ↓FormulaCDM ↑TableTEDS ↑TableTEDS_S ↑ROEdit ↓
Nanonets-OCR2*3B83.200.10880.3580.1085.260.211
OCRFlux-3B*3B83.310.12688.7573.7877.980.217
POINTS-Reader3B83.370.09685.7273.9877.400.198
Nanonets-OCR-s3B83.610.10881.4680.1884.510.213
olmOCR-2-7B*7B85.510.10688.8478.3282.810.223
olmOCR7B85.740.13988.1083.0087.170.216
DeepSeek-OCR*3B86.310.07784.7181.8786.070.171
OCRVerse4B88.600.06389.6182.4486.270.163
UniRec-0.1B*0.1B88.910.08892.1483.4086.790.146
DeepSeek-OCR 23B90.250.05091.8483.8987.750.144
dots.ocr3B90.770.04889.9587.1890.580.138
FD-RL*4B91.210.05592.9286.2290.920.145
HunyuanOCR1B92.030.04888.6092.3793.990.138
dots.mocr*3B92.570.04292.0989.7892.920.133
FireRed-OCR2B93.260.03795.4488.0491.060.131
Logics-Parsing-v24B93.330.04195.6588.4291.980.137
Qianfan-OCR4B93.900.04095.0890.5393.310.130
Unlimited-OCR3B-A0.5B93.920.04295.7990.1693.320.129
HunyuanOCR-1.51B94.740.03994.5093.6794.710.129
WeVisDoc-2B2B95.060.03895.9493.0395.260.130
WeVisDoc-4B4B95.380.03696.8192.9595.340.125

PureDocBench

ModelParamsAvg₃ ↑Clean Overall ↑Digital Degraded Overall ↑Real Degraded Overall ↑
OCRFlux-3B3B42.0647.1441.8237.21
DeepSeek-OCR3B46.9853.5046.9540.48
UniRec-0.1B0.1B48.5958.9152.4234.44
POINTS-Reader*3B49.2453.7851.2442.69
DeepSeek-OCR-23B49.5155.5349.4143.60
Qianfan-OCR4B51.0457.2250.8545.06
olmOCR-7B7B55.9062.5657.8447.30
Nanonets-OCR23B58.3664.8361.2349.03
HunyuanOCR1B60.5665.6161.4954.58
Unlimited-OCR*3B-A0.5B62.7671.2863.6253.39
olmOCR-2-7B7B63.7869.3665.8756.10
dots.ocr3B64.5572.0165.9555.68
Nanonets-OCR-s*3B65.3771.2666.5658.28
FireRed-OCR2B65.5770.8168.4957.42
HunyuanOCR-1.5*1B68.7973.9870.8161.59
OCRVerse4B69.4073.1871.3663.66
dots.mocr3B70.3976.2773.1661.73
Logics-Parsing-v24B72.6176.3573.8567.64
FD-RL4B73.9278.3876.3367.04
WeVisDoc-2B2B73.8679.3676.6265.60
WeVisDoc-4B4B75.5479.8177.7469.08

Avg₃ is the mean of the three PureDocBench track-level Overall scores. * marks baseline results obtained with our evaluation pipeline; unmarked baseline results are taken from the corresponding papers.

Quick start

Python 3.10+ is required. Install the vLLM and client dependencies:

python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements-vllm.txt

Start the service in the first terminal:

bash scripts/serve_vllm.sh Tencent/WeVisDoc-2B

Use Tencent/WeVisDoc-4B instead to run the 4B version.

Then process all bundled images from a second terminal:

source .venv/bin/activate
bash scripts/run_demo.sh

Predictions are written to outputs/predictions/.

Serve with vLLM

python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements-vllm.txt
bash scripts/serve_vllm.sh Tencent/WeVisDoc-2B

Replace the model ID with Tencent/WeVisDoc-4B to serve the 4B version. The launcher requires vLLM >=0.11.1. Extra arguments are passed to vLLM. To expose the service on the network, set HOST=0.0.0.0. For two GPUs and a larger context:

CUDA_VISIBLE_DEVICES=0,1 TENSOR_PARALLEL_SIZE=2 MAX_MODEL_LEN=65536 \
  bash scripts/serve_vllm.sh Tencent/WeVisDoc-4B --dtype bfloat16
curl --fail http://127.0.0.1:8000/health
Environment variableDefaultMeaning
WEVISDOC_MODEL_PATH / MODEL_PATHUnsetModel ID or checkpoint; positional argument takes precedence, then WEVISDOC_MODEL_PATH
SERVED_MODEL_NAMEwevisdocAPI model alias; also read by the client
HOST / PORT127.0.0.1 / 8000Listening address
TENSOR_PARALLEL_SIZE1Number of tensor-parallel GPUs
MAX_MODEL_LEN32768Total context budget: text, image and output tokens
GPU_MEMORY_UTILIZATION0.9GPU memory fraction
MAX_NUM_SEQS8Maximum concurrent sequences
OMP_NUM_THREADS1CPU preprocessing threads
VLLM_API_KEYUnsetOptional server authentication, handled by vLLM

Use a separate virtual environment from Transformers to avoid conflicting PyTorch packages.

Call the service

A client machine only needs python -m pip install -r requirements.txt. The examples expect PNG, JPEG, or WebP page images:

python -m wevisdoc.client --image page.png --output results/page.md
python -m wevisdoc.client --image-dir images --result-dir results --workers 4

--image-dir processes images in that directory (not recursively) and writes one Markdown file per image, such as results/page.png.md. Existing nonempty results are skipped unless --overwrite is set.

To process every bundled image in demos/inputs/:

OPENAI_BASE_URL=http://127.0.0.1:8000/v1 \
  bash scripts/run_demo.sh --workers 4

The demo writes one Markdown file per image to outputs/predictions/.

The client reads OPENAI_BASE_URL (default http://127.0.0.1:8000/v1), OPENAI_API_KEY (default EMPTY), and SERVED_MODEL_NAME. Match OPENAI_API_KEY to VLLM_API_KEY when authentication is enabled.

Override defaults with --base-url, --model, --timeout (600 seconds), --temperature (0), or --max-tokens (8192). Increase the token or context budget if output is truncated; reduce image size, context, or concurrency if GPU memory is insufficient.

Local Transformers inference

Use a separate environment from vLLM:

python -m pip install -r requirements-local.txt
python -m wevisdoc.local --model Tencent/WeVisDoc-2B \
  --image page.png --output results/page.md

Use Tencent/WeVisDoc-4B for the 4B version. --model can be omitted when WEVISDOC_MODEL_PATH is set. Local inference supports --device-map (default auto) and --max-tokens (8192). Render PDFs to page images first.

Citation

@article{wevisdoc,
  title   = {WeVisDoc: From Coverage to Capability for Robust End-to-End Document Parsing},
  author  = {Hao Yu and Kang Liu and Linnan Zhao and Jiabo Zhan and Chong Sun and Chen Li and Jing Lyu},
  year    = {2026},
  journal = {arXiv preprint arXiv: 2609.20423}
}
eval-results
qwen3_vl
safetensors

Contributors

Longin-Yu

2 commits

TencentOpen

1 commits

Tencent/WeVisDoc-4B

Model

WeVisDoc

41

3 commits

2 linked in READMEs

updated Sep 18, 2026

See the code

README

WeVisDoc

English | 简体中文

GitHub Project Page WeVisDoc-4B WeVisDoc-2B Technical Report

WeVisDoc is an end-to-end document parser for page images. Fine-tuned from Qwen3-VL-2B-Instruct and Qwen3-VL-4B-Instruct, it turns a page into structured Markdown, with LaTeX formulas and HTML tables.

WeVisDoc-4B achieves an Overall score of 95.38 on OmniDocBench v1.6 and a mean Overall score of 75.54 across the three PureDocBench tracks, ranking first among the compared end-to-end parsers in all four settings.

WeVisDoc-4B leads the compared end-to-end parsers across all four reported settings.

WeVisDoc-4B leads the compared end-to-end parsers across all four reported settings. Bars show scores on OmniDocBench v1.6 and PureDocBench Clean, Digital, and Real.

Evaluation

The following tables include end-to-end document parsing specialists only. WeVisDoc results are means over three inference runs.

OmniDocBench v1.6

ModelParamsOverall ↑TextEdit ↓FormulaCDM ↑TableTEDS ↑TableTEDS_S ↑ROEdit ↓
Nanonets-OCR2*3B83.200.10880.3580.1085.260.211
OCRFlux-3B*3B83.310.12688.7573.7877.980.217
POINTS-Reader3B83.370.09685.7273.9877.400.198
Nanonets-OCR-s3B83.610.10881.4680.1884.510.213
olmOCR-2-7B*7B85.510.10688.8478.3282.810.223
olmOCR7B85.740.13988.1083.0087.170.216
DeepSeek-OCR*3B86.310.07784.7181.8786.070.171
OCRVerse4B88.600.06389.6182.4486.270.163
UniRec-0.1B*0.1B88.910.08892.1483.4086.790.146
DeepSeek-OCR 23B90.250.05091.8483.8987.750.144
dots.ocr3B90.770.04889.9587.1890.580.138
FD-RL*4B91.210.05592.9286.2290.920.145
HunyuanOCR1B92.030.04888.6092.3793.990.138
dots.mocr*3B92.570.04292.0989.7892.920.133
FireRed-OCR2B93.260.03795.4488.0491.060.131
Logics-Parsing-v24B93.330.04195.6588.4291.980.137
Qianfan-OCR4B93.900.04095.0890.5393.310.130
Unlimited-OCR3B-A0.5B93.920.04295.7990.1693.320.129
HunyuanOCR-1.51B94.740.03994.5093.6794.710.129
WeVisDoc-2B2B95.060.03895.9493.0395.260.130
WeVisDoc-4B4B95.380.03696.8192.9595.340.125

PureDocBench

ModelParamsAvg₃ ↑Clean Overall ↑Digital Degraded Overall ↑Real Degraded Overall ↑
OCRFlux-3B3B42.0647.1441.8237.21
DeepSeek-OCR3B46.9853.5046.9540.48
UniRec-0.1B0.1B48.5958.9152.4234.44
POINTS-Reader*3B49.2453.7851.2442.69
DeepSeek-OCR-23B49.5155.5349.4143.60
Qianfan-OCR4B51.0457.2250.8545.06
olmOCR-7B7B55.9062.5657.8447.30
Nanonets-OCR23B58.3664.8361.2349.03
HunyuanOCR1B60.5665.6161.4954.58
Unlimited-OCR*3B-A0.5B62.7671.2863.6253.39
olmOCR-2-7B7B63.7869.3665.8756.10
dots.ocr3B64.5572.0165.9555.68
Nanonets-OCR-s*3B65.3771.2666.5658.28
FireRed-OCR2B65.5770.8168.4957.42
HunyuanOCR-1.5*1B68.7973.9870.8161.59
OCRVerse4B69.4073.1871.3663.66
dots.mocr3B70.3976.2773.1661.73
Logics-Parsing-v24B72.6176.3573.8567.64
FD-RL4B73.9278.3876.3367.04
WeVisDoc-2B2B73.8679.3676.6265.60
WeVisDoc-4B4B75.5479.8177.7469.08

Avg₃ is the mean of the three PureDocBench track-level Overall scores. * marks baseline results obtained with our evaluation pipeline; unmarked baseline results are taken from the corresponding papers.

Quick start

Python 3.10+ is required. Install the vLLM and client dependencies:

python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements-vllm.txt

Start the service in the first terminal:

bash scripts/serve_vllm.sh Tencent/WeVisDoc-2B

Use Tencent/WeVisDoc-4B instead to run the 4B version.

Then process all bundled images from a second terminal:

source .venv/bin/activate
bash scripts/run_demo.sh

Predictions are written to outputs/predictions/.

Serve with vLLM

python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements-vllm.txt
bash scripts/serve_vllm.sh Tencent/WeVisDoc-2B

Replace the model ID with Tencent/WeVisDoc-4B to serve the 4B version. The launcher requires vLLM >=0.11.1. Extra arguments are passed to vLLM. To expose the service on the network, set HOST=0.0.0.0. For two GPUs and a larger context:

CUDA_VISIBLE_DEVICES=0,1 TENSOR_PARALLEL_SIZE=2 MAX_MODEL_LEN=65536 \
  bash scripts/serve_vllm.sh Tencent/WeVisDoc-4B --dtype bfloat16
curl --fail http://127.0.0.1:8000/health
Environment variableDefaultMeaning
WEVISDOC_MODEL_PATH / MODEL_PATHUnsetModel ID or checkpoint; positional argument takes precedence, then WEVISDOC_MODEL_PATH
SERVED_MODEL_NAMEwevisdocAPI model alias; also read by the client
HOST / PORT127.0.0.1 / 8000Listening address
TENSOR_PARALLEL_SIZE1Number of tensor-parallel GPUs
MAX_MODEL_LEN32768Total context budget: text, image and output tokens
GPU_MEMORY_UTILIZATION0.9GPU memory fraction
MAX_NUM_SEQS8Maximum concurrent sequences
OMP_NUM_THREADS1CPU preprocessing threads
VLLM_API_KEYUnsetOptional server authentication, handled by vLLM

Use a separate virtual environment from Transformers to avoid conflicting PyTorch packages.

Call the service

A client machine only needs python -m pip install -r requirements.txt. The examples expect PNG, JPEG, or WebP page images:

python -m wevisdoc.client --image page.png --output results/page.md
python -m wevisdoc.client --image-dir images --result-dir results --workers 4

--image-dir processes images in that directory (not recursively) and writes one Markdown file per image, such as results/page.png.md. Existing nonempty results are skipped unless --overwrite is set.

To process every bundled image in demos/inputs/:

OPENAI_BASE_URL=http://127.0.0.1:8000/v1 \
  bash scripts/run_demo.sh --workers 4

The demo writes one Markdown file per image to outputs/predictions/.

The client reads OPENAI_BASE_URL (default http://127.0.0.1:8000/v1), OPENAI_API_KEY (default EMPTY), and SERVED_MODEL_NAME. Match OPENAI_API_KEY to VLLM_API_KEY when authentication is enabled.

Override defaults with --base-url, --model, --timeout (600 seconds), --temperature (0), or --max-tokens (8192). Increase the token or context budget if output is truncated; reduce image size, context, or concurrency if GPU memory is insufficient.

Local Transformers inference

Use a separate environment from vLLM:

python -m pip install -r requirements-local.txt
python -m wevisdoc.local --model Tencent/WeVisDoc-2B \
  --image page.png --output results/page.md

Use Tencent/WeVisDoc-4B for the 4B version. --model can be omitted when WEVISDOC_MODEL_PATH is set. Local inference supports --device-map (default auto) and --max-tokens (8192). Render PDFs to page images first.

Citation

@article{wevisdoc,
  title   = {WeVisDoc: From Coverage to Capability for Robust End-to-End Document Parsing},
  author  = {Hao Yu and Kang Liu and Linnan Zhao and Jiabo Zhan and Chong Sun and Chen Li and Jing Lyu},
  year    = {2026},
  journal = {arXiv preprint arXiv: 2609.20423}
}
eval-results
qwen3_vl
safetensors

Contributors

Longin-Yu

2 commits

TencentOpen

1 commits