[GH-ISSUE #599] AMX支持只有在v0.3有吗? #441

Closed
opened 2026-10-29 14:39:43 +00:00 by bsakaguchi · 7 comments
Owner

Originally created by @cunfate on GitHub (Feb 22, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/599

我们还提供了即将推出的优化预览,包括英特尔 AMX 加速内核和选择性专家激活方法,这将显著提升性能。通过 V0.3 预览版,我们在预填充方面实现了高达 286 tokens/s 的速度,比本地推理的 llama.cpp 快 28 倍。二进制发行版现已可用,源代码即将推出!请查看 wheel 包 [此处](https://github.com/kvcache-ai/ktransformers/releases/download/v0.1.4/ktransformers-0.3.0rc0+cu126torch26fancy-cp311-cp311-linux_x86_64.whl) 。

所以想问一下这个优化只有v0.3 才有吗?

Originally created by @cunfate on GitHub (Feb 22, 2025). Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/599 ``` 我们还提供了即将推出的优化预览,包括英特尔 AMX 加速内核和选择性专家激活方法,这将显著提升性能。通过 V0.3 预览版,我们在预填充方面实现了高达 286 tokens/s 的速度,比本地推理的 llama.cpp 快 28 倍。二进制发行版现已可用,源代码即将推出!请查看 wheel 包 [此处](https://github.com/kvcache-ai/ktransformers/releases/download/v0.1.4/ktransformers-0.3.0rc0+cu126torch26fancy-cp311-cp311-linux_x86_64.whl) 。 ``` 所以想问一下这个优化只有v0.3 才有吗?
bsakaguchi 2026-10-29 14:39:43 +00:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@ubergarm commented on GitHub (Feb 22, 2025):

@cunfate

“AMX(高级矩阵扩展指令集)由英特尔于2020年6月推出,并首次在面向至强(Xeon)服务器的Sapphire
Rapids微架构中提供支持,该架构于2023年1月正式发布。”

请查阅我的指南以获取确切的CPU功能标识配置。

关于v0.3版本的说明,请参考以下现有Issue评论:
https://github.com/kvcache-ai/ktransformers/issues/591#issuecomment-2676285106

<!-- gh-comment-id:2676294978 --> @ubergarm commented on GitHub (Feb 22, 2025): @cunfate “AMX(高级矩阵扩展指令集)由英特尔于2020年6月推出,并首次在面向至强(Xeon)服务器的Sapphire Rapids微架构中提供支持,该架构于2023年1月正式发布。” [请查阅我的指南以获取确切的CPU功能标识配置。](https://github.com/ubergarm/r1-ktransformers-guide/blob/main/README.zh.md#intel-%E8%87%B3%E5%BC%BA-amx-%E6%89%A9%E5%B1%95%E6%94%AF%E6%8C%81) 关于v0.3版本的说明,请参考以下现有Issue评论: https://github.com/kvcache-ai/ktransformers/issues/591#issuecomment-2676285106
Author
Owner

@cunfate commented on GitHub (Feb 23, 2025):

@cunfate

“AMX(高级矩阵扩展指令集)由英特尔于2020年6月推出,并首次在面向至强(Xeon)服务器的Sapphire Rapids微架构中提供支持,该架构于2023年1月正式发布。”

请查阅我的指南以获取确切的CPU功能标识配置。

关于v0.3版本的说明,请参考以下现有Issue评论: #591 (comment)

感谢回复,如果我使用main分支的最新代码,在支持AMX指令集的环境中重新编译ktransformer,是否就可以正常使用AMX指令集了?

<!-- gh-comment-id:2676650536 --> @cunfate commented on GitHub (Feb 23, 2025): > [@cunfate](https://github.com/cunfate) > > “AMX(高级矩阵扩展指令集)由英特尔于2020年6月推出,并首次在面向至强(Xeon)服务器的Sapphire Rapids微架构中提供支持,该架构于2023年1月正式发布。” > > [请查阅我的指南以获取确切的CPU功能标识配置。](https://github.com/ubergarm/r1-ktransformers-guide/blob/main/README.zh.md#intel-%E8%87%B3%E5%BC%BA-amx-%E6%89%A9%E5%B1%95%E6%94%AF%E6%8C%81) > > 关于v0.3版本的说明,请参考以下现有Issue评论: [#591 (comment)](https://github.com/kvcache-ai/ktransformers/issues/591#issuecomment-2676285106) 感谢回复,如果我使用main分支的最新代码,在支持AMX指令集的环境中重新编译ktransformer,是否就可以正常使用AMX指令集了?
Author
Owner

@txg1550759 commented on GitHub (Feb 23, 2025):

@cunfate
我编译0.3成功了,但是感觉是不论为类的东西,代码里面都是0.21的好像,编译出来的东西,缺少很多东西,能加载模型了,看了其它人还要禁用amx才行,0.3就是不成熟的东西,一般人玩不了。

<!-- gh-comment-id:2676660673 --> @txg1550759 commented on GitHub (Feb 23, 2025): @cunfate 我编译0.3成功了,但是感觉是不论为类的东西,代码里面都是0.21的好像,编译出来的东西,缺少很多东西,能加载模型了,看了其它人还要禁用amx才行,0.3就是不成熟的东西,一般人玩不了。
Author
Owner

@moneyisallyouneed commented on GitHub (Feb 23, 2025):

@cunfate 我编译0.3成功了,但是感觉是不论为类的东西,代码里面都是0.21的好像,编译出来的东西,缺少很多东西,能加载模型了,看了其它人还要禁用amx才行,0.3就是不成熟的东西,一般人玩不了。

请问0.3的源码在哪找的呀,怎么自己编译的呢

<!-- gh-comment-id:2676746287 --> @moneyisallyouneed commented on GitHub (Feb 23, 2025): > [@cunfate](https://github.com/cunfate) 我编译0.3成功了,但是感觉是不论为类的东西,代码里面都是0.21的好像,编译出来的东西,缺少很多东西,能加载模型了,看了其它人还要禁用amx才行,0.3就是不成熟的东西,一般人玩不了。 请问0.3的源码在哪找的呀,怎么自己编译的呢
Author
Owner

@ubergarm commented on GitHub (Feb 23, 2025):

@cunfate

感谢回复,如果我使用main分支的最新代码,在支持AMX指令集的环境中重新编译ktransformer,是否就可以正常使用AMX指令集了?

@moneyisallyouneed

请问0.3的源码在哪找的呀,怎么自己编译的呢

根据现有信息推断:kvcache-ai开发组可能在某台构建机上存在一个本地专属分支,该分支持有v0.3版本的精确代码。尽管该版本已启用Int
el AMX指令集加速进行编译,但其API端点缺陷大概率与原始v0.2.1版本(对应ktransformers@65d73ea提交)保持一致。

个人认为版本标签(如0.2.1/0.3)并无实质意义,建议仅通过git哈希值进行追踪(例如git rev-parse --short HEAD)。若项目后续能完善流程,在现有持续集成(CI)基础上实现持续交付(CD),则有望提供基于哈希命名的夜间构建版本,并附带CH
ANGELOG.md说明,类似llama.cpp的发布模式。但需给予开发团队充分时间——当前其
对核心技术方向的专注值得肯定。

关于自行编译支持AMX的版本:可参考@txg1550759提供的AMX编译实践(本人尚未验证)。需注意可能需要专用AMX优化版PyTorch及其他依赖项,具体细节尚不明确。如有进展,烦请同步
告知!


I assume someone who works with kvcache-ai has a local only branch on a build machine holding the exact code for v0.3 which, while it was compiled with Intel AMX extensions enabled, probably has the same API endpoint bugs as the original v0.2.1 (ktransformers@65d73ea).

I personally ignore those version tags as they are meaningless and only look at the git hash e.g. git rev-parse --short HEAD. With luck this project will mature and enable continuous delivery in addition to the existing continuous integration CI/CD so we will have nightly builds named with the git hash and a CHANGELOG.md for each build like llama.cpp releases.

But lets give the devs some time as they are focusing on the important technical aspects which I appreciate.

Regarding building your own version with AMX extensions support. Check out @txg1550759 pro tip on building AMX which I have not yet tried.

However, you may need a special Intel AMX pytorch and everything else too I really have no idea. If you find out, please let me know!

<!-- gh-comment-id:2676970300 --> @ubergarm commented on GitHub (Feb 23, 2025): @cunfate > 感谢回复,如果我使用main分支的最新代码,在支持AMX指令集的环境中重新编译ktransformer,是否就可以正常使用AMX指令集了? @moneyisallyouneed > 请问0.3的源码在哪找的呀,怎么自己编译的呢 根据现有信息推断:kvcache-ai开发组可能在某台构建机上存在一个本地专属分支,该分支持有v0.3版本的精确代码。尽管该版本已启用Int el AMX指令集加速进行编译,但其API端点缺陷大概率与原始v0.2.1版本(对应ktransformers@65d73ea提交)保持一致。 个人认为版本标签(如0.2.1/0.3)并无实质意义,建议仅通过git哈希值进行追踪(例如`git rev-parse --short HEAD`)。若项目后续能完善流程,在现有持续集成(CI)基础上实现持续交付(CD),则有望提供基于哈希命名的夜间构建版本,并附带CH ANGELOG.md说明,类似[llama.cpp的发布模式](https://github.com/ggml-org/llama.cpp/releases)。但需给予开发团队充分时间——当前其 对核心技术方向的专注值得肯定。 关于自行编译支持AMX的版本:可参考[@txg1550759提供的AMX编译实践](https://github.com/kvcache-ai/ktransformers/issues/591#issuecomment-2676664291)(本人尚未验证)。需注意可能需要专用[AMX优化版PyTorch](https://github.com/intel/intel-extension-for-pytorch)及其他依赖项,具体细节尚不明确。如有进展,烦请同步 告知! --- I assume someone who works with kvcache-ai has a local only branch on a build machine holding the exact code for v0.3 which, while it was compiled with Intel AMX extensions enabled, probably has the same API endpoint bugs as the original v0.2.1 (ktransformers@65d73ea). I personally ignore those version tags as they are meaningless and only look at the git hash e.g. `git rev-parse --short HEAD`. With luck this project will mature and enable continuous delivery in addition to the existing continuous integration CI/CD so we will have nightly builds named with the git hash and a CHANGELOG.md for each build like [llama.cpp releases](https://github.com/ggml-org/llama.cpp/releases). But lets give the devs some time as they are focusing on the important technical aspects which I appreciate. Regarding building your own version with AMX extensions support. Check out @txg1550759 [pro tip on building AMX](https://github.com/kvcache-ai/ktransformers/issues/591#issuecomment-2676664291) which I have not yet tried. However, you may need a special [Intel AMX pytorch](https://github.com/intel/intel-extension-for-pytorch) and everything else too I really have no idea. If you find out, please let me know!
Author
Owner

@txg1550759 commented on GitHub (Feb 24, 2025):

The methods for building and one - click running the Docker image of version 0.3 are freshly out! Welcome to test them.
0.3版本docker镜镜构建、一键运行方法新鲜出炉,欢迎测试:
https://github.com/txg1550759/ktransformers-v0.3-docker.git

<!-- gh-comment-id:2677328847 --> @txg1550759 commented on GitHub (Feb 24, 2025): The methods for building and one - click running the Docker image of version 0.3 are freshly out! Welcome to test them. 0.3版本docker镜镜构建、一键运行方法新鲜出炉,欢迎测试: https://github.com/txg1550759/ktransformers-v0.3-docker.git
Author
Owner

@ErvinXie commented on GitHub (Dec 11, 2025):

This issue has been automatically closed due to inactivity for 60 days.

If you believe this issue is still relevant, please feel free to reopen it with additional information or context.

Thank you for your contribution to KTransformers!


此 issue 因超过 60 天无活动而被自动关闭。

如果您认为此问题仍然存在,请随时重新打开并提供更多信息或上下文。

感谢您对 KTransformers 的贡献!

<!-- gh-comment-id:3639932475 --> @ErvinXie commented on GitHub (Dec 11, 2025): This issue has been automatically closed due to inactivity for 60 days. If you believe this issue is still relevant, please feel free to reopen it with additional information or context. Thank you for your contribution to KTransformers! --- 此 issue 因超过 60 天无活动而被自动关闭。 如果您认为此问题仍然存在,请随时重新打开并提供更多信息或上下文。 感谢您对 KTransformers 的贡献!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/ktransformers#441
No description provided.