浏览代码

Merge pull request #2758 from QIN2DIM/compose-enable-torch-compile

feat: optimize SGLang server args
Xiaomeng Zhao 4 月之前
父节点
当前提交
9e6256c5a4
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      docker/compose.yaml

+ 7 - 1
docker/compose.yaml

@@ -1,3 +1,5 @@
+# Documentation:
+# https://docs.sglang.ai/backend/server_arguments.html#common-launch-commands
 services:
   mineru-sglang:
     image: mineru-sglang:latest
@@ -11,6 +13,10 @@ services:
     command:
       --host 0.0.0.0
       --port 30000
+      # --enable-torch-compile  # You can also enable torch.compile to accelerate inference speed by approximately 15%
+      # --dp 2  # If you have more than two GPUs with 24GB VRAM or above, you can use sglang's multi-GPU parallel mode to increase throughput  
+      # --tp 2  # If you have two GPUs with 12GB or 16GB VRAM, you can use the Tensor Parallel (TP) mode
+      # --mem-fraction-static 0.7  # If you have two GPUs with 11GB VRAM, in addition to Tensor Parallel mode, you need to reduce the KV cache size
     ulimits:
       memlock: -1
       stack: 67108864
@@ -23,4 +29,4 @@ services:
           devices:
             - driver: nvidia
               device_ids: ["0"]
-              capabilities: [gpu]
+              capabilities: [gpu]