[GH-ISSUE #321] NUMA模式不能工作 #205

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

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

系统配置
CPU: EPYC 7742 x2
DRAM: 64GB x 16
GPU: 3090 x 8
使用的模型: Ollama那边拉下来的8bit量化的gguf

如果不使用NUMA模式, install.sh安装, 使用以下命令启动
python -m ktransformers.local_chat --model_path deepseek-ai/DeepSeek-V3 --cpu_infer 64 --max_new_tokens 1000 --gguf_path /home/adonis/temp/ds_v3

可以正常工作, 用附加的test文件里的信息, 要求进行总结, 性能数据如下, 另外在这个时候cpu那边的内存占用只有19G

prompt eval count: 966 token(s)
prompt eval duration: 17.906471252441406s
prompt eval rate: 53.9469774017197 tokens/s
eval count: 1000 token(s)
eval duration: 222.02748823165894s
eval rate: 4.5039468219206285 tokens/s

如果使用NUMA模式, 也就是export NUMA=1; install.sh安装, 使用上述命令启动
程序在输出一系列加载信息, 直到以下信息

loading blk.46.ffn_norm.weight to cuda:0
loading blk.47.attn_q_a_norm.weight to cuda:0
loading blk.47.attn_kv_a_norm.weight to cuda:0
loading blk.47.attn_kv_b.weight to cuda:0

然后就killed了

看了一下htop信息, 是1T内存都被占满了, 然后swap用光(swap就配置了8GB), 然后就killed了

btw, 非常感谢作者的工作, 非常非常棒的工作!!!

Originally created by @adonishong on GitHub (Feb 15, 2025). Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/321 系统配置 CPU: EPYC 7742 x2 DRAM: 64GB x 16 GPU: 3090 x 8 使用的模型: Ollama那边拉下来的8bit量化的gguf 如果不使用NUMA模式, install.sh安装, 使用以下命令启动 python -m ktransformers.local_chat --model_path deepseek-ai/DeepSeek-V3 --cpu_infer 64 --max_new_tokens 1000 --gguf_path /home/adonis/temp/ds_v3 可以正常工作, 用附加的test文件里的信息, 要求进行总结, 性能数据如下, 另外在这个时候cpu那边的内存占用只有19G prompt eval count: 966 token(s) prompt eval duration: 17.906471252441406s prompt eval rate: 53.9469774017197 tokens/s eval count: 1000 token(s) eval duration: 222.02748823165894s eval rate: 4.5039468219206285 tokens/s 如果使用NUMA模式, 也就是export NUMA=1; install.sh安装, 使用上述命令启动 程序在输出一系列加载信息, 直到以下信息 loading blk.46.ffn_norm.weight to cuda:0 loading blk.47.attn_q_a_norm.weight to cuda:0 loading blk.47.attn_kv_a_norm.weight to cuda:0 loading blk.47.attn_kv_b.weight to cuda:0 然后就killed了 看了一下htop信息, 是1T内存都被占满了, 然后swap用光(swap就配置了8GB), 然后就killed了 btw, 非常感谢作者的工作, 非常非常棒的工作!!!
Author
Owner

@NeilAlfred commented on GitHub (Feb 15, 2025):

遇到了同样的问题

<!-- gh-comment-id:2660896313 --> @NeilAlfred commented on GitHub (Feb 15, 2025): 遇到了同样的问题
Author
Owner

@Radohead commented on GitHub (Feb 15, 2025):

目前架构下用numa意味着有几路cpu,内存就复制几份,所以2路cpu跑q8 1t是不够的大概要1.5t

<!-- gh-comment-id:2660966386 --> @Radohead commented on GitHub (Feb 15, 2025): 目前架构下用numa意味着有几路cpu,内存就复制几份,所以2路cpu跑q8 1t是不够的大概要1.5t
Author
Owner

@BiFangKNT commented on GitHub (Feb 15, 2025):

认真看文档啊,你都知道numa了,难道不知道双路会把模型复制一份吗

一份模型占713GB,两份就是 713*2=1426GB 啊

<!-- gh-comment-id:2660984808 --> @BiFangKNT commented on GitHub (Feb 15, 2025): 认真看文档啊,你都知道numa了,难道不知道双路会把模型复制一份吗 一份模型占713GB,两份就是 713*2=1426GB 啊
Author
Owner

@adonishong commented on GitHub (Feb 15, 2025):

我错了, 确实看文档不够仔细

<!-- gh-comment-id:2660991624 --> @adonishong commented on GitHub (Feb 15, 2025): 我错了, 确实看文档不够仔细
Author
Owner

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

我双路CPU 1.97T的内存跑fp8,大概500+G到时候就killed掉了,请问知道是什么回事吗?

<!-- gh-comment-id:2677788429 --> @NicholasIrving commented on GitHub (Feb 24, 2025): 我双路CPU 1.97T的内存跑fp8,大概500+G到时候就killed掉了,请问知道是什么回事吗?
Author
Owner

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

我双路CPU 1.97T的内存跑fp8,大概500+G到时候就killed掉了,请问知道是什么回事吗?

希望能把报错信息贴出来看看

<!-- gh-comment-id:2677792394 --> @BiFangKNT commented on GitHub (Feb 24, 2025): > 我双路CPU 1.97T的内存跑fp8,大概500+G到时候就killed掉了,请问知道是什么回事吗? 希望能把报错信息贴出来看看
Author
Owner

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

@BiFangKNT 跟你一样,直接就killed了,没有任何报错

<!-- gh-comment-id:2677805573 --> @NicholasIrving commented on GitHub (Feb 24, 2025): @BiFangKNT 跟你一样,直接就killed了,没有任何报错 <!-- Failed to upload "image.png" -->
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#205
No description provided.