mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #219] 【性能】测试了下DeepSeek-R1,性能没有预期的好 #134
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#134
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 @hello2mao on GitHub (Feb 13, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/219
更新:
调整成--cpu_infer 56,测下来大概是1.7 token/s
调整成--cpu_infer 24,测下来大概是1.87 token/s
===========================================
求助:v0.2版本,测出来只有0.6 token/s,是我的硬件太差了吗?
CPU: Intel(R) Xeon(R) Platinum P-8136 CPU @ 2.00GHz 448GB DRAM (2 NUMA nodes)
GPU: 4090 24G VRAM
Memory: DDR4-2400 DRAM (448GB=64GB x 7)
如下:13GB VRAM



如下:112核占满;内存378GB
如下:0.6 token/s
@BiFangKNT commented on GitHub (Feb 13, 2025):
你的u太老了,不支持amx
双路仅支持12通道 2400,带宽太低
@hello2mao commented on GitHub (Feb 13, 2025):
请问下,”12通道 2400“的意思是,我把--cpu_infer 112改成--cpu_infer 24?
@buliaoyin commented on GitHub (Feb 13, 2025):
用实际核心数,也就是56,超线程在llm推理上是负加成
@hello2mao commented on GitHub (Feb 13, 2025):
调整成--cpu_infer 56,测下来大概是1.7 token/s
@murongweibo commented on GitHub (Feb 13, 2025):
你这个模型体积是多大的?
@hello2mao commented on GitHub (Feb 13, 2025):
用的这个:https://huggingface.co/unsloth/DeepSeek-R1-GGUF/tree/main/DeepSeek-R1-Q4_K_M
@tarjintor commented on GitHub (Feb 13, 2025):
为什么不用v0.3,以及如果直接ollama跑速度多少可以对比下吗,我之前有更低配epyc2代,ollama都远远不止这个速度
@hello2mao commented on GitHub (Feb 13, 2025):
因为没有支持amx的cpu。我看官方v0.2的数据也不差,想实测下。
@tarjintor commented on GitHub (Feb 13, 2025):
不支持也直接v0.3试试?也可以直接ollama试试,我的经验觉得你的这个配置ollama中短5tps肯定可以,0.6肯定那里出问题了
@BiFangKNT commented on GitHub (Feb 13, 2025):
内存通道数啊,你这只有12通道,还是d4 2400,带宽太低了
@lulu2048 commented on GitHub (Feb 13, 2025):
调整成--cpu_infer 24,测下来大概是多少token/s?
@hello2mao commented on GitHub (Feb 14, 2025):
1.8 token/s

@jackcoder23 commented on GitHub (Feb 14, 2025):
htop 看cpu都满了吗?作者的内存带宽600GB/s,你的 Intel Xeon Platinum P-8136两个: 6x2 = 12通道都插满了吗?按理得有250GB/s,
250/600 * 作者的12t/s ≈ 4-5token/s@jhscut commented on GitHub (Feb 14, 2025):
请问你的optimize_rule怎么写的
@hello2mao commented on GitHub (Feb 14, 2025):
谢谢提醒,我看了下,目前内存448GB=64GB x 7,没有插满;所以理论总带宽=2400x9/1000 x 7/2=75.6GB/s,
75.6 / 600 * 作者的12t/s ≈ 1.5 token/s这么看,目前我测下来的最高1.8 token/s 应该是符合预期的。
@hello2mao commented on GitHub (Feb 14, 2025):
这部分我也没修改。
@lulu2048 commented on GitHub (Feb 14, 2025):
https://github.com/kvcache-ai/ktransformers/issues/181#issuecomment-2657583298
听说cpu_infer 4-20内推理速度最佳,启用核心太多会互相争抢内存带宽,可以关闭CPU超线程功能后用二分法测试
@BiFangKNT commented on GitHub (Feb 14, 2025):
内存带宽是最重要的,你竟然没插满😂🤣
@leizhang588 commented on GitHub (Feb 14, 2025):
你这个内存带宽远远不够,12通道,才插了7个,理论带宽134G,实际带宽最多120G,只有作者带宽的1/5,速度最多也就1.8t/s,如果插满的话,理论230G,实际带宽大概有220G,预计速度接近4t/s.
@Radohead commented on GitHub (Feb 15, 2025):
提醒下,双路U要开numactl,内存需要预备两倍
@yansiyu550 commented on GitHub (Feb 18, 2025):
您好,想问一下
V0.2性能数据符合预期吗?比作者低很多,用的API接口:Performance(T/s): prefill 4.045294075735022, decode 3.956256483823671. Time(s): tokenize 0.01299285888671875, prefill 1.9776065349578857, decode 284.10695934295654
@Zongru-Wang commented on GitHub (Feb 18, 2025):
GPU: 2 * A100 80GB
CPU: DDR5 64GB * 8
CPU: cpu_model_name: Intel (R) Xeon (R) Gold 6454S, 32 cores per socket, 2 sockets, 2 numa nodes
export USE_NUMA=1
bash install.sh
用的 v0.2.1
ktransformers --model_path /home/ubuntu/wzr/LLM-MODELS/unsloth/DeepSeek-R1-GGUF --gguf_path /home/ubuntu/wzr/LLM-MODELS/unsloth/DeepSeek-R1-GGUF/DeepSeek-R1-Q4_K_M --port 10002 --cpu_infer 60 --max_new_tokens 4000 --web True
但是内存显示只用了不到 10GB,CPU是满负载了,哪里出问题了呢?
@yansiyu550 commented on GitHub (Feb 18, 2025):
用top看内存吧,很多工具不准确
@yansiyu550 commented on GitHub (Feb 18, 2025):
只看cpu计算带宽,不需要看D2H的带宽吗?
@su161021 commented on GitHub (Feb 18, 2025):
你好 我测试出来的结果是 显存使用14G,内存使用8G,cpu 16核,这个数据对吗,每秒token数量5个。
@txg1550759 commented on GitHub (Feb 20, 2025):
多gpu要用这个参数,--optimize_rule_path ./ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-multi-gpu.yaml
@leizhang588 commented on GitHub (Feb 21, 2025):
也需要看,所以双路带宽在实际上并不等效双U的内存总带宽,会有一定的损失,接近损失10%
@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 的贡献!