{"id":846,"date":"2026-03-29T15:39:18","date_gmt":"2026-03-29T07:39:18","guid":{"rendered":"https:\/\/vlog.xiaoyan.sbs\/?p=846"},"modified":"2026-03-31T00:09:57","modified_gmt":"2026-03-30T16:09:57","slug":"vllm-%e9%83%a8%e7%bd%b2%e6%9c%ac%e5%9c%b0%e6%a8%a1%e5%9e%8b%e5%b9%b6%e5%af%b9%e6%8e%a5%e5%88%b0openclaw-%e7%9a%84%e6%95%b4%e4%b8%aa%e8%bf%87%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/vlog.xiaoyan.sbs\/?p=846","title":{"rendered":"vLLM \u90e8\u7f72\u672c\u5730\u6a21\u578b\u5e76\u5bf9\u63a5\u5230OpenClaw \u7684\u6574\u4e2a\u8fc7\u7a0b"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u9700\u8981\u5b89\u88c5WSL\uff0c\u5e76\u4e14WSL\u5b89\u88c5\u4e86Ubuntu\u7cfb\u7edf<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u5f00\u59cb<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nvidia-smi\n\u5982\u679c\u6ca1\u53cd\u5e94\u5219\u9700\u8981\u6267\u884c\nsudo apt install -y nvidia-utils-535  \u8fd9\u4e00\u6b65\u662f\u5b89\u88c5Ubuntu\u7cfb\u7edf\u652f\u6301N\u5361\u7684\u63d2\u4ef6\n\n\u7136\u540e\u8fdb\u884c\u66f4\u65b0\u7cfb\u7edf\nsudo apt update\nsudo apt upgrade -y\n\n\u5b89\u88c5 Python\uff1a\u73af\u5883\nsudo apt install python3-pip python3-venv -y\n\u521b\u5efa\u865a\u62df\u73af\u5883\ncd ~\npython3 -m venv vllm-env\n\n\u8fdb\u5165\u73af\u5883\nsource vllm-env\/bin\/activate\n\u5b89\u88c5vLLM\npip install --upgrade pip\npip install vllm\n\n\u5982\u679c\u4e0b\u8f7d\u901f\u5ea6\u8f83\u6162\u8bf7\u6362\u6210\u8fd9\u4e2a\u6e05\u534e\u7684\u6e90\npip install vllm -i https:\/\/pypi.tuna.tsinghua.edu.cn\/simple --timeout 1000\n\n\u5b89\u88c5\u5b8c\u6210\u540e\u8fdb\u884c\u6d4b\u8bd5\npython -c \"import vllm; print('vLLM installed')\"\n\u6216\u8005\u8f93\u51fa\u7248\u672c\npython -c \"import vllm; print(vllm.__version__)\"\n\n\u4e0b\u8f7d\u6a21\u578b\uff1a\npython -m vllm.entrypoints.openai.api_server \\\n  --model Qwen\/Qwen2.5-3B-Instruct \\      \n  --quantization awq_marlin \\\n  --gpu-memory-utilization 0.8 \\\n  --max-model-len 16384 \\\n  --enable-auto-tool-choice \\\n  --tool-call-parser hermes\n\n\n\u6216\u8005\n\u4e0b\u8f7d\u6a21\u578b\uff1a\nQwen2.5-14B-Instruct-AWQ     #\u5185\u5b58\u5c0f\u7684\u65f6\u5019\u4e0d\u8981\u7528\u8fd9\u4e2a\u6a21\u578b\n\n\u5982\u679c\u663e\u5b58\u4e0d\u591f\u5927\uff0c\u90a3\u4e48\u53ef\u4ee5\u9009\u62e9\uff1a\nQwen2.5-7B-Instruct-AWQ \n\u6216  \nQwen2.5-4B             #\u7b49\u66f4\u5c0f\u7684\u6a21\u578b<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5\u5b8c\u6210\u540e\u8fd0\u884c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u6211\u7684\u5185\u5b58\u662f4GB\u6240\u4ee5\u6211\u4e0b\u8f7d\u4e86Qwen2.5-3B-Instruct\n\u56fd\u5185\u6e90\u4e0b\u8f7d\u6307\u4ee4\uff1a\ngit clone https:\/\/www.modelscope.cn\/Qwen\/Qwen2.5-3B-Instruct.git\n\n\u4e0b\u8f7d\u5b8c\u6210\u540e\u8fd0\u884c\uff1a\npython -m vllm.entrypoints.openai.api_server \\\n  --model \/root\/models\/qwen3b\/Qwen2.5-3B-Instruct \\\n  --host 0.0.0.0 \\\n  --port 8000 \\\n  --dtype auto<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\n\u4ee5\u540e\u8fd0\u884c\u65f6\u5019\u8981\u76f4\u63a5\u8fd0\u884c\uff1a\nsource vllm-env\/bin\/activate\n\n\u7136\u540e\u8fdb\u5165\u5230\u76ee\u5f55\u91cc\u9762\u6267\u884c\uff1a\n\n\n\u7136\u540e\u6267\u884c\uff1a\n\npython -m vllm.entrypoints.openai.api_server \\\n  --model \/root\/models\/qwen3b\/Qwen2.5-3B-Instruct \\\n  --host 0.0.0.0 \\\n  --port 8000 \\\n  --dtype auto<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u542f\u52a8\u4e0d\u4e86\u8bf7\u6267\u884c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python -m vllm.entrypoints.openai.api_server \\\n  --model \/root\/models\/qwen3b\/Qwen2.5-3B-Instruct \\\n  --host 0.0.0.0 \\\n  --port 8000 \\\n  --dtype float16 \\\n  --gpu-memory-utilization 0.5 \\\n  --max-model-len 1024 \\\n  --enforce-eager<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9700\u8981\u5b89\u88c5WSL\uff0c\u5e76\u4e14WSL\u5b89\u88c5\u4e86Ubuntu\u7cfb\u7edf \u7136\u540e\u5f00\u59cb \u5b89\u88c5\u5b8c\u6210\u540e\u8fd0\u884c \u5982\u679c\u542f\u52a8\u4e0d\u4e86\u8bf7\u6267\u884c\uff1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-846","post","type-post","status-publish","format-standard","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/vlog.xiaoyan.sbs\/index.php?rest_route=\/wp\/v2\/posts\/846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vlog.xiaoyan.sbs\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vlog.xiaoyan.sbs\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vlog.xiaoyan.sbs\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vlog.xiaoyan.sbs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=846"}],"version-history":[{"count":8,"href":"https:\/\/vlog.xiaoyan.sbs\/index.php?rest_route=\/wp\/v2\/posts\/846\/revisions"}],"predecessor-version":[{"id":859,"href":"https:\/\/vlog.xiaoyan.sbs\/index.php?rest_route=\/wp\/v2\/posts\/846\/revisions\/859"}],"wp:attachment":[{"href":"https:\/\/vlog.xiaoyan.sbs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vlog.xiaoyan.sbs\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vlog.xiaoyan.sbs\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}