
1、# 安装ModelScope工具包pip install modelscope# 下载量化模型默认路径~/.cache/modelscope/hub/modelscope download --model Qwen/Qwen3-8B-AWQ需要12G显存或modelscope download --model Qwen/Qwen3-1.7B2、运行vllm serve --model /home/用户名/.cache/modelscope/models/Qwen--Qwen3-8B-AWQ/snapshots/master报错提示显存不够本机5070显卡有8G显存改为运行1.7B模型vllm serve --model /home/用户名/.cache/modelscope/models/Qwen--Qwen3-1.7B/snapshots/master还是报错提示显存不够。默人KV Cache为40960个token占显存约4.3G而这块RTX5070显卡的8G显存中只能给KV Cache分配2.1G限制token长度为4096再次运行vllm serve --model /home/用户名/.cache/modelscope/models/Qwen--Qwen3-1.7B/snapshots/master --max-model-len 4096测试curl http://localhost:8000/v1/completions -H Content-Type: application/json -d {model: /home/用户名/.cache/modelscope/models/Qwen--Qwen3-1.7B/snapshots/master,prompt: 大模型是什么?think\n,max_tokens: 1024,temperature: 0}看到了正常的答案O了