MinerU2.5-2509-1.2B

104.1K
348
16K
Large context
1.2B
2 languages
license:agpl-3.0
by
opendatalab
Image Model
OTHER
1.2B params
Good
104K downloads
Production-ready
Edge AI:
Mobile
Laptop
Server
3GB+ RAM
Mobile
Laptop
Server
Quick Summary

--- license: agpl-3.0 language: - zh - en pipeline_tag: image-text-to-text library_name: transformers ---

Device Compatibility

Mobile
4-6GB RAM
Laptop
16GB RAM
Server
GPU
Minimum Recommended
2GB+ RAM

Code Examples

Install packagesbashvllm
# For `transformers` backend
pip install "mineru-vl-utils[transformers]"
# For `vllm-engine` and `vllm-async-engine` backend
pip install "mineru-vl-utils[vllm]"
vllm (recommended — 2.12 fps on A100)pythonvllm
# pip install "mineru-vl-utils[vllm]"
from vllm import LLM
from PIL import Image
from mineru_vl_utils import MinerUClient, MinerULogitsProcessor

client = MinerUClient(
    backend="vllm-engine",
    vllm_llm=LLM(model="opendatalab/MinerU2.5-2509-1.2B",
                 logits_processors=[MinerULogitsProcessor])
)
print(client.two_step_extract(Image.open("/path/to/page.png")))
vllm-async (concurrent batch)pythonvllm
# pip install "mineru-vl-utils[vllm]"
import asyncio, io, aiofiles
from vllm.v1.engine.async_llm import AsyncLLM
from vllm.engine.arg_utils import AsyncEngineArgs
from PIL import Image
from mineru_vl_utils import MinerUClient, MinerULogitsProcessor

async_llm = AsyncLLM.from_engine_args(
    AsyncEngineArgs(model="opendatalab/MinerU2.5-2509-1.2B",
                    logits_processors=[MinerULogitsProcessor])
)
client = MinerUClient(backend="vllm-async-engine", vllm_async_llm=async_llm)

async def main():
    async with aiofiles.open("/path/to/page.png", "rb") as f:
        image = Image.open(io.BytesIO(await f.read()))
    print(await client.aio_two_step_extract(image))

asyncio.run(main())
async_llm.shutdown()
☁️ Cloud API — No GPU Requiredbash
# Windows (PowerShell)
irm https://cdn-mineru.openxlab.org.cn/open-api-cli/install.ps1 | iex

# macOS / Linux
curl -fsSL https://cdn-mineru.openxlab.org.cn/open-api-cli/install.sh | sh

# Flash extract — no login, Markdown only
mineru-open-api flash-extract report.pdf

# Precision extract — token required
mineru-open-api auth
mineru-open-api extract report.pdf -o ./output/
Precision extract — token requiredpython
# pip install mineru-open-sdk
from mineru import MinerU

# Flash mode — free, no token
result = MinerU().flash_extract("report.pdf")
print(result.markdown)

# Precision mode — tables, formulas, large files
client = MinerU("your-token")  # https://mineru.net/apiManage/token
result = client.extract("report.pdf")
print(result.markdown)
https://mineru.net/apiManage/tokenpythonopenai
# pip install langchain-mineru
from langchain_mineru import MinerULoader

# Flash mode — free, no token
docs = MinerULoader(source="report.pdf").load()
print(docs[0].page_content)

# Precision mode — full RAG pipeline
from langchain_text_splitters import RecursiveCharacterTextSplitter
from langchain_openai import OpenAIEmbeddings
from langchain_community.vectorstores import FAISS

docs = MinerULoader(source="manual.pdf", mode="precision", token="your-token",
                    formula=True, table=True).load()
chunks = RecursiveCharacterTextSplitter(chunk_size=1200, chunk_overlap=200).split_documents(docs)
vectorstore = FAISS.from_documents(chunks, OpenAIEmbeddings())
results = vectorstore.similarity_search("key requirements", k=3)
RAG — LlamaIndexpython
# pip install llama-index-readers-mineru
from llama_index.readers.mineru import MinerUReader

# Flash mode — free, no token
docs = MinerUReader().load_data("report.pdf")
print(docs[0].text)

# Precision mode — OCR, formula, table
docs = MinerUReader(mode="precision", token="your-token",
                    ocr=True, formula=True, table=True).load_data("paper.pdf")

# Full RAG pipeline
from llama_index.core import VectorStoreIndex
index = VectorStoreIndex.from_documents(docs)
response = index.as_query_engine().query("Summarize the key findings")
print(response)

Deploy This Model

Production-ready deployment in minutes

Together.ai

Instant API access to this model

Fastest API

Production-ready inference API. Start free, scale to millions.

Try Free API

Replicate

One-click model deployment

Easiest Setup

Run models in the cloud with simple API. No DevOps required.

Deploy Now

Disclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.