INT4 KV cache in LMDeploy breaks tool calling

#3
by zambalee-ai - opened

Issue: INT4 KV cache (--quant-policy 4) breaks qwen3coder tool call parser for Qwen3-Coder-30B

When deploying this model with LMDeploy 0.14.0 using INT4 KV cache quantization, the qwen3coder tool call parser fails to extract structured tool calls from model output. The same model with INT8 KV cache works perfectly.

Details

  • LMDeploy: 0.14.0
  • Hardware: 4xV100-SXM2-16GB (tp=4)
  • INT8 KV: tool_calls returned correctly, MTCSR chain_success 5/6 (83.3%)
  • INT4 KV: tool_calls returns empty [], MTCSR chain_success 0/6

Root cause

INT4 KV cache quantization causes the model to stop emitting the expected XML tool call format. The parser cannot find the expected pattern and returns empty tool_calls.

Workaround

Use INT8 KV cache (--quant-policy 8) instead. This works correctly but uses more GPU memory.

Related

Sign up or log in to comment