Sfoglia il codice sorgente

Update vllm version and increase default GPU memory utilization

myhloli 4 settimane fa
parent
commit
0758de6d24

+ 2 - 2
mineru/backend/vlm/vlm_analyze.py

@@ -96,7 +96,7 @@ class ModelSingleton:
                         except ImportError:
                             raise ImportError("Please install vllm to use the vllm-engine backend.")
                         if "gpu_memory_utilization" not in kwargs:
-                            kwargs["gpu_memory_utilization"] = 0.5
+                            kwargs["gpu_memory_utilization"] = 0.7
                         if "model" not in kwargs:
                             kwargs["model"] = model_path
                         if enable_custom_logits_processors() and ("logits_processors" not in kwargs):
@@ -111,7 +111,7 @@ class ModelSingleton:
                         except ImportError:
                             raise ImportError("Please install vllm to use the vllm-async-engine backend.")
                         if "gpu_memory_utilization" not in kwargs:
-                            kwargs["gpu_memory_utilization"] = 0.5
+                            kwargs["gpu_memory_utilization"] = 0.7
                         if "model" not in kwargs:
                             kwargs["model"] = model_path
                         if enable_custom_logits_processors() and ("logits_processors" not in kwargs):

+ 1 - 1
mineru/model/vlm_vllm_model/server.py

@@ -43,7 +43,7 @@ def main():
     if not has_port_arg:
         args.extend(["--port", "30000"])
     if not has_gpu_memory_utilization_arg:
-        args.extend(["--gpu-memory-utilization", "0.5"])
+        args.extend(["--gpu-memory-utilization", "0.7"])
     if not model_path:
         model_path = auto_download_and_get_model_root_path("/", "vlm")
     if (not has_logits_processors_arg) and custom_logits_processors:

+ 1 - 1
pyproject.toml

@@ -56,7 +56,7 @@ vlm = [
     "accelerate>=1.5.1",
 ]
 vllm = [
-    "vllm>=0.10.1.1,<0.11",
+    "vllm>=0.10.1.1,<0.12",
 ]
 pipeline = [
     "matplotlib>=3.10,<4",