mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #1690] 【ERROR】Install Ktransformers for AscendNPU #1081
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#1081
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 @Mr-Xiao2021 on GitHub (Dec 9, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/1690
Originally assigned to: @RICHARDNAN on GitHub.
Reminder
System Info
我参考如下链接进行安装:
ktransformers/doc/zh/DeepseekR1_V3_tutorial_zh_for_Ascend_NPU.md at main · kvcache-ai/ktransformers](https://github.com/kvcache-ai/ktransformers/blob/main/doc/zh/DeepseekR1_V3_tutorial_zh_for_Ascend_NPU.md#ktransformers部署)
我的系统信息是:
HDK: 24.1.rc3
CANN: CANN 8.3.RC1.alpha003,配套ToolKit,Kernel和NNAL均已安装好
OS: openEuler 22.03 LTS
操作系统内核为:5.10.0-60.18.0.50.oe2203.aarch64
GCC: 10.3.1
按照教程链接顺利安装好了conda环境和python部署,并安装好了指定版本torch_npu 2.5.1
Reproduction
将项目文件部署到机器上:
初始化third_party。由于此过程耗时较多,且容易受网络影响导致仓库克隆失败,建议初始化一次后,将相关文件进行打包,以便后续直接解压使用。
发现没有成功初始化,根据
archive/.gitmodules文件内容,手动将这些子模块添加到主仓库中对于arm平台,注释掉
中的
执行
source /usr/local/Ascend/ascend-toolkit/set_env.sh(以实际CANN-TOOLKIT安装路径为准)。执行
apt install cmake libhwloc-dev pkg-config安装依赖。修改项目目录下 /ktransformers/config/config.yaml 中attn部分的page_size: 128 chunk_size: 16384
执行
USE_BALANCE_SERVE=1 USE_NUMA=1 bash ./install.sh,等待安装完成。首次编译,发现手动添加的模块/ktransformers/archive/third_party/llama.cpp结构不符,
报错:
将仓库/kransformers/third_party下的llama.cpp模块覆盖掉/ktransformers/archive/third_party的llama.cpp模块,就能找到llama.cpp/ggml-impl.h头文件,再次编译,头文件可以找到,但是出现了新的问题:
Others
这是什么问题,我的ARM CPU经过验证支持 armv8.2-a + fp16 + fp16fml + dotprod,也正确开启了-DKTRANSFORMERS_USE_NPU=1,是什么原因呢,是否是GCC编译器版本太低的问题。我想了解这个部署Ascend NPU官方文档更详细的硬件配置和编译器配置。
@RICHARDNAN commented on GitHub (Dec 9, 2025):
您好,由于conda环境不可控因素较多,可以尝试参考这个pr中在MindIE镜像中尝试进行编译:https://github.com/kvcache-ai/ktransformers/pull/1691/files