Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

Duplicated from  openbmb/MiniCPM-OCR-1.0-DSpark

AIArchiveInfo
/
MiniCPM-OCR-1.0-DSpark

Image-Text-to-Text
MiniCPM-OCR
Safetensors
English
Chinese
qwen3
dspark
speculative-decoding
draft-model
ocr
multimodal
Model card Files Files and versions
xet
Community

Instructions to use AIArchiveInfo/MiniCPM-OCR-1.0-DSpark with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MiniCPM-OCR

    How to use AIArchiveInfo/MiniCPM-OCR-1.0-DSpark with MiniCPM-OCR:

    pip install "minicpm-ocr[all]" huggingface_hub
    
    # Deploy AIArchiveInfo/MiniCPM-OCR-1.0-DSpark 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
MiniCPM-OCR-1.0-DSpark
595 MB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 1 commit
Browang1's picture
Browang1
tc-mb's picture
tc-mb
Duplicate from openbmb/MiniCPM-OCR-1.0-DSpark
15777cd 17 days ago
  • .gitattributes
    1.52 kB
    Duplicate from openbmb/MiniCPM-OCR-1.0-DSpark 17 days ago
  • README.md
    5.23 kB
    Duplicate from openbmb/MiniCPM-OCR-1.0-DSpark 17 days ago
  • config.json
    1.41 kB
    Duplicate from openbmb/MiniCPM-OCR-1.0-DSpark 17 days ago
  • model.safetensors
    595 MB
    xet
    Duplicate from openbmb/MiniCPM-OCR-1.0-DSpark 17 days ago