mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #1294] [Feature] 能否将Attention层移到CPU进行纯CPU推理? #875
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#875
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 @xuedun on GitHub (May 14, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1294
检查清单
需求背景
如果希望进行纯CPU推理,能否通过简单的修改实现?或是根据你们的经验,有没有什么开源库适合CPU侧的attention计算?
相关资源
No response
@Flying-Cloud commented on GitHub (May 14, 2025):
llama.cpp?
@yeungtuzi commented on GitHub (May 14, 2025):
vllm现在已经支持纯CPU
@qiyuxinlin commented on GitHub (May 14, 2025):
如果要做纯 CPU 推理,需要将 线性层、rmsnorm、MLA attention 替换成 torch 算子,我刚刚上传了一个 attention 和 rmsnorm 的 torch CPU 实现,线性层需要替换为 kLinearTorch 实现,您可以参照其他 yaml 写一个 inject 规则注入到 balance_serve 中