mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #1869] 配置 --kt-method LLAMAFILE 时,使用异常,回复内容不完整 #1165
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#1165
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @liuyuansharp on GitHub (Feb 26, 2026).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1869
Reminder
System Info
System Info
KTransformers CLI v0.1.0
Python 3.12.7
平台 Linux 6.14.0-36-generic
CUDA 13.0
Packages:
kt-kernel 0.5.1
sglang 0.0.0.dev10185+g2ba1f0dea (PyPI)
Reproduction
使用 sglang.launch_server 启动,以下命令:
python -m sglang.launch_server
--host 0.0.0.0
--port 10002
--model /home/liuyuan/workspace/work/ai/ktransformer/models/Qwen3-Coder-Next
--kt-weight-path /home/liuyuan/workspace/work/ai/ktransformer/models/Qwen3-Coder-Next-GGUF/Q4_K_M
--kt-cpuinfer 20
--kt-threadpool-count 2
--kt-num-gpu-experts 30
--kt-method LLAMAFILE
--kt-gpu-prefill-token-threshold 400
--trust-remote-code
--mem-fraction-static 0.94
--max-running-requests 10
--served-model-name Qwen3-Coder-Next
--enable-mixed-chunk
--tensor-parallel-size 1
--enable-p2p-check
--disable-shared-experts-fusion
--chunked-prefill-size 4096
--max-total-tokens 20000
--attention-backend flashinfer
测试内容:
curl -s http://localhost:10002/v1/chat/completions -H "Content-Type: application/json" -d '{
"model": "MiniMax-M2.5",
"stream": false,
"messages": [
{"role": "user", "content": "hi, who are you?"}
]
}'
回复内容:
{"id":"7b0013cc513e4cab82911a03d5982de6","object":"chat.completion","created":1772107748,"model":"MiniMax-M2.5","choices":[{"index":0,"message":{"role":"assistant",
"content":"Hi",
"reasoning_content":null,
"tool_calls":null},"logprobs":null,"finish_reason":"stop","matched_stop":"NaN happened"}],"usage":{"prompt_tokens":14,"total_tokens":16,"completion_tokens":2,"prompt_tokens_details":null,"reasoning_tokens":0},"metadata":{"weight_version":"default"}}
测试内容:
curl -s http://localhost:10002/v1/chat/completions -H "Content-Type: application/json" -d '{
"model": "MiniMax-M2.5",
"stream": false,
"messages": [
{"role": "user", "content": "讲一个笑话"}
]
}'
回复内容:
{"id":"91e0cd1c9e9f402280145bef3697b8cb","object":"chat.completion","created":1772108606,"model":"MiniMax-M2.5","choices":[{"index":0,"message":{"role":"assistant",
"content":"当然",
"reasoning_content":null,"tool_calls":null},"logprobs":null,"finish_reason":"stop","matched_stop":"NaN happened"}],"usage":{"prompt_tokens":11,"total_tokens":13,"completion_tokens":2,"prompt_tokens_details":null,"reasoning_tokens":0},"metadata":{"weight_version":"default"}}
问题:
提交的问题,回复内容都异常,检查后台,记录每次只有一条,不能持续回复后续内容。
Others
No response
@ErvinXie commented on GitHub (Feb 28, 2026):
matched_stop: "NaN happened"表示推理过程中 logits 产生了 NaN 值,SGLang 检测到后主动停止了生成。这通常说明权重加载或计算过程中出现了数值问题。建议排查:
lscpu | grep avx)坦率地说,我们目前对 GGUF 格式的支持比较久远,难以保证所有模型和量化组合的兼容性。未来我们会推出 AWQ 量化格式的支持,届时会提供更可靠的低比特量化推理体验。
This reply was generated by an AI agent and reviewed by a human.
@liuyuansharp commented on GitHub (Mar 1, 2026):
好的,谢谢。
我试着回退 sglang
git checkout 4605b77c7ff3e287a310d9d732f6b67dc8032229
然后再安装,目前不报这个错了。