症状 → 排查方向
| 症状 | 优先排查 |
|---|---|
| 角色标记错乱、格式怪 | chat template 与 tokenizer 配置 |
| 复读、循环 | repetition_penalty 与温度等极端参数组合 |
| 突然截断 | max_tokens 与 finish_reason=length |
| 整体质量退化 | 量化方案或权重版本变化 |
固定冒烟用例(示意)
固定冒烟用例(示意)
cat > /tmp/smoke.json <<'JSON'
{
"model": "<模型>",
"messages": [{"role": "user", "content": "用一句话介绍你自己"}],
"max_tokens": 64
}
JSON
curl -s http://127.0.0.1:8000/v1/chat/completions -H 'Content-Type: application/json' -d @/tmp/smoke.json | python -m json.tool记录 finish_reason:stop 与 length 对应完全不同的处理路径。