Image-Text-to-Text
MiniCPM-OCR
English
Chinese
minicpm_ocr
ocr
document-parsing
multimodal
vision-language
table-recognition
formula-recognition
conversational
Instructions to use FastFlowLM/MiniCPM-OCR-1.0-NPU2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MiniCPM-OCR
How to use FastFlowLM/MiniCPM-OCR-1.0-NPU2 with MiniCPM-OCR:
pip install "minicpm-ocr[all]" huggingface_hub # Deploy FastFlowLM/MiniCPM-OCR-1.0-NPU2 as a recognition service before running the Python example: # https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/vllm_deploy_en.md # vLLM: load the model above; use --port 8080, # --served-model-name minicpm-ocr and --max-model-len 40960. # Layout detection uses cuda:0; recognition runs on the deployed service.
from importlib.resources import files from pathlib import Path from minicpmvocr import load_config, pipelined_run from huggingface_hub import snapshot_download layout_model = snapshot_download("PaddlePaddle/PP-DocLayoutV3") cfg = load_config( str(files("minicpmvocr").joinpath("configs/minicpmvocr.yaml")), overrides={ "input": {"file_path": str(Path("demo.png").resolve())}, "engine": { "type": "vllm", "server_url": "http://127.0.0.1:8080", "model_name": "minicpm-ocr", "max_model_len": 40960, }, "layout": {"model_dir": layout_model, "device": "cuda:0"}, # Render PDFs in-process so this example also works without a main guard. "pipeline": {"overlap_layout": True, "render_workers": 1}, }, ) pipelined_run(cfg) - Notebooks
- Google Colab
- Kaggle
Download model.q4nx from FastFlowLM/MiniCPM-OCR-1.0-NPU2: direct link, hf CLI and curl.
- Browser
- Download file 1.07 GB
-
https://huggingface.co/FastFlowLM/MiniCPM-OCR-1.0-NPU2/resolve/main/model.q4nx
- Command line
-
hf download hf://FastFlowLM/MiniCPM-OCR-1.0-NPU2/model.q4nx
-
curl -L -o model.q4nx https://huggingface.co/FastFlowLM/MiniCPM-OCR-1.0-NPU2/resolve/main/model.q4nx
1.07 GB
- Xet hash:
- eadb818a46375c81ff43946fa4b1efe91f75dac55ea4bf91c5d6897a3ebaa96a
- Size of remote file:
- 1.07 GB
- SHA256:
- 90993e9aa44fccc827962290a675647e46d3dd0eec3095ea83a0eb22d8dfa26d
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.