mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #321] NUMA模式不能工作 #205
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#205
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 @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, 非常感谢作者的工作, 非常非常棒的工作!!!
@NeilAlfred commented on GitHub (Feb 15, 2025):
遇到了同样的问题
@Radohead commented on GitHub (Feb 15, 2025):
目前架构下用numa意味着有几路cpu,内存就复制几份,所以2路cpu跑q8 1t是不够的大概要1.5t
@BiFangKNT commented on GitHub (Feb 15, 2025):
认真看文档啊,你都知道numa了,难道不知道双路会把模型复制一份吗
一份模型占713GB,两份就是 713*2=1426GB 啊
@adonishong commented on GitHub (Feb 15, 2025):
我错了, 确实看文档不够仔细
@NicholasIrving commented on GitHub (Feb 24, 2025):
我双路CPU 1.97T的内存跑fp8,大概500+G到时候就killed掉了,请问知道是什么回事吗?
@BiFangKNT commented on GitHub (Feb 24, 2025):
希望能把报错信息贴出来看看
@NicholasIrving commented on GitHub (Feb 24, 2025):
@BiFangKNT 跟你一样,直接就killed了,没有任何报错