Fast, accurate OCR with correctness assessment.
docs: rename minicpmvocr guides to minicpm_ocr
hezhihuif54cf2e6b08f
diff --git a/README.md b/README.mdindex 3abb873..3367375 100644--- a/README.md+++ b/README.md@@ -168,7 +168,7 @@ Use the Free API to access MiniCPM-OCR 1.0 recognition and MiniCPM-OCR Jev qualiRun the models on your own hardware: MiniCPM-OCR 1.0 parses PDFs and images into Markdown or JSON, while MiniCPM-OCR Jev scores the parsing results.-[MiniCPM-OCR 1.0 deployment tutorial](./docs/minicpmvocr_tutorial_en.md) · [MiniCPM-OCR Jev deployment tutorial](./docs/minicpm_ocr_jev_tutorial_en.md)+[MiniCPM-OCR 1.0 deployment tutorial](./docs/minicpm_ocr_tutorial_en.md) · [MiniCPM-OCR Jev deployment tutorial](./docs/minicpm_ocr_jev_tutorial_en.md)<a id="模型微调"></a>diff --git a/README_zh.md b/README_zh.mdindex 191ea54..e250feb 100644--- a/README_zh.md+++ b/README_zh.md@@ -166,7 +166,7 @@ Read and execute https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/SKILL_jev在自己的设备上运行模型:MiniCPM-OCR 1.0 将 PDF 和图片解析为 Markdown 或 JSON,MiniCPM-OCR Jev 对解析结果评分。-[MiniCPM-OCR 1.0 部署教程](./docs/minicpmvocr_tutorial.md) · [MiniCPM-OCR Jev 部署教程](./docs/minicpm_ocr_jev_tutorial_zh.md)+[MiniCPM-OCR 1.0 部署教程](./docs/minicpm_ocr_tutorial.md) · [MiniCPM-OCR Jev 部署教程](./docs/minicpm_ocr_jev_tutorial_zh.md)<a id="fine-tuning"></a>diff --git a/docs/SKILL.md b/docs/SKILL.mdindex 7aec149..e683ec6 100644--- a/docs/SKILL.md+++ b/docs/SKILL.md@@ -13,7 +13,7 @@ SDK(命令 `minicpmvocr`,发行包 `minicpm-ocr`)负责版面检测、切| 情况 | 推理环境 | SDK 后端 | 详细参考 ||---|---|---|---|-| Linux x86_64 + NVIDIA,默认方案 | `.venv-vllm`,可用 DSpark | `vllm` | [SDK 教程](./minicpmvocr_tutorial.md) |+| Linux x86_64 + NVIDIA,默认方案 | `.venv-vllm`,可用 DSpark | `vllm` | [SDK 教程](./minicpm_ocr_tutorial.md) || Linux x86_64 + NVIDIA,选择 SGLang | `.venv-sglang`,可用 DSpark | `sglang` | [SGLang 指南](./sglang_deploy_zh.md) || CPU、本地 GPU 或 Apple Silicon,选择 llama.cpp | `sources/llama.cpp/build`,使用 GGUF,可用 DSpark | `llamacpp` | [llama.cpp 指南](./llamacpp_deploy_zh.md) || 已有兼容推理服务 | 复用服务,只装 SDK | 按服务协议选择 | 本文第 7 节 |@@ -35,7 +35,7 @@ cd MiniCPM-OCR| 组件 | 当前来源 / 版本 ||---|---|-| SDK | PyPI 包 `minicpm-ocr[all]`,默认安装或升级到与当前 Python 兼容的最新稳定版,与 [SDK 教程](./minicpmvocr_tutorial.md)一致 |+| SDK | PyPI 包 `minicpm-ocr[all]`,默认安装或升级到与当前 Python 兼容的最新稳定版,与 [SDK 教程](./minicpm_ocr_tutorial.md)一致 || Python | 安装脚本默认 `3.12`;根项目要求 `>=3.11,<3.14`(SDK 单独要求 `>=3.10`) || vLLM | `fa3b9d1377219247060d3c8b49eae199c9e7e154`,由安装脚本准备 || vLLM 依赖的 Transformers | `144ecf007b8b4f2910da104c84a79801db6985a6`,由根项目固定 |@@ -60,7 +60,7 @@ vLLM 完整环境按教程至少预留 40 GB 磁盘;内存有限时降低 `MAX## 3. 通过 pip 安装 SDK-按 [SDK 教程](./minicpmvocr_tutorial.md#1-sdk-环境配置)创建独立的 `.minicpm-ocr` 环境,再用 pip 安装已发布的 SDK 包。已有 uv 则直接复用;没有时可执行 `python3 -m pip install uv`。若系统 Python 受 PEP 668 管理,将 uv 装进单独的工具 venv。SDK 安装本身不需要 Git;自行部署推理服务时再准备 Git、curl 和编译工具。+按 [SDK 教程](./minicpm_ocr_tutorial.md#1-sdk-环境配置)创建独立的 `.minicpm-ocr` 环境,再用 pip 安装已发布的 SDK 包。已有 uv 则直接复用;没有时可执行 `python3 -m pip install uv`。若系统 Python 受 PEP 668 管理,将 uv 装进单独的工具 venv。SDK 安装本身不需要 Git;自行部署推理服务时再准备 Git、curl 和编译工具。默认先用 CPU 版面检测,避免占用推理卡;在支持此 PaddlePaddle wheel 的机器上执行:@@ -414,4 +414,4 @@ curl --noproxy 127.0.0.1 -fsS http://127.0.0.1:18499/metrics | grep spec_decode_汇报实际使用的后端、源码 SHA/包版本、模型文件、设备、地址,以及安装检查、健康检查、带图请求、单页解析分别通过与否。安装成功、服务就绪、识别正确、DSpark 生效是不同结论。不要在排错时删除用户环境、重置源码或用未核实的临时补丁掩盖版本不匹配。-参数与 API 细节见 [SDK 配置说明](./minicpmvocr_api.md);Jev 打分服务使用 [Jev Skill](./SKILL_jev.md),不混用其权重、分类架构和验证标准。+参数与 API 细节见 [SDK 配置说明](./minicpm_ocr_sdk_api.md);Jev 打分服务使用 [Jev Skill](./SKILL_jev.md),不混用其权重、分类架构和验证标准。diff --git a/docs/SKILL_en.md b/docs/SKILL_en.mdindex 301a19f..0546e04 100644--- a/docs/SKILL_en.md+++ b/docs/SKILL_en.md@@ -13,7 +13,7 @@ The SDK (command `minicpmvocr`, distribution `minicpm-ocr`) detects layout, crop| Situation | Inference environment | SDK backend | Detailed reference ||---|---|---|---|-| Linux x86_64 + NVIDIA, default route | `.venv-vllm`, DSpark available | `vllm` | [SDK tutorial](./minicpmvocr_tutorial_en.md) |+| Linux x86_64 + NVIDIA, default route | `.venv-vllm`, DSpark available | `vllm` | [SDK tutorial](./minicpm_ocr_tutorial_en.md) || Linux x86_64 + NVIDIA, SGLang selected | `.venv-sglang`, DSpark available | `sglang` | [SGLang guide](./sglang_deploy.md) || CPU, local GPU or Apple Silicon, llama.cpp selected | `sources/llama.cpp/build`, GGUF weights, DSpark available | `llamacpp` | [llama.cpp guide](./llamacpp_deploy.md) || Existing compatible inference service | Reuse it; install only the SDK | Select by protocol | Section 7 below |@@ -35,7 +35,7 @@ Before deploying an inference service yourself, read the root [`pyproject.toml`]| Component | Current source / version ||---|---|-| SDK | PyPI package `minicpm-ocr[all]`; install or upgrade to the latest stable version compatible with the current Python, matching the [SDK tutorial](./minicpmvocr_tutorial_en.md) |+| SDK | PyPI package `minicpm-ocr[all]`; install or upgrade to the latest stable version compatible with the current Python, matching the [SDK tutorial](./minicpm_ocr_tutorial_en.md) || Python | Installer default `3.12`; root project requires `>=3.11,<3.14` (SDK alone requires `>=3.10`) || vLLM | `fa3b9d1377219247060d3c8b49eae199c9e7e154`, prepared by the installer || Transformers required by vLLM | `144ecf007b8b4f2910da104c84a79801db6985a6`, pinned by the root project |@@ -60,7 +60,7 @@ Reserve at least 40 GB of disk space for the full vLLM setup described by the tu## 3. Install the SDK with pip-Follow the [SDK tutorial](./minicpmvocr_tutorial_en.md) to create a separate `.minicpm-ocr` environment, then install the published SDK package with pip. Reuse uv if installed; otherwise `python3 -m pip install uv` is an option. If system Python is managed under PEP 668, install uv in a separate tools venv. Installing the SDK itself does not require Git; provide Git, curl and build tools when deploying an inference service yourself.+Follow the [SDK tutorial](./minicpm_ocr_tutorial_en.md) to create a separate `.minicpm-ocr` environment, then install the published SDK package with pip. Reuse uv if installed; otherwise `python3 -m pip install uv` is an option. If system Python is managed under PEP 668, install uv in a separate tools venv. Installing the SDK itself does not require Git; provide Git, curl and build tools when deploying an inference service yourself.Start with CPU layout detection to avoid consuming inference VRAM. On a machine with a supported PaddlePaddle wheel, run:@@ -414,4 +414,4 @@ Report vLLM DSpark as active only when draft / accepted-token metrics increase wReport the actual backend, source SHAs/package versions, model files, device, endpoint and the separate outcomes of installation checks, health checks, image requests and one-page parsing. Installation success, service readiness, correct recognition and active DSpark are distinct conclusions. Do not delete user environments, reset source or conceal version mismatches with unverified temporary patches.-See [SDK configuration](./minicpmvocr_api_en.md) for parameter and API details. For Jev scoring, use the [Jev Skill](./SKILL_jev_en.md); its weights, classification architecture and validation criteria are separate.+See [SDK configuration](./minicpm_ocr_sdk_api_en.md) for parameter and API details. For Jev scoring, use the [Jev Skill](./SKILL_jev_en.md); its weights, classification architecture and validation criteria are separate.diff --git a/docs/benchmark_reproduction_en.md b/docs/benchmark_reproduction_en.mdindex 818924a..2693253 100644--- a/docs/benchmark_reproduction_en.md+++ b/docs/benchmark_reproduction_en.md@@ -102,11 +102,11 @@ In this evaluation, OmniDocBench, Real5, and olmOCR use internally packaged imag| Hardware | NVIDIA GeForce RTX 5090; all systems run on the same hardware || Metric | Pages processed per second (pages/s); higher values indicate higher throughput |-Image-level concurrency and recognition concurrency for regions within a page are separate settings, corresponding to `pipeline.page_workers` and `pipeline.max_workers` in the SDK. See the [SDK tutorial](./minicpmvocr_tutorial_en.md). Image-level concurrency of 1 does not imply that regions within each page are recognized sequentially.+Image-level concurrency and recognition concurrency for regions within a page are separate settings, corresponding to `pipeline.page_workers` and `pipeline.max_workers` in the SDK. See the [SDK tutorial](./minicpm_ocr_tutorial_en.md). Image-level concurrency of 1 does not imply that regions within each page are recognized sequentially.### Deployment and DSpark Acceleration-- [SDK tutorial](./minicpmvocr_tutorial_en.md): Install the environment, connect an inference backend, parse documents, and check outputs.+- [SDK tutorial](./minicpm_ocr_tutorial_en.md): Install the environment, connect an inference backend, parse documents, and check outputs.- [vLLM deployment guide](./vllm_deploy_en.md): Deploy the API service and check recognition results.A comparison with and without DSpark must use the same main-model weights, dataset, hardware, and SDK configuration, changing only whether DSpark is enabled. The deployment examples start the service; complete comparison commands and logs for reproducing the 55% improvement remain to be added.diff --git a/docs/benchmark_reproduction_zh.md b/docs/benchmark_reproduction_zh.mdindex 1afafdd..e1232b5 100644--- a/docs/benchmark_reproduction_zh.md+++ b/docs/benchmark_reproduction_zh.md@@ -101,11 +101,11 @@ GT 的页面版本必须与评测集对应,不能直接用 v1.6 full GT 替换| 指标 | 每秒处理页数(pages/s),数值越高表示吞吐越高 |-图片级并发与单页内文档块的识别并发是不同设置。SDK 中对应 `pipeline.page_workers` 和 `pipeline.max_workers`,详见 [SDK 使用教程](./minicpmvocr_tutorial.md)。上述图片级并发度为 1,不代表页内文档块也串行处理。+图片级并发与单页内文档块的识别并发是不同设置。SDK 中对应 `pipeline.page_workers` 和 `pipeline.max_workers`,详见 [SDK 使用教程](./minicpm_ocr_tutorial.md)。上述图片级并发度为 1,不代表页内文档块也串行处理。### 部署与 DSpark 加速-- [SDK 使用教程](./minicpmvocr_tutorial.md):安装环境、连接推理后端、解析文档与检查输出。+- [SDK 使用教程](./minicpm_ocr_tutorial.md):安装环境、连接推理后端、解析文档与检查输出。- [vLLM 部署指南](./vllm_deploy.md):部署 API 服务与检查识别结果。DSpark 前后对照需使用相同主模型权重、数据集、硬件和 SDK 配置,仅改变 DSpark 开关。部署指南中的示例用于启动服务;用于复现 55% 提升的完整对照命令和日志待补充。diff --git a/docs/faq_en.md b/docs/faq_en.mdindex 18130b1..14a1c98 100644--- a/docs/faq_en.md+++ b/docs/faq_en.md@@ -12,14 +12,14 @@ Common issues with installation, model download, GPU memory, input formats and u### `minicpmvocr parse` reports `--config` missing**Cause**: An older SDK version is installed. The current `parse` command supports a built-in quickstart configuration.-**Solution**: Install the current SDK as described in the [tutorial](./minicpmvocr_tutorial_en.md#1-set-up-the-sdk-environment), then run this command from the repository root with the recognition service running:+**Solution**: Install the current SDK as described in the [tutorial](./minicpm_ocr_tutorial_en.md#1-set-up-the-sdk-environment), then run this command from the repository root with the recognition service running:```bashminicpmvocr parse doc.pdf -o doc.md --device cuda:0 \--server-url http://127.0.0.1:18499 --model minicpm-ocr```-Pass `--server-url` and `--model` explicitly each time. For custom configuration, see [SDK API and Configuration](./minicpmvocr_api_en.md).+Pass `--server-url` and `--model` explicitly each time. For custom configuration, see [SDK API and Configuration](./minicpm_ocr_sdk_api_en.md).### `Could not find nvcc` (Blackwell/5090 first startup)**Cause**: FlashInfer JIT requires nvcc; pip's CUDA packages include the toolchain.<br>@@ -149,4 +149,4 @@ If the compatibility library is already installed, set `OCR_CUDA_COMPAT_DIR` to----For issues not covered here, refer to the [detailed tutorial](./minicpmvocr_tutorial_en.md) or open an issue on GitHub.+For issues not covered here, refer to the [detailed tutorial](./minicpm_ocr_tutorial_en.md) or open an issue on GitHub.diff --git a/docs/faq_zh.md b/docs/faq_zh.mdindex 5b89c44..2c838c7 100644--- a/docs/faq_zh.md+++ b/docs/faq_zh.md@@ -12,14 +12,14 @@### `minicpmvocr parse` 报告缺少 `--config`**原因**:安装的是旧版 SDK;当前版本的 `parse` 支持内置快速开始配置。-**解决**:按[教程](./minicpmvocr_tutorial.md#1-sdk-环境配置)安装当前 SDK,启动识别服务后,在仓库根目录运行:+**解决**:按[教程](./minicpm_ocr_tutorial.md#1-sdk-环境配置)安装当前 SDK,启动识别服务后,在仓库根目录运行:```bashminicpmvocr parse doc.pdf -o doc.md --device cuda:0 \--server-url http://127.0.0.1:18499 --model minicpm-ocr```-每次运行都需显式传入 `--server-url` 和 `--model`。自定义配置见 [SDK API 与配置说明](./minicpmvocr_api.md)。+每次运行都需显式传入 `--server-url` 和 `--model`。自定义配置见 [SDK API 与配置说明](./minicpm_ocr_sdk_api.md)。### `Could not find nvcc`(Blackwell/5090 首次启动)**原因**:FlashInfer JIT 需要 nvcc;pip 的 CUDA 包中已包含该工具链。<br>@@ -149,4 +149,4 @@ export OCR_LIBCUDA="$OCR_CUDA_COMPAT_DIR/libcuda.so.1"----若遇到本文未覆盖的问题,请参阅[详细教程](./minicpmvocr_tutorial.md)或在 GitHub 上提交 issue。+若遇到本文未覆盖的问题,请参阅[详细教程](./minicpm_ocr_tutorial.md)或在 GitHub 上提交 issue。diff --git a/docs/minicpm_ocr_1dot0_en.md b/docs/minicpm_ocr_1dot0_en.mdindex 5fd891f..e7a18b1 100644--- a/docs/minicpm_ocr_1dot0_en.md+++ b/docs/minicpm_ocr_1dot0_en.md@@ -31,7 +31,7 @@ Use the Free API to access MiniCPM-OCR 1.0 recognition. See the [API example](./### Local Deployment-Run the model on your own hardware to parse PDFs and images into Markdown or JSON. See the [SDK and deployment tutorial](./minicpmvocr_tutorial_en.md). The [Inference](#inference) section lists deployment guides for each backend.+Run the model on your own hardware to parse PDFs and images into Markdown or JSON. See the [SDK and deployment tutorial](./minicpm_ocr_tutorial_en.md). The [Inference](#inference) section lists deployment guides for each backend.## Model Base and Architecture@@ -44,7 +44,7 @@ MiniCPM-OCR 1.0 is **specialized for OCR through training based on MiniCPM-V 4.6| Recognition tasks | Text, tables, formulas, charts, seals, and key information extraction || Document parsing components | MiniCPM-OCR 1.0 recognition model + PP-DocLayoutV3 layout model + `minicpmvocr` SDK |-<!-- The model base description follows flagos_deploy_zh.md; the architecture description follows minicpmvocr_tutorial.md. The exact initial checkpoint, original training data, and training stages are not yet supported by verifiable material and are not inferred from the architecture name. -->+<!-- The model base description follows flagos_deploy_zh.md; the architecture description follows minicpm_ocr_tutorial.md. The exact initial checkpoint, original training data, and training stages are not yet supported by verifiable material and are not inferred from the architecture name. -->## Document Parsing Workflow@@ -55,7 +55,7 @@ The SDK parses complete documents, while the recognition model processes their i3. **Recognize the content**: The SDK sends document regions to the MiniCPM-OCR 1.0 inference service and recognizes them concurrently.4. **Assemble the output**: The SDK combines results into Markdown in reading order, converts OTSL table representations to HTML, and preserves formulas as LaTeX.-The SDK and inference service use separate Python environments and may run on different machines. The SDK handles layout detection, cropping, and result assembly; the inference backend handles model recognition. See the [SDK tutorial](./minicpmvocr_tutorial_en.md) for installation and configuration.+The SDK and inference service use separate Python environments and may run on different machines. The SDK handles layout detection, cropping, and result assembly; the inference backend handles model recognition. See the [SDK tutorial](./minicpm_ocr_tutorial_en.md) for installation and configuration.### Single-Region Recognition@@ -96,11 +96,11 @@ Replace both field lists with the fields needed for your application, keeping th| DSpark sampling head BF16 | [Download](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark) | [Download](https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-DSpark) || DSpark sampling head GGUF | [Download](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark-gguf) | [Download](https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-DSpark-gguf) |-**DSpark runs the main model together with its matching draft model (sampling head)**. For example, BF16 deployment pairs `openbmb/MiniCPM-OCR-1.0` with `openbmb/MiniCPM-OCR-1.0-DSpark`; ordinary decoding does not require a draft model. See [DSpark acceleration](./minicpmvocr_tutorial_en.md#3-start-the-service) for weight selection and startup arguments. FlagOS-adapted BF16 versions for multiple chips are listed in the [download table](./flagos_deploy_en.md#model-downloads).+**DSpark runs the main model together with its matching draft model (sampling head)**. For example, BF16 deployment pairs `openbmb/MiniCPM-OCR-1.0` with `openbmb/MiniCPM-OCR-1.0-DSpark`; ordinary decoding does not require a draft model. See [DSpark acceleration](./minicpm_ocr_tutorial_en.md#3-start-the-service) for weight selection and startup arguments. FlagOS-adapted BF16 versions for multiple chips are listed in the [download table](./flagos_deploy_en.md#model-downloads).## Inference-For your first PDF or image, start with the [SDK tutorial](./minicpmvocr_tutorial_en.md). If a recognition service is already running, configure the SDK to connect to its address.+For your first PDF or image, start with the [SDK tutorial](./minicpm_ocr_tutorial_en.md). If a recognition service is already running, configure the SDK to connect to its address.| Inference option | Guide || :--- | :--- |@@ -108,10 +108,10 @@ For your first PDF or image, start with the [SDK tutorial](./minicpmvocr_tutoria| Transformers | [Transformers service deployment](./SKILL_en.md#43-transformers-serve) || SGLang | [Deployment guide](./sglang_deploy.md) || llama.cpp | [GGUF deployment guide](./llamacpp_deploy.md) |-| Ollama | [SDK service connection and backend configuration](./minicpmvocr_api_en.md#command-line-options) |+| Ollama | [SDK service connection and backend configuration](./minicpm_ocr_sdk_api_en.md#command-line-options) || FlagOS | [Multi-chip deployment guide](./flagos_deploy_en.md) |-The SDK's `pipeline.max_workers` controls recognition-region requests, while `pipeline.page_workers` controls page concurrency. Configure both to match the backend's capacity: the current DSpark example uses `--max-num-seqs 32` as its per-instance concurrency limit. See the [SDK tutorial](./minicpmvocr_tutorial_en.md#4-parse-documents) for multiple instances and concurrency configuration.+The SDK's `pipeline.max_workers` controls recognition-region requests, while `pipeline.page_workers` controls page concurrency. Configure both to match the backend's capacity: the current DSpark example uses `--max-num-seqs 32` as its per-instance concurrency limit. See the [SDK tutorial](./minicpm_ocr_tutorial_en.md#4-parse-documents) for multiple instances and concurrency configuration.## Fine-Tuningdiff --git a/docs/minicpm_ocr_1dot0_zh.md b/docs/minicpm_ocr_1dot0_zh.mdindex fe4afcd..fac392e 100644--- a/docs/minicpm_ocr_1dot0_zh.md+++ b/docs/minicpm_ocr_1dot0_zh.md@@ -31,7 +31,7 @@ Read and execute https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/SKILL.md### 本地部署-在自己的设备上运行模型,将 PDF 和图片解析为 Markdown 或 JSON,见 [SDK 使用与部署教程](./minicpmvocr_tutorial.md)。[推理](#推理)章节列出了各后端的部署入口。+在自己的设备上运行模型,将 PDF 和图片解析为 Markdown 或 JSON,见 [SDK 使用与部署教程](./minicpm_ocr_tutorial.md)。[推理](#推理)章节列出了各后端的部署入口。## 模型基座与结构@@ -44,7 +44,7 @@ MiniCPM-OCR 1.0 **基于 MiniCPM-V 4.6 进行 OCR 特化训练**。标准模型| 识别任务 | 文本、表格、公式、图表、印章识别与关键信息抽取 || 文档解析组件 | MiniCPM-OCR 1.0 识别模型 + PP-DocLayoutV3 版面模型 + `minicpmvocr` SDK |-<!-- 基座说明据 flagos_deploy_zh.md;架构说明据 minicpmvocr_tutorial.md。精确初始检查点、原始训练数据与训练阶段尚无可核实材料,不据架构名称推断。 -->+<!-- 基座说明据 flagos_deploy_zh.md;架构说明据 minicpm_ocr_tutorial.md。精确初始检查点、原始训练数据与训练阶段尚无可核实材料,不据架构名称推断。 -->## 文档解析流程@@ -55,7 +55,7 @@ MiniCPM-OCR 1.0 **基于 MiniCPM-V 4.6 进行 OCR 特化训练**。标准模型3. **识别内容**:SDK 将文档块发送给 MiniCPM-OCR 1.0 推理服务,并发识别各区域。4. **组织输出**:SDK 按阅读顺序拼接为 Markdown,将表格的 OTSL 表示转换为 HTML,公式保留为 LaTeX。-SDK 与推理服务使用独立的 Python 环境,也可部署在不同机器上。SDK 负责版面检测、切块和结果整理,推理后端负责模型识别;安装与配置见 [SDK 使用教程](./minicpmvocr_tutorial.md)。+SDK 与推理服务使用独立的 Python 环境,也可部署在不同机器上。SDK 负责版面检测、切块和结果整理,推理后端负责模型识别;安装与配置见 [SDK 使用教程](./minicpm_ocr_tutorial.md)。### 单块识别@@ -96,11 +96,11 @@ Extract the "店名", "金额". Format the output as a JSON object with keys: "| DSpark 采样头 BF16 | [下载](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark) | [下载](https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-DSpark) || DSpark 采样头 GGUF | [下载](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark-gguf) | [下载](https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-DSpark-gguf) |-**DSpark 需要主模型与配套的草稿模型(采样头)共同运行**。例如,BF16 部署将 `openbmb/MiniCPM-OCR-1.0` 与 `openbmb/MiniCPM-OCR-1.0-DSpark` 搭配使用;普通解码无需草稿模型。权重选择与启动参数见 [DSpark 加速说明](./minicpmvocr_tutorial.md#3-启动服务)。FlagOS 适配的 BF16 多芯片版本见 [下载列表](./flagos_deploy_zh.md#model-downloads)。+**DSpark 需要主模型与配套的草稿模型(采样头)共同运行**。例如,BF16 部署将 `openbmb/MiniCPM-OCR-1.0` 与 `openbmb/MiniCPM-OCR-1.0-DSpark` 搭配使用;普通解码无需草稿模型。权重选择与启动参数见 [DSpark 加速说明](./minicpm_ocr_tutorial.md#3-启动服务)。FlagOS 适配的 BF16 多芯片版本见 [下载列表](./flagos_deploy_zh.md#model-downloads)。## 推理-首次解析 PDF 或图片,可从 [SDK 使用教程](./minicpmvocr_tutorial.md) 开始;已有识别服务时,只需配置 SDK 连接对应地址。+首次解析 PDF 或图片,可从 [SDK 使用教程](./minicpm_ocr_tutorial.md) 开始;已有识别服务时,只需配置 SDK 连接对应地址。| 推理方式 | 使用说明 || :--- | :--- |@@ -108,10 +108,10 @@ Extract the "店名", "金额". Format the output as a JSON object with keys: "| Transformers | [Transformers 服务部署](./SKILL.md#43-transformers-serve) || SGLang | [部署指南](./sglang_deploy_zh.md) || llama.cpp | [GGUF 部署指南(英文)](./llamacpp_deploy.md) |-| Ollama | [SDK 服务连接与后端配置](./minicpmvocr_api.md#命令行参数) |+| Ollama | [SDK 服务连接与后端配置](./minicpm_ocr_sdk_api.md#命令行参数) || FlagOS | [多芯片部署指南](./flagos_deploy_zh.md) |-SDK 的 `pipeline.max_workers` 控制识别块请求数,`pipeline.page_workers` 控制页面并发。两者需结合后端能力设置:当前 DSpark 示例使用 `--max-num-seqs 32` 设置单实例并发上限;多实例部署与并发配置见 [SDK 教程](./minicpmvocr_tutorial.md#4-解析文档)。+SDK 的 `pipeline.max_workers` 控制识别块请求数,`pipeline.page_workers` 控制页面并发。两者需结合后端能力设置:当前 DSpark 示例使用 `--max-num-seqs 32` 设置单实例并发上限;多实例部署与并发配置见 [SDK 教程](./minicpm_ocr_tutorial.md#4-解析文档)。## 二次微调diff --git a/docs/minicpm_ocr_api_en.md b/docs/minicpm_ocr_api_en.mdindex d1108ab..e33eec2 100644--- a/docs/minicpm_ocr_api_en.md+++ b/docs/minicpm_ocr_api_en.md@@ -86,4 +86,4 @@ Replace the example's prompt according to the region type:| Table | `Table Recognition:` || Formula | `Formula Recognition:` |-This example recognizes a single image region; the raw table output format depends on the model service you use. For layout analysis, cropping, reading-order reconstruction, and Markdown export from a complete PDF or page, see the [SDK document parsing tutorial](./minicpmvocr_tutorial_en.md#4-parse-documents). To score recognition quality, see the [MiniCPM-OCR Jev API guide](./minicpm_ocr_jev_api_en.md).+This example recognizes a single image region; the raw table output format depends on the model service you use. For layout analysis, cropping, reading-order reconstruction, and Markdown export from a complete PDF or page, see the [SDK document parsing tutorial](./minicpm_ocr_tutorial_en.md#4-parse-documents). To score recognition quality, see the [MiniCPM-OCR Jev API guide](./minicpm_ocr_jev_api_en.md).diff --git a/docs/minicpm_ocr_api_zh.md b/docs/minicpm_ocr_api_zh.mdindex 2ce6e75..2c89098 100644--- a/docs/minicpm_ocr_api_zh.md+++ b/docs/minicpm_ocr_api_zh.md@@ -86,4 +86,4 @@ print("finish_reason:", response.choices[0].finish_reason)| 表格 | `Table Recognition:` || 公式 | `Formula Recognition:` |-此示例用于单个图像块的识别;表格原始返回格式以所接入的模型服务为准。完整 PDF 或整页文档的版面分析、切块、阅读顺序恢复与 Markdown 导出,见 [SDK 文档解析教程](./minicpmvocr_tutorial.md#4-解析文档)。识别结果的质量评分见 [MiniCPM-OCR Jev API 调用说明](./minicpm_ocr_jev_api_zh.md)。+此示例用于单个图像块的识别;表格原始返回格式以所接入的模型服务为准。完整 PDF 或整页文档的版面分析、切块、阅读顺序恢复与 Markdown 导出,见 [SDK 文档解析教程](./minicpm_ocr_tutorial.md#4-解析文档)。识别结果的质量评分见 [MiniCPM-OCR Jev API 调用说明](./minicpm_ocr_jev_api_zh.md)。diff --git a/docs/minicpmvocr_api.md b/docs/minicpm_ocr_sdk_api.mdsimilarity index 98%rename from docs/minicpmvocr_api.mdrename to docs/minicpm_ocr_sdk_api.mdindex 3d1cc6d..89380e7 100644--- a/docs/minicpmvocr_api.md+++ b/docs/minicpm_ocr_sdk_api.md@@ -1,6 +1,6 @@# SDK API 与配置说明-[← 返回 README](../README_zh.md) · [安装与推理教程](./minicpmvocr_tutorial.md) · [English](./minicpmvocr_api_en.md)+[← 返回 README](../README_zh.md) · [安装与推理教程](./minicpm_ocr_tutorial.md) · [English](./minicpm_ocr_sdk_api_en.md)本文介绍 `minicpmvocr` 的命令行参数、配置覆盖方式和 Python API。运行前需安装 SDK,并启动兼容的识别服务。diff --git a/docs/minicpmvocr_api_en.md b/docs/minicpm_ocr_sdk_api_en.mdsimilarity index 98%rename from docs/minicpmvocr_api_en.mdrename to docs/minicpm_ocr_sdk_api_en.mdindex 7e11f45..25485e6 100644--- a/docs/minicpmvocr_api_en.md+++ b/docs/minicpm_ocr_sdk_api_en.md@@ -1,6 +1,6 @@# SDK API and Configuration-[← Back to README](../README.md) · [Installation and inference tutorial](./minicpmvocr_tutorial_en.md) · [中文](./minicpmvocr_api.md)+[← Back to README](../README.md) · [Installation and inference tutorial](./minicpm_ocr_tutorial_en.md) · [中文](./minicpm_ocr_sdk_api.md)This guide covers `minicpmvocr` command-line options, configuration overrides, and the Python API. Install the SDK and start a compatible recognition service before running the examples.diff --git a/docs/minicpmvocr_tutorial.md b/docs/minicpm_ocr_tutorial.mdsimilarity index 62%rename from docs/minicpmvocr_tutorial.mdrename to docs/minicpm_ocr_tutorial.mdindex 1a5406e..9bb09c1 100644--- a/docs/minicpmvocr_tutorial.md+++ b/docs/minicpm_ocr_tutorial.md@@ -1,10 +1,10 @@# MiniCPM-OCR 安装与推理-[English](./minicpmvocr_tutorial_en.md)+[English](./minicpm_ocr_tutorial_en.md)MiniCPM-OCR 是一个文档解析模型:输入 PDF 或图片,输出 Markdown,包括正文、表格(HTML)、公式(LaTeX)和阅读顺序。-运行时分为两部分:SDK 负责版面检测、切块和结果拼接;推理服务(本文使用 vLLM)运行识别模型,并通过 DSpark 投机解码加速,需同时准备主模型和同版本的草稿模型。两者使用独立的 Python 环境,分别在两个终端中运行。+运行时分为两部分:SDK 负责版面检测、切块和结果拼接;推理服务运行识别模型,并通过 DSpark 投机解码加速,需同时准备主模型和同版本的草稿模型。两者使用独立的 Python 环境,分别在两个终端中运行。> **数据隐私**:按本教程在本地部署 SDK 和推理服务后,文档处理与模型推理均在本地完成,无需调用云端 OCR 服务,也无需将原始文档、图片或解析结果上传至云端,有助于保障数据隐私。安装依赖和首次下载模型时需要联网。@@ -12,18 +12,26 @@ MiniCPM-OCR 是一个文档解析模型:输入 PDF 或图片,输出 Markdown## 环境要求-| 项目 | 要求 |-|---|---|-| 系统 | Linux x86_64(vLLM 源码编译要求);下文命令以 Ubuntu 22.04 为例 |-| GPU | NVIDIA GPU;本文命令已在 RTX 5090(32 GB)上验证 |-| NVIDIA 驱动 | ≥ 580(CUDA 13);旧驱动见 [FAQ](./faq_zh.md#cuda-driver-version-is-insufficient) |-| Python | 3.12,由 uv 自动下载,无需预装 |-| 磁盘 | 至少预留 40 GB:GPU 版 SDK 环境约 9 GB(CPU 版不到 1 GB),vLLM 环境约 8 GB,vLLM 源码与编译产物约 6 GB,模型约 3 GB,其余为下载和编译缓存 |++| 项目 | 要求 |+| --------- | ------------------------------------------------------------------------------------------------ |+| 系统 | Linux x86_64(vLLM 源码编译要求);下文命令以 Ubuntu 22.04 为例 |+| GPU | NVIDIA GPU;本文命令已在 RTX 5090(32 GB)上验证 |+| NVIDIA 驱动 | ≥ 580(CUDA 13);旧驱动见 [FAQ](./faq_zh.md#cuda-driver-version-is-insufficient) |+| Python | 3.12,由 uv 自动下载,无需预装 |+| 磁盘 | 至少预留 40 GB:GPU 版 SDK 环境约 9 GB(CPU 版不到 1 GB),vLLM 环境约 8 GB,vLLM 源码与编译产物约 6 GB,模型约 3 GB,其余为下载和编译缓存 |+---+++## 安装++### 1. SDK 环境配置+先创建虚拟环境,再安装 SDK 和 PaddlePaddle GPU 环境。```bash@@ -37,11 +45,11 @@ python -m pip install "paddlepaddle-gpu==3.3.0" \```+### 2. 推理服务环境配置推理服务任选其一,本文使用 vLLM。SGLang、llama.cpp、Ollama 和 FlagOS 见 [其他推理框架](#其他推理框架)。-> **旧驱动**:驱动低于 580 时,先按 [FAQ](./faq_zh.md#cuda-driver-version-is-insufficient) 配置适用于所用 GPU 的 CUDA 兼容库。安装和启动 vLLM、运行 GPU 版 SDK 的终端都需要设置相应的环境变量。```bash@@ -56,6 +64,8 @@ bash scripts/install.sh vllm> 脚本会下载固定版本的 vLLM 和 Transformers 源码并编译,环境位于 `.venv-vllm`。编译默认使用 8 个进程,CPU 和内存充足时可用 `MAX_JOBS=32 bash scripts/install.sh vllm` 加速(96 核机器上整个安装约 40 分钟)。++### 3. 启动服务新开一个终端,在仓库根目录启动 vLLM 服务(默认开启 DSpark 加速)。@@ -93,6 +103,8 @@ vllm serve openbmb/MiniCPM-OCR-1.0 \> `--speculative-config` 开启 DSpark 加速;删除该参数及其完整 JSON 配置即可使用普通解码,此时无需草稿模型。++### 4. 解析文档从仓库根目录运行下面的命令。SDK 会检查 `models/PP-DocLayoutV3_infer/`:文件完整时直接复用;缺失或不完整时,自动从 [Paddle 官方地址](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-DocLayoutV3_infer.tar)下载版面模型。@@ -112,29 +124,39 @@ minicpmvocr parse \----更多配置请参见 [SDK API 与配置说明](./minicpmvocr_api.md)。+更多配置请参见 [SDK API 与配置说明](./minicpm_ocr_sdk_api.md)。---+++## 其他推理框架上面的安装和启动步骤使用 vLLM。换用其他推理框架时,SDK 的版面检测和结果拼接不变,按对应文档启动识别服务后再连接。-| 框架 | 文档 |-|---|---|-| SGLang | [部署指南](./sglang_deploy_zh.md)。启动命令带 DSpark。 |++| 框架 | 文档 |+| --------- | ------------------------------------------------- |+| SGLang | [部署指南](./sglang_deploy_zh.md)。启动命令带 DSpark。 || llama.cpp | [GGUF 部署指南](./llamacpp_deploy_zh.md)。默认启用 DSpark。 |-| Ollama | [部署指南](./ollama_deploy_zh.md)。启用 DSpark。 |-| FlagOS | [多芯片部署指南](./flagos_deploy_zh.md)。 |+| Ollama | [部署指南](./ollama_deploy_zh.md)。启用 DSpark。 |+| FlagOS | [多芯片部署指南](./flagos_deploy_zh.md)。 |+---+++## 常见问题-| 问题 | 处理方式 |-|---|---|-| 第三方源码准备失败 | 按脚本提示检查 GitHub 连接或 `sources/` 中已有目录的版本,再运行 `bash scripts/install.sh vllm` |-| 报不支持 `minicpm_ocr` 架构 | 重新运行 `bash scripts/install.sh vllm`,安装配套的 Transformers 源码 |-| vLLM 编译进程被杀 | 减少 `MAX_JOBS`,确认编译内存充足 |-| 显存不足 | 减小 `--max-model-len`,必要时降低 `--gpu-memory-utilization` |-| SDK 请求失败或一直等待 | 先检查 `/v1/models`;确认服务地址正确,vLLM 启动时带了 `--trust-request-mm-kwargs` |++| 问题 | 处理方式 |+| --------------------- | ------------------------------------------------------------------------- |+| 第三方源码准备失败 | 按脚本提示检查 GitHub 连接或 `sources/` 中已有目录的版本,再运行 `bash scripts/install.sh vllm` |+| 报不支持 `minicpm_ocr` 架构 | 重新运行 `bash scripts/install.sh vllm`,安装配套的 Transformers 源码 |+| vLLM 编译进程被杀 | 减少 `MAX_JOBS`,确认编译内存充足 |+| 显存不足 | 减小 `--max-model-len`,必要时降低 `--gpu-memory-utilization` |+| SDK 请求失败或一直等待 | 先检查 `/v1/models`;确认服务地址正确,vLLM 启动时带了 `--trust-request-mm-kwargs` |+更多排障见 [FAQ](./faq_zh.md)。diff --git a/docs/minicpmvocr_tutorial_en.md b/docs/minicpm_ocr_tutorial_en.mdsimilarity index 98%rename from docs/minicpmvocr_tutorial_en.mdrename to docs/minicpm_ocr_tutorial_en.mdindex 42408ac..4983956 100644--- a/docs/minicpmvocr_tutorial_en.md+++ b/docs/minicpm_ocr_tutorial_en.md@@ -1,6 +1,6 @@# MiniCPM-OCR Installation and Inference-[中文](./minicpmvocr_tutorial.md)+[中文](./minicpm_ocr_tutorial.md)MiniCPM-OCR parses PDFs and images into Markdown, including body text, tables (HTML), formulas (LaTeX), and reading order.@@ -108,7 +108,7 @@ minicpmvocr parse \--output doc.md```-For more options, see [SDK API and Configuration](./minicpmvocr_api_en.md).+For more options, see [SDK API and Configuration](./minicpm_ocr_sdk_api_en.md).---## Other inference frameworksdiff --git a/docs/model_guide.md b/docs/model_guide.mdindex 531c2fa..dc69d3b 100644--- a/docs/model_guide.md+++ b/docs/model_guide.md@@ -6,7 +6,7 @@ The model documentation is now maintained in the following pages:- [MiniCPM-OCR 1.0: highlights, architecture, document parsing, KIE, inference, and evaluation](./minicpm_ocr_1dot0_en.md)- [Key information extraction (KIE): field prompts and JSON output](./minicpm_ocr_1dot0_en.md#kie) · [中文说明](./minicpm_ocr_1dot0_zh.md#kie)- [MiniCPM-OCR Jev: highlights, architecture, quality scoring, evaluation, and use cases](./minicpm_ocr_jev_en.md)-- [MiniCPM-OCR 1.0 deployment tutorial](./minicpmvocr_tutorial_en.md)+- [MiniCPM-OCR 1.0 deployment tutorial](./minicpm_ocr_tutorial_en.md)- [MiniCPM-OCR Jev deployment tutorial](./minicpm_ocr_jev_tutorial_en.md)[中文首页](../README_zh.md)diff --git a/docs/pypi_publish.md b/docs/pypi_publish.mdindex a1d651b..bb216ce 100644--- a/docs/pypi_publish.md+++ b/docs/pypi_publish.md@@ -46,4 +46,4 @@ python -m twine upload sdk/dist/*python -m pip install "minicpm-ocr[all]==1.0.2"```-PaddlePaddle GPU 运行时需单独安装,具体命令见[安装与推理教程](./minicpmvocr_tutorial.md#1-sdk-环境配置)。+PaddlePaddle GPU 运行时需单独安装,具体命令见[安装与推理教程](./minicpm_ocr_tutorial.md#1-sdk-环境配置)。diff --git a/docs/sglang_deploy.md b/docs/sglang_deploy.mdindex 7eea357..31b40a2 100644--- a/docs/sglang_deploy.md+++ b/docs/sglang_deploy.md@@ -6,7 +6,7 @@SGLang serves MiniCPM-OCR through an OpenAI-compatible API. This guide enables DSpark decoding with a matched target model and draft model. The SDK runs in a separate environment and connects over HTTP.-This guide follows the environment layout and SDK settings in the [vLLM tutorial](./minicpmvocr_tutorial_en.md). The commands target Linux x86_64, an NVIDIA GPU and Python 3.12.+This guide follows the environment layout and SDK settings in the [vLLM tutorial](./minicpm_ocr_tutorial_en.md). The commands target Linux x86_64, an NVIDIA GPU and Python 3.12.## 1. Prepare the source@@ -24,7 +24,7 @@ If `sources/sglang` already exists, skip the clone and run the fetch and checkou## 2. Set up the SDK environment-Install the SDK and GPU PaddlePaddle in `.minicpm-ocr` as described in the [SDK tutorial](./minicpmvocr_tutorial_en.md#1-set-up-the-sdk-environment). Reuse this environment if it is already installed for vLLM.+Install the SDK and GPU PaddlePaddle in `.minicpm-ocr` as described in the [SDK tutorial](./minicpm_ocr_tutorial_en.md#1-set-up-the-sdk-environment). Reuse this environment if it is already installed for vLLM.For CPU layout detection, follow the same steps but replace the `paddlepaddle-gpu` installation command with:diff --git a/docs/sglang_deploy_zh.md b/docs/sglang_deploy_zh.mdindex 2b99fae..4f10d3e 100644--- a/docs/sglang_deploy_zh.md+++ b/docs/sglang_deploy_zh.md@@ -6,7 +6,7 @@SGLang 通过 OpenAI 兼容 API 提供 MiniCPM-OCR 服务。本文启用 DSpark 解码,需要配套的主模型和草稿模型。SDK 运行在独立环境中,通过 HTTP 连接识别服务。-环境布局和 SDK 设置与 [vLLM 教程](./minicpmvocr_tutorial.md) 一致。以下命令面向 Linux x86_64、NVIDIA GPU 和 Python 3.12。+环境布局和 SDK 设置与 [vLLM 教程](./minicpm_ocr_tutorial.md) 一致。以下命令面向 Linux x86_64、NVIDIA GPU 和 Python 3.12。## 1. 准备源码@@ -24,7 +24,7 @@ git -C sources/sglang checkout aaab6bfc3de5354b052f2e96d5e566d70b9f69a2## 2. 配置 SDK 环境-按 [SDK 教程](./minicpmvocr_tutorial.md#1-sdk-环境配置) 在 `.minicpm-ocr` 中安装 SDK 和 GPU 版 PaddlePaddle。如果为 vLLM 安装过该环境,直接复用。+按 [SDK 教程](./minicpm_ocr_tutorial.md#1-sdk-环境配置) 在 `.minicpm-ocr` 中安装 SDK 和 GPU 版 PaddlePaddle。如果为 vLLM 安装过该环境,直接复用。使用 CPU 做版面检测时,步骤相同,只把 `paddlepaddle-gpu` 的安装命令换成:diff --git a/docs/vllm_deploy.md b/docs/vllm_deploy.mdindex 3401a79..fd16465 100644--- a/docs/vllm_deploy.md+++ b/docs/vllm_deploy.md@@ -4,7 +4,7 @@[← 返回首页](../README_zh.md)-本文参照 [SDK 使用教程](./minicpmvocr_tutorial.md#3-启动服务)中的服务部署方式,使用 vLLM 部署 MiniCPM-OCR 1.0,**默认启用 DSpark 推测解码**,包括 OpenAI 兼容 API 服务、图片识别、离线推理,以及 SDK 文档解析。以下 Shell 命令均在**本仓库根目录**通过 Bash 执行。+本文参照 [SDK 使用教程](./minicpm_ocr_tutorial.md#3-启动服务)中的服务部署方式,使用 vLLM 部署 MiniCPM-OCR 1.0,**默认启用 DSpark 推测解码**,包括 OpenAI 兼容 API 服务、图片识别、离线推理,以及 SDK 文档解析。以下 Shell 命令均在**本仓库根目录**通过 Bash 执行。- 主模型:[MiniCPM-OCR-1.0](https://huggingface.co/openbmb/MiniCPM-OCR-1.0)- DSpark 草稿模型:[MiniCPM-OCR-1.0-DSpark](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark),需要与配套主模型一起使用。@@ -223,7 +223,7 @@ print("finish_reason:", outputs[0].outputs[0].finish_reason)API 图片识别适合单个图像块;PDF 或整页文档可使用 MiniCPM-OCR SDK 完成版面检测、裁切与 Markdown 导出。-先按[SDK 使用教程](./minicpmvocr_tutorial.md#安装)安装 SDK、准备版面模型,然后切换到 SDK 环境,在项目仓库根目录执行:+先按[SDK 使用教程](./minicpm_ocr_tutorial.md#安装)安装 SDK、准备版面模型,然后切换到 SDK 环境,在项目仓库根目录执行:```bashminicpmvocr parse --config sdk/minicpmvocr/configs/minicpmvocr.yaml \@@ -234,7 +234,7 @@ minicpmvocr parse --config sdk/minicpmvocr/configs/minicpmvocr.yaml \--input document.pdf --output document.md```-预期生成 `document.md`,日志中无失败页面或识别块。检查文字、表格、公式和阅读顺序,确认没有空输出或截断。详细步骤见教程的[解析文档](./minicpmvocr_tutorial.md#4-解析文档)章节。+预期生成 `document.md`,日志中无失败页面或识别块。检查文字、表格、公式和阅读顺序,确认没有空输出或截断。详细步骤见教程的[解析文档](./minicpm_ocr_tutorial.md#4-解析文档)章节。## 注意事项diff --git a/docs/vllm_deploy_en.md b/docs/vllm_deploy_en.mdindex a614834..422506c 100644--- a/docs/vllm_deploy_en.md+++ b/docs/vllm_deploy_en.md@@ -4,7 +4,7 @@[← Back to README](../README.md)-This guide deploys MiniCPM-OCR 1.0 with **DSpark speculative decoding enabled by default**, following the service setup in the [SDK tutorial](./minicpmvocr_tutorial_en.md#3-start-the-service). It includes an OpenAI-compatible API service, image recognition, offline inference, and document parsing with the SDK. Run shell commands from the **root of this repository** in Bash.+This guide deploys MiniCPM-OCR 1.0 with **DSpark speculative decoding enabled by default**, following the service setup in the [SDK tutorial](./minicpm_ocr_tutorial_en.md#3-start-the-service). It includes an OpenAI-compatible API service, image recognition, offline inference, and document parsing with the SDK. Run shell commands from the **root of this repository** in Bash.- Main model: [MiniCPM-OCR-1.0](https://huggingface.co/openbmb/MiniCPM-OCR-1.0)- DSpark draft model: [MiniCPM-OCR-1.0-DSpark](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark), required alongside the matching main model.@@ -223,7 +223,7 @@ This example uses the model's own processor and chat template with thinking disaThe image recognition API handles individual image regions. For PDFs or full-page documents, use the MiniCPM-OCR SDK for layout detection, cropping, and Markdown export.-Follow the [SDK tutorial](./minicpmvocr_tutorial_en.md#installation) to install the SDK and prepare the layout model, then activate the SDK environment and run the following from the repository root:+Follow the [SDK tutorial](./minicpm_ocr_tutorial_en.md#installation) to install the SDK and prepare the layout model, then activate the SDK environment and run the following from the repository root:```bashminicpmvocr parse --config sdk/minicpmvocr/configs/minicpmvocr.yaml \@@ -234,7 +234,7 @@ minicpmvocr parse --config sdk/minicpmvocr/configs/minicpmvocr.yaml \--input document.pdf --output document.md```-The command should produce `document.md` with no failed pages or recognition regions in the logs. Inspect text, tables, formulas, and reading order, and check for empty or truncated output. See [Parse documents](./minicpmvocr_tutorial_en.md#4-parse-documents) for detailed steps.+The command should produce `document.md` with no failed pages or recognition regions in the logs. Inspect text, tables, formulas, and reading order, and check for empty or truncated output. See [Parse documents](./minicpm_ocr_tutorial_en.md#4-parse-documents) for detailed steps.## Notesdiff --git a/sdk/README.pypi.md b/sdk/README.pypi.mdindex 253e0d7..1aa40a7 100644--- a/sdk/README.pypi.md+++ b/sdk/README.pypi.md@@ -159,7 +159,7 @@ Use the Free API to access MiniCPM-OCR 1.0 recognition and MiniCPM-OCR Jev qualiRun the models on your own hardware: MiniCPM-OCR 1.0 parses PDFs and images into Markdown or JSON, while MiniCPM-OCR Jev scores the parsing results.-[MiniCPM-OCR 1.0 deployment tutorial](https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/minicpmvocr_tutorial_en.md) · [MiniCPM-OCR Jev deployment tutorial](https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/minicpm_ocr_jev_tutorial_en.md)+[MiniCPM-OCR 1.0 deployment tutorial](https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/minicpm_ocr_tutorial_en.md) · [MiniCPM-OCR Jev deployment tutorial](https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/minicpm_ocr_jev_tutorial_en.md)<a id="模型微调"></a>diff --git a/sdk/pyproject.toml b/sdk/pyproject.tomlindex 91f4c62..52bd820 100644--- a/sdk/pyproject.toml+++ b/sdk/pyproject.toml@@ -61,7 +61,7 @@ all = ["minicpm-ocr[layout,pdf,crosspage,upright]"][project.urls]Homepage = "https://github.com/OpenBMB/MiniCPM-OCR"Source = "https://github.com/OpenBMB/MiniCPM-OCR/tree/main/sdk"-Documentation = "https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/minicpmvocr_tutorial_en.md"+Documentation = "https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/minicpm_ocr_tutorial_en.md"Issues = "https://github.com/OpenBMB/MiniCPM-OCR/issues"[project.scripts]