mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #758] [Bug] 安装flashinfer后,生成结果与不开启时差异较大,并会出现遗漏prompt关健信息、输出重复内容的现象 #548
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#548
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 @wkgcass on GitHub (Mar 1, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/758
检查清单
问题描述
启用flashinfer后,有较高概率出现:多个
</think>tag、同一句话不断重复、关注不到prompt重要信息等问题。使用
DeepSeek R1 Q4或Q8和如下链接所示的提示词时:commit:
050b745a6e2d94423bf1138f585a94b661210bff,100%会以某某知道了作为开头(我尝试了20次,每次只替换名字,例如“小玲”、“小美”、“小芳”等,都会以“某某知道了”作为开头);而commit:
b443c7dfa2baeae84658351898eae90d6c330f61,小概率以某某知道了作为开头,并且回答有较高概率出现重复文本、多个</think>tag的情况。这两个提交是紧挨着的,所以问题应该出在
b443c7dfa2baeae84658351898eae90d6c330f61这里。其中有一个比较明显的改动,是当
flashinfer可以被import时,启用了flashinfer的开关。我拉取的最新版本(
511958d49c31c0d850bed1916b58929fd5f5705a)仍存在该问题,仅修改ktransformers/operators/flashinfer_wrapper.py强制让flashinfer = False后,问题不再发生。此外:
flashinfer==0.2.1.post2+cu124torch2.6时会出现上述问题flashinfer==0.2.2.post1+cu124torch2.6时会报错,抱歉具体错误忘记截了,如果需要我可以再去截一下复现步骤
按照
https://zhuanlan.zhihu.com/p/20779032138输入提示词观察
</think>之后的输出。再
git checkout b443c7dfa2baeae84658351898eae90d6c330f61,执行上述命令,观察输出。环境信息
9275f * 24070Ti Super(16G)ubuntu24.0412.4550.144.03USE_NUMA=1编译--cpu_infer 46 --max_new_tokens 8192 --force_think@qiyuxinlin commented on GitHub (Mar 2, 2025):
感谢您的反馈!我们尽快使用您的示例测试 flashinfer 的效果,我们之前确实没有做过 triton 和 flashinfer 的对比测试
@luzamm commented on GitHub (Mar 2, 2025):
确实有类似问题, 卸载flashinfer后正常
@edward-ng-duke commented on GitHub (Mar 10, 2025):
@wkgcass 提示词挺狂野的
@Atream commented on GitHub (Mar 14, 2025):
fixed