# 如何通过vllm的日志信息，组装vllm serve指令

**URL:** <https://discuss.vllm.ai/t/vllm-vllm-serve/2111>\
**Category:** General\
**Created:** [December 12, 2025, 6:10am UTC](https://discuss.vllm.ai/t/vllm-vllm-serve/2111 "2025-12-12T06:10:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sxcnmslll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/sxcnmslll/32/946_2.png) [@sxcnmslll](https://discuss.vllm.ai/u/sxcnmslll)\
**Post date:** [December 12, 2025, 6:10am UTC](https://discuss.vllm.ai/t/vllm-vllm-serve/2111/1 "2025-12-12T06:10:27Z")

</div>

我的vllm日志信息如下，帮我组装vllm serve指令。

Initializing a V1 LLM engine (v0.11.0) with config: model=‘/mnt/workspace/model/base/Qwen3-VL-4B-Instruct’, speculative\_config=None, tokenizer=‘/mnt/workspace/model/base/Qwen3-VL-4B-Instruct’, skip\_tokenizer\_init=False, tokenizer\_mode=auto, revision=None, tokenizer\_revision=None, trust\_remote\_code=False, dtype=torch.bfloat16, max\_seq\_len=10240, download\_dir=None, load\_format=safetensors, tensor\_parallel\_size=1, pipeline\_parallel\_size=1, data\_parallel\_size=1, disable\_custom\_all\_reduce=False, quantization=None, enforce\_eager=False, kv\_cache\_dtype=auto, device\_config=cuda, structured\_outputs\_config=StructuredOutputsConfig(backend=‘auto’, disable\_fallback=False, disable\_any\_whitespace=False, disable\_additional\_properties=False, reasoning\_parser=‘’), observability\_config=ObservabilityConfig(show\_hidden\_metrics\_for\_version=None, otlp\_traces\_endpoint=None, collect\_detailed\_traces=None), seed=0, served\_model\_name=/mnt/workspace/model/base/Qwen3-VL-4B-Instruct, enable\_prefix\_caching=False, chunked\_prefill\_enabled=True, pooler\_config=None, compilation\_config={“level”:3,“debug\_dump\_path”:“”,“cache\_dir”:“”,“backend”:“”,“custom\_ops”:,“splitting\_ops”:[“vllm.unified\_attention”,“vllm.unified\_attention\_with\_output”,“vllm.mamba\_mixer2”,“vllm.mamba\_mixer”,“vllm.short\_conv”,“vllm.linear\_attention”,“vllm.plamo2\_mamba\_mixer”,“vllm.gdn\_attention”,“vllm.sparse\_attn\_indexer”],“use\_inductor”:true,“compile\_sizes”:,“inductor\_compile\_config”:{“enable\_auto\_functionalized\_v2”:false},“inductor\_passes”:{},“cudagraph\_mode”:[2,1],“use\_cudagraph”:true,“cudagraph\_num\_of\_warmups”:1,“cudagraph\_capture\_sizes”:[4,2,1],“cudagraph\_copy\_inputs”:false,“full\_cuda\_graph”:false,“use\_inductor\_graph\_partition”:false,“pass\_config”:{},“max\_capture\_size”:4,“local\_cache\_dir”:null}

vllm\_kwargs: {‘dtype’: ‘bfloat16’, ‘gpu\_memory\_utilization’: 0.25, ‘kv\_cache\_dtype’: ‘auto’, ‘load\_format’: ‘safetensors’, ‘max\_model\_len’: 10240, ‘max\_num\_seqs’: 3, ‘tensor\_parallel\_size’: 1, ‘block\_size’: 16, ‘enable\_chunked\_prefill’: True, ‘enable\_prefix\_caching’: False, ‘limit\_mm\_per\_prompt’: {‘image’: 1}, ‘mm\_processor\_kwargs’: {‘max\_pixels’: 262144}}

non-default args: {‘load\_format’: ‘safetensors’, ‘dtype’: ‘bfloat16’, ‘max\_model\_len’: 10240, ‘block\_size’: 16, ‘enable\_prefix\_caching’: False, ‘gpu\_memory\_utilization’: 0.25, ‘max\_num\_seqs’: 3, ‘disable\_log\_stats’: True, ‘limit\_mm\_per\_prompt’: {‘image’: 1}, ‘mm\_processor\_kwargs’: {‘max\_pixels’: 262144}, ‘enable\_chunked\_prefill’: True, ‘model’: ‘/mnt/workspace/model/base/Qwen3-VL-4B-Instruct’}

---

<div class="post-metadata">

**Author:** ![RunLLM](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/runllm/32/233_2.png) [@RunLLM](https://discuss.vllm.ai/u/RunLLM)\
**Post date:** [December 12, 2025, 6:11am UTC](https://discuss.vllm.ai/t/vllm-vllm-serve/2111/2 "2025-12-12T06:11:11Z")

</div>

根据你提供的配置信息，你可以用如下命令启动 vllm serve：

```bash
vllm serve /mnt/workspace/model/base/Qwen3-VL-4B-Instruct \
  --load-format safetensors \
  --dtype bfloat16 \
  --max-model-len 10240 \
  --block-size 16 \
  --enable-prefix-caching False \
  --gpu-memory-utilization 0.25 \
  --max-num-seqs 3 \
  --disable-log-stats \
  --limit-mm-per-prompt '{"image":1}' \
  --mm-processor-kwargs '{"max_pixels":262144}' \
  --enable-chunked-prefill

```

请根据实际需要调整端口（如 `--port 8000`），并确保路径和参数与实际环境一致。详细参数说明可参考[官方文档](https://docs.vllm.ai/en/latest/getting_started/quickstart/#openai-compatible-server)。

需要更详细的参数解释或遇到报错吗？

Sources:

- [https://docs.vllm.ai/en/latest/api/vllm/#vllm.LLM. **init**](https://docs.vllm.ai/en/latest/api/vllm/#vllm.LLM. __init__ )

Hint: Mention @RunLLM in the post for followups.

---

<div class="post-metadata">

**Author:** ![sxcnmslll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/sxcnmslll/32/946_2.png) [@sxcnmslll](https://discuss.vllm.ai/u/sxcnmslll)\
**Post date:** [December 12, 2025, 6:20am UTC](https://discuss.vllm.ai/t/vllm-vllm-serve/2111/3 "2025-12-12T06:20:27Z")

</div>

@RunLLM 我的下面这个推理指令报错了：

TMPDIR=/msswift\_tmp/tmp   
vllm serve /msswift\_tmp/output/4B/gaojia/v1-20251204-115223/checkpoint-40   
–load-format safetensors   
–dtype bfloat16   
–max-model-len 10240   
–block-size 16   
–enable-prefix-caching False   
–gpu-memory-utilization 0.25   
–max-num-seqs 3   
–disable-log-stats   
–limit-mm-per-prompt ‘{“image”:1}’   
–tensor-parallel-size 1   
–pipeline-parallel-size 1   
–port 9014   
–enable-chunked-prefill   
–mm-processor-kwargs ‘{“max\_pixels”:262144}’   
–kv-cache-dtype auto   
–served-model-name “Qwen3-VL-4B-Instruct”  
INFO 12-12 14:18:21 [**init**.py:216] Automatically detected platform cuda.  
usage: vllm [-h] [-v] {chat,complete,serve,bench,collect-env,run-batch} …  
vllm: error: unrecognized arguments: False

---

<div class="post-metadata">

**Author:** ![RunLLM](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/runllm/32/233_2.png) [@RunLLM](https://discuss.vllm.ai/u/RunLLM)\
**Post date:** [December 12, 2025, 6:20am UTC](https://discuss.vllm.ai/t/vllm-vllm-serve/2111/4 "2025-12-12T06:20:52Z")

</div>

你的命令报错的主要原因是参数前缀用了全角破折号（–），而不是标准的半角短横线（-），以及布尔参数应为`--enable-prefix-caching`或`--no-enable-prefix-caching`，不能直接跟`False`。此外，JSON参数建议用英文单引号或双引号。

正确写法如下：

```bash
TMPDIR=/msswift_tmp/tmp vllm serve /msswift_tmp/output/4B/gaojia/v1-20251204-115223/checkpoint-40 \
  --load-format safetensors \
  --dtype bfloat16 \
  --max-model-len 10240 \
  --block-size 16 \
  --no-enable-prefix-caching \
  --gpu-memory-utilization 0.25 \
  --max-num-seqs 3 \
  --disable-log-stats \
  --limit-mm-per-prompt '{"image":1}' \
  --tensor-parallel-size 1 \
  --pipeline-parallel-size 1 \
  --port 9014 \
  --enable-chunked-prefill \
  --mm-processor-kwargs '{"max_pixels":262144}' \
  --kv-cache-dtype auto \
  --served-model-name Qwen3-VL-4B-Instruct

```

详细参数说明见[官方文档](https://docs.vllm.ai/en/latest/cli/serve/)。需要进一步排查请告知。

Sources:

- [https://github.com/vllm-project/vllm/issues/20104](https://github.com/vllm-project/vllm/issues/20104)
- [https://github.com/vllm-project/vllm/pull/10017](https://github.com/vllm-project/vllm/pull/10017)

Hint: Mention @RunLLM in the post for followups.
