Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
feat: update advanced_cli_parameters.md to improve clarity on GPU usage and command examples
myhloli397902e25365
diff --git a/docs/en/usage/advanced_cli_parameters.md b/docs/en/usage/advanced_cli_parameters.mdindex 3a833a9a..203543df 100644--- a/docs/en/usage/advanced_cli_parameters.md+++ b/docs/en/usage/advanced_cli_parameters.md@@ -2,12 +2,6 @@## Pass-through of inference engine parameters-### vllm Acceleration Parameter Optimization-> [!TIP]-> If you can already use vllm normally for accelerated VLM model inference but still want to further improve inference speed, you can try the following parameters:->-> - If you have multiple graphics cards, you can use vllm's multi-card parallel mode to increase throughput: `--data-parallel-size 2`-### Parameter Passing Instructions> [!TIP]> - All officially supported vllm/lmdeploy parameters can be passed to MinerU through command line arguments, including the following commands: `mineru`, `mineru-openai-server`, `mineru-gradio`, `mineru-api`, `mineru-router`@@ -23,7 +17,7 @@> ```bash> CUDA_VISIBLE_DEVICES=1 mineru -p <input_path> -o <output_path>> ```-> - This specification method is effective for all command line calls, including `mineru`, `mineru-openai-server`, `mineru-gradio`, and `mineru-api`, and applies to both `pipeline` and `vlm` backends.+> - This method works for all command-line invocations, including `mineru`, `mineru-openai-server`, `mineru-gradio`, `mineru-api`, and `mineru-router`, and it applies to both the `pipeline` and `vlm` backends.### Common Device Configuration Examples> [!TIP]@@ -40,15 +34,23 @@> [!TIP]> Here are some possible usage scenarios:>-> - If you have multiple graphics cards and need to specify cards 0 and 1, using multi-card parallelism to start `openai-server`, you can use the following command:+> - If you have multiple GPUs and need to start two `openai-server` services on GPU 0 and GPU 1, each listening on a different port, you can use the following commands:> ```bash-> CUDA_VISIBLE_DEVICES=0,1 mineru-openai-server --engine vllm --port 30000 --data-parallel-size 2+> # In terminal 1+> CUDA_VISIBLE_DEVICES=0 mineru-openai-server --engine vllm --port 30000+> # In terminal 2+> CUDA_VISIBLE_DEVICES=1 mineru-openai-server --engine vllm --port 30001> ```->-> - If you have multiple graphics cards and need to start two `fastapi` services on cards 0 and 1, listening on different ports respectively, you can use the following commands:+>+> - If you have multiple GPUs and need to start two `fastapi` services on GPU 0 and GPU 1, each listening on a different port, you can use the following commands:> ```bash> # In terminal 1> CUDA_VISIBLE_DEVICES=0 mineru-api --host 127.0.0.1 --port 8000> # In terminal 2> CUDA_VISIBLE_DEVICES=1 mineru-api --host 127.0.0.1 --port 8001> ```+>+> - If you have multiple GPUs and want to use `router` to launch and manage `fastapi` services across four GPUs, you can use the following command:+> ```bash+> CUDA_VISIBLE_DEVICES=0,1,2,3 mineru-router --host 127.0.0.1 --port 8002+> ```diff --git a/docs/zh/usage/advanced_cli_parameters.md b/docs/zh/usage/advanced_cli_parameters.mdindex 7b370541..c0d6d978 100644--- a/docs/zh/usage/advanced_cli_parameters.md+++ b/docs/zh/usage/advanced_cli_parameters.md@@ -2,12 +2,6 @@## 推理引擎参数透传-### vllm 加速参数优化-> [!TIP]-> 如果您已经可以正常使用vllm对vlm模型进行加速推理,但仍然希望进一步提升推理速度,可以尝试以下参数:->-> - 如果您有超过多张显卡,可以使用vllm的多卡并行模式来增加吞吐量:`--data-parallel-size 2`-### 参数传递说明> [!TIP]> - 所有vllm/lmdeploy官方支持的参数都可用通过命令行参数传递给 MinerU,包括以下命令:`mineru`、`mineru-openai-server`、`mineru-gradio`、`mineru-api`、`mineru-router`@@ -23,7 +17,7 @@> ```bash> CUDA_VISIBLE_DEVICES=1 mineru -p <input_path> -o <output_path>> ```-> - 这种指定方式对所有的命令行调用都有效,包括 `mineru`、`mineru-openai-server`、`mineru-gradio` 和 `mineru-api`,且对`pipeline`、`vlm`后端均适用。+> - 这种指定方式对所有的命令行调用都有效,包括 `mineru`、`mineru-openai-server`、`mineru-gradio`、`mineru-api`和`mineru-router`,且对`pipeline`、`vlm`后端均适用。### 常见设备配置示例> [!TIP]@@ -41,9 +35,12 @@> [!TIP]> 以下是一些可能的使用场景:>-> - 如果您有多张显卡,需要指定卡0和卡1,并使用多卡并行来启动`openai-server`,可以使用以下命令:+> - 如果您有多张显卡,需要在卡0和卡1上启动两个`openai-server`服务,并分别监听不同的端口,可以使用以下命令:> ```bash-> CUDA_VISIBLE_DEVICES=0,1 mineru-openai-server --engine vllm --port 30000 --data-parallel-size 2+> # 在终端1中+> CUDA_VISIBLE_DEVICES=0 mineru-openai-server --engine vllm --port 30000+> # 在终端2中+> CUDA_VISIBLE_DEVICES=1 mineru-openai-server --engine vllm --port 30001> ```>> - 如果您有多张显卡,需要在卡0和卡1上启动两个`fastapi`服务,并分别监听不同的端口,可以使用以下命令:@@ -53,3 +50,8 @@> # 在终端2中> CUDA_VISIBLE_DEVICES=1 mineru-api --host 127.0.0.1 --port 8001> ```+>+> - 如果您有多张显卡,需要通过`router`在其中4张卡上启动`fastapi`服务并统一管理,可以使用以下命令:+> ```bash+> CUDA_VISIBLE_DEVICES=0,1,2,3 mineru-router --host 127.0.0.1 --port 8002+> ```