如何降低和固定显存使用?
#5086
Replies: 1 comment
-
|
针对你的场景(4090 24G,仅剩 10G 可用),可以通过以下方式控制 MinerU 的显存使用: 1. Pipeline 后端 — 设置虚拟显存上限: export MINERU_VIRTUAL_VRAM_SIZE=10此参数仅对 2. VLM 后端 — 降低 vLLM 显存占用比例: --gpu-memory-utilization 0.35启动 vLLM server 时使用: 3. Hybrid 后端 — 调整批处理比例: export MINERU_HYBRID_BATCH_RATIO=8值越小,单次处理批量越小,显存占用越低 [2]。 4. 通用优化: # 改善显存碎片化
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
# 如果显存仍然不够,可强制使用更轻量的 pipeline 模式
export MINERU_HYBRID_FORCE_PIPELINE_ENABLE=true推荐组合(10G 可用显存):
注意:vLLM 会在启动时一次性预分配显存(而非按需增长),所以设置合理的 To reply, just mention @dosu. Docs are dead. Just use Dosu. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
我有一张4090 24G显卡,几个服务同时在用,仅剩10G显存,如何设置固定10G显存使用
Beta Was this translation helpful? Give feedback.
All reactions