Skip to content

[Bug] INT4 KV cache (--quant-policy 4) breaks qwen3coder tool call parser for Qwen3-Coder-30B #4743

Description

@zambalee

Describe the bug

When deploying Qwen3-Coder-30B-A3B-Instruct-AWQ_QuantTrio with INT4 KV cache quantization (--quant-policy 4), the qwen3coder tool call parser fails to extract structured tool calls from model output. The same model with INT8 KV cache (--quant-policy 8) works perfectly.

Environment

  • LMDeploy: 0.14.0
  • Model: Qwen3-Coder-30B-A3B-Instruct-AWQ_QuantTrio
  • Hardware: 4xV100-SXM2-16GB (tp=4), CUDA 12.6

Reproduction

lmdeploy serve api_server /models/Qwen3-Coder-30B-A3B-Instruct-AWQ_QuantTrio \
  --tp 4 --cache-max-entry-count 0.7 --dtype float16 \
  --enable-prefix-caching --session-len 262144 \
  --tool-call-parser qwen3coder --quant-policy 8  # change to 4 -> broken

Expected vs Actual

INT8 (--quant-policy 8) INT4 (--quant-policy 4)
tool_calls returned structured JSON empty list []
content field empty raw text with XML tags
MTCSR chain_success 5/6 (83.3%) 0/6

Root cause analysis

INT4 KV cache quantization causes the model to stop emitting the expected XML tool call format. The qwen3coder parser expects output in the format `

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions