Instructions to use nativ-community/MiniCPM-OCR-Jev-6bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use nativ-community/MiniCPM-OCR-Jev-6bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download nativ-community/MiniCPM-OCR-Jev-6bit --local-dir MiniCPM-OCR-Jev-6bit
- MiniCPM-OCR
How to use nativ-community/MiniCPM-OCR-Jev-6bit with MiniCPM-OCR:
pip install "minicpm-ocr[all]" huggingface_hub # Deploy nativ-community/MiniCPM-OCR-Jev-6bit 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
- Local Apps Settings
- LM Studio
- Atomic Chat
File size: 390 Bytes
991d3d4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | {
"size": {
"longest_edge": 16777216,
"shortest_edge": 65536
},
"patch_size": 16,
"temporal_patch_size": 2,
"merge_size": 2,
"image_mean": [
0.5,
0.5,
0.5
],
"image_std": [
0.5,
0.5,
0.5
],
"processor_class": "Qwen3VLProcessor",
"image_processor_type": "Qwen2VLImageProcessorFast"
} |