Overview
Logics-Parsing-v2 is an open-source multimodal document parsing model developed by Alibaba that converts document images into structured HTML output. Unlike traditional OCR pipelines that chain multiple specialized models together, Logics-Parsing-v2 uses a single end-to-end architecture to recognize and parse diverse document elements — tables, formulas, figures, text blocks, and layouts — in one inference pass.
The model targets technically demanding documents: STEM research papers, chemical diagrams, musical notation, and complex multi-column layouts that trip up general-purpose vision-language models. It outputs structured HTML with element categories and bounding box coordinates, and is released under the Apache 2.0 license for free commercial and research use. With a score of 93.23 on OmniDocBench-v1.5 and 82.16 on the in-house LogicsDocBench, it benchmarks ahead of GPT-5, Gemini 2.5, Mathpix, and Marker on complex document parsing tasks.
For adjacent research, compare AI music generator tools.
Key Features
Single-Model End-to-End Parsing
Logics-Parsing-v2 eliminates multi-stage document processing pipelines by handling layout detection, OCR, structure recognition, and output formatting within a single model. This reduces the error compounding that occurs when stitching together separate layout detectors, OCR engines, and structure parsers.
STEM Content Recognition
The model is specifically trained for scientific and technical documents. It parses mathematical formulas (inline and display), physics and engineering notation, and renders them correctly in structured output. This addresses a common failure mode of general-purpose models that garble or skip formula regions.
Chemical Structure Recognition
The Logics-Parsing model family includes chemical structure recognition as a documented capability. The project documentation describes chemical structure parsing as part of the core scope inherited across versions. Verify SMILES output behavior for v2 specifically against the official model card before relying on it in production cheminformatics pipelines.
Parsing-2.0 Scenarios
Beyond standard document elements, the model handles a category of emerging content types it calls "Parsing-2.0": flowcharts, musical notation, pseudocode blocks, and mind maps. These complex visual structures are typically ignored or incorrectly handled by OCR-focused tools.
Structured HTML Output with Bounding Boxes
Every parsed element is output as HTML tagged with its content category, bounding box coordinates, and OCR text. Headers, footers, and irrelevant page artifacts are automatically filtered. The structured format integrates directly with downstream AI data analysis pipelines without additional post-processing.
Bilingual Document Support
The model supports documents in English and Chinese, covering two of the largest bodies of academic and technical publishing globally.
How to Get Started
Logics-Parsing-v2 requires Python 3.10 and runs locally after downloading model weights from Hugging Face or ModelScope.
1. Set up environment
conda create -n logics-parsing-v2 python=3.10
conda activate logics-parsing-v2
pip install -r requirements.txt
2. Download model weights
Model weights are available on Hugging Face (Logics-MLLM/Logics-Parsing-v2) and ModelScope. Use the provided download scripts in the repository.
3. Run inference
python3 inference_v2.py \
--image_path [INPUT_IMAGE] \
--output_path [OUTPUT_DIR] \
--model_path [MODEL_DIR]
The model accepts document images as input and writes structured HTML to the output directory. A ModelScope interactive demo is also available for testing without local installation.
Performance Benchmarks
| Benchmark | Score | Notes |
|---|---|---|
| OmniDocBench-v1.5 | 93.23 | Public benchmark — surpasses GPT-5, Gemini 2.5, Mathpix, Marker, Mineru2 |
| LogicsDocBench (Overall) | 82.16 | In-house benchmark, 900-page evaluation dataset |
| LogicsDocBench — STEM | — | 218-page STEM document subset |
| LogicsDocBench — Complex Layout | — | 459-page complex layout subset |
| LogicsDocBench — Parsing-2.0 | — | 223-page flowchart/music/pseudocode subset |
The LogicsDocBench evaluation covers three categories that represent the model's design targets: STEM documents, challenging layouts, and Parsing-2.0 content types. Subset sizes by category are documented in the repository README and model card: STEM (218 pages), Complex Layout (459 pages), and Parsing-2.0 (223 pages).
How It Compares
| Tool | Type | STEM Formulas | Chemical Structures | Flowcharts | License |
|---|---|---|---|---|---|
| Logics-Parsing-v2 | Open-source model | ✅ | ✅ SMILES | ✅ | Apache 2.0 |
| GPT-5 | API — paid | Varies by prompt | Not officially verified | Not officially verified | Proprietary |
| Gemini 2.5 | API — paid | ⚠️ Partial | ❌ | ⚠️ Partial | Proprietary |
| Mathpix | SaaS — paid | ✅ | ❌ | ❌ | Proprietary |
| Marker | Open-source | ⚠️ Partial | ❌ | ❌ | GPL-3.0 |
| Mineru2 | Open-source | ⚠️ Partial | ❌ | ❌ | Apache 2.0 |
Logics-Parsing-v2's primary advantage over general-purpose VLMs like GPT-5 and Gemini 2.5 is purpose-built training on complex document structures, particularly STEM content and Parsing-2.0 scenarios. Compared to Mathpix, Logics-Parsing-v2 is free and open-source under Apache 2.0. The primary deployment path is local, with downloaded model weights.
Pricing & Plans
Logics-Parsing-v2 is open-source under the Apache 2.0 license. It is free to use, and Apache 2.0 permits commercial use, modification, and distribution subject to the license terms. There are no API tiers, usage limits, or subscription fees.
Infrastructure costs depend on deployment environment. The model requires GPU compute for practical inference throughput — users running it locally are responsible for their own hardware or cloud compute costs. A hosted demo is available on ModelScope for evaluation.
Best For
- Research teams and data engineers building document digitization pipelines for academic or scientific corpora
- Organizations processing STEM-heavy documents (physics papers, chemistry reports, engineering manuals) where formula and structure fidelity matters
- Developers who need free, commercially licensed document parsing they can self-host without per-call API costs
- Pharmaceutical and materials science teams requiring chemical structure extraction in machine-readable SMILES format
- Projects that need to parse flowcharts, pseudocode, or musical notation embedded in technical documents
- Teams comparing open-source document AI options alongside AI data annotation tooling for their ML pipeline
FAQ
Does Logics-Parsing-v2 require a GPU to run?
The official quick-start documentation focuses on local deployment with downloaded model weights via conda and pip. A ModelScope hosted demo is available for evaluation without local setup. Check the repository README for specific hardware requirements before deploying.
What output format does Logics-Parsing-v2 produce?
The model outputs structured HTML. Each content block is tagged with its element category (table, formula, text block, figure, etc.), bounding box coordinates, and OCR text. Headers, footers, and page artifacts are automatically filtered from the output.
Can I use Logics-Parsing-v2 commercially?
Yes. The Apache 2.0 license permits commercial use, modification, and redistribution. There are no royalty fees or usage restrictions beyond the standard Apache 2.0 attribution requirements.
How does Logics-Parsing-v2 handle chemical structures?
The Logics-Parsing model family documents chemical structure recognition as part of its core capability scope. Verify whether SMILES output is confirmed for the v2 model specifically in the official model card before building production cheminformatics workflows on this assumption.
What is "Parsing-2.0" and which content types does it cover?
Parsing-2.0 is Alibaba's term for a category of complex visual document content beyond standard text, tables, and formulas. It includes flowcharts, musical notation sheets, pseudocode blocks, and mind maps. Logics-Parsing-v2 is trained to recognize and structure these content types, which are typically ignored or mishandled by general-purpose document parsers.




