[GH-ISSUE #219] 【性能】测试了下DeepSeek-R1,性能没有预期的好 #134

Closed
opened 2026-10-29 14:34:45 +00:00 by bsakaguchi · 28 comments
Owner

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

Image

调整成--cpu_infer 24,测下来大概是1.87 token/s

Image

===========================================

求助: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)

git clone https://github.com/kvcache-ai/ktransformers.git
cd ktransformers
git submodule init
git submodule update
export USE_NUMA=1
make dev_install
# Dual socket version (112 cores)
python3 ./ktransformers/local_chat.py --model_path /data/download_deepseek_r1/DeepSeek-R1 --gguf_path /data/DeepSeek-R1-Q4_K_M --cpu_infer 112 --max_new_tokens 1000 --force_think true

如下:13GB VRAM
Image
如下:112核占满;内存378GB
Image
如下:0.6 token/s
Image

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 ![Image](https://github.com/user-attachments/assets/9b31a594-2df1-4d6a-affe-f1e35b801b97) 调整成--cpu_infer 24,测下来大概是1.87 token/s ![Image](https://github.com/user-attachments/assets/aafad3c4-a99c-4c85-87a8-892283cb639c) =========================================== 求助: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) ``` git clone https://github.com/kvcache-ai/ktransformers.git cd ktransformers git submodule init git submodule update export USE_NUMA=1 make dev_install # Dual socket version (112 cores) python3 ./ktransformers/local_chat.py --model_path /data/download_deepseek_r1/DeepSeek-R1 --gguf_path /data/DeepSeek-R1-Q4_K_M --cpu_infer 112 --max_new_tokens 1000 --force_think true ``` 如下:13GB VRAM ![Image](https://github.com/user-attachments/assets/f7862567-a784-4433-9928-5105b9036b6b) 如下:112核占满;内存378GB ![Image](https://github.com/user-attachments/assets/c5afe2b9-bbba-4de6-a647-467c5f4d2e60) 如下:0.6 token/s ![Image](https://github.com/user-attachments/assets/03f5550f-a233-4587-adb9-773ccdc73937)
bsakaguchi 2026-10-29 14:34:45 +00:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

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

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 DRAM (448GB)

git clone https://github.com/kvcache-ai/ktransformers.git
cd ktransformers
git submodule init
git submodule update
export USE_NUMA=1
make dev_install
# Dual socket version (112 cores)
python3 ./ktransformers/local_chat.py --model_path /data/download_deepseek_r1/DeepSeek-R1 --gguf_path /data/DeepSeek-R1-Q4_K_M --cpu_infer 112 --max_new_tokens 1000 --force_think true

如下:13GB VRAM Image 如下:112核占满;内存378GB Image 如下:0.6 token/s Image

你的u太老了,不支持amx

双路仅支持12通道 2400,带宽太低

<!-- gh-comment-id:2655883470 --> @BiFangKNT commented on GitHub (Feb 13, 2025): > 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 DRAM (448GB) > > ``` > git clone https://github.com/kvcache-ai/ktransformers.git > cd ktransformers > git submodule init > git submodule update > export USE_NUMA=1 > make dev_install > # Dual socket version (112 cores) > python3 ./ktransformers/local_chat.py --model_path /data/download_deepseek_r1/DeepSeek-R1 --gguf_path /data/DeepSeek-R1-Q4_K_M --cpu_infer 112 --max_new_tokens 1000 --force_think true > ``` > > 如下:13GB VRAM ![Image](https://github.com/user-attachments/assets/f7862567-a784-4433-9928-5105b9036b6b) 如下:112核占满;内存378GB ![Image](https://github.com/user-attachments/assets/c5afe2b9-bbba-4de6-a647-467c5f4d2e60) 如下:0.6 token/s ![Image](https://github.com/user-attachments/assets/03f5550f-a233-4587-adb9-773ccdc73937) 你的u太老了,不支持amx 双路仅支持12通道 2400,带宽太低
Author
Owner

@hello2mao commented on GitHub (Feb 13, 2025):

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 DRAM (448GB)

git clone https://github.com/kvcache-ai/ktransformers.git
cd ktransformers
git submodule init
git submodule update
export USE_NUMA=1
make dev_install
# Dual socket version (112 cores)
python3 ./ktransformers/local_chat.py --model_path /data/download_deepseek_r1/DeepSeek-R1 --gguf_path /data/DeepSeek-R1-Q4_K_M --cpu_infer 112 --max_new_tokens 1000 --force_think true

如下:13GB VRAM Image 如下:112核占满;内存378GB Image 如下:0.6 token/s Image

你的u太老了,不支持amx

双路仅支持12通道 2400,带宽太低

请问下,”12通道 2400“的意思是,我把--cpu_infer 112改成--cpu_infer 24?

<!-- gh-comment-id:2655897979 --> @hello2mao commented on GitHub (Feb 13, 2025): > > 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 DRAM (448GB) > > ``` > > git clone https://github.com/kvcache-ai/ktransformers.git > > cd ktransformers > > git submodule init > > git submodule update > > export USE_NUMA=1 > > make dev_install > > # Dual socket version (112 cores) > > python3 ./ktransformers/local_chat.py --model_path /data/download_deepseek_r1/DeepSeek-R1 --gguf_path /data/DeepSeek-R1-Q4_K_M --cpu_infer 112 --max_new_tokens 1000 --force_think true > > ``` > > > > > > > > > > > > > > > > > > > > > > > > 如下:13GB VRAM ![Image](https://github.com/user-attachments/assets/f7862567-a784-4433-9928-5105b9036b6b) 如下:112核占满;内存378GB ![Image](https://private-user-images.githubusercontent.com/8265961/412792421-c5afe2b9-bbba-4de6-a647-467c5f4d2e60.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MzYyNTksIm5iZiI6MTczOTQzNTk1OSwicGF0aCI6Ii84MjY1OTYxLzQxMjc5MjQyMS1jNWFmZTJiOS1iYmJhLTRkZTYtYTY0Ny00NjdjNWY0ZDJlNjAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTNUMDgzOTE5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Y2E5NDg1ZWZkN2Y1NTNhOTExYTJiMDRkYzlkYzg4MGRkNzVlYThiMTRhNmQ3YTJlNzk3N2M3Mjg4MDg4NjYyOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.P17XZu1mrxXJY4GeepgP5bUvtNOt0OnDKZTsmVp8QJk) 如下:0.6 token/s ![Image](https://private-user-images.githubusercontent.com/8265961/412792481-03f5550f-a233-4587-adb9-773ccdc73937.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MzYyNTksIm5iZiI6MTczOTQzNTk1OSwicGF0aCI6Ii84MjY1OTYxLzQxMjc5MjQ4MS0wM2Y1NTUwZi1hMjMzLTQ1ODctYWRiOS03NzNjY2RjNzM5MzcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTNUMDgzOTE5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTYyZjgzMGYxOWUwNjBlYjMxNTRhMWIwOGZhYWQyYjM3YWQyYmMzZWYxOGRjZWE2M2U5YTZkMzgyZGQ1MGNkOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.HwleK0MgmIhutrsLPqyg8CFuVsAIJ8WkSFugIWW65Hc) > > 你的u太老了,不支持amx > > 双路仅支持12通道 2400,带宽太低 请问下,”12通道 2400“的意思是,我把--cpu_infer 112改成--cpu_infer 24?
Author
Owner

@buliaoyin commented on GitHub (Feb 13, 2025):

Platinum P-8136

用实际核心数,也就是56,超线程在llm推理上是负加成

<!-- gh-comment-id:2655899762 --> @buliaoyin commented on GitHub (Feb 13, 2025): > Platinum P-8136 用实际核心数,也就是56,超线程在llm推理上是负加成
Author
Owner

@hello2mao commented on GitHub (Feb 13, 2025):

Platinum P-8136

用实际核心数,也就是56,超线程在llm推理上是负加成

调整成--cpu_infer 56,测下来大概是1.7 token/s

python3 ./ktransformers/local_chat.py --model_path /data/download_deepseek_r1/DeepSeek-R1 --gguf_path /data/DeepSeek-R1-Q4_K_M --cpu_infer 56 --max_new_tokens 1000 --force_think true

Image

<!-- gh-comment-id:2655960053 --> @hello2mao commented on GitHub (Feb 13, 2025): > > Platinum P-8136 > > 用实际核心数,也就是56,超线程在llm推理上是负加成 调整成--cpu_infer 56,测下来大概是1.7 token/s ``` python3 ./ktransformers/local_chat.py --model_path /data/download_deepseek_r1/DeepSeek-R1 --gguf_path /data/DeepSeek-R1-Q4_K_M --cpu_infer 56 --max_new_tokens 1000 --force_think true ``` ![Image](https://github.com/user-attachments/assets/9e9ca93c-7d98-48da-b5a3-d8db73e12cbc)
Author
Owner

@murongweibo commented on GitHub (Feb 13, 2025):

Platinum P-8136

用实际核心数,也就是56,超线程在llm推理上是负加成

调整成--cpu_infer 56,测下来大概是1.7 token/s

python3 ./ktransformers/local_chat.py --model_path /data/download_deepseek_r1/DeepSeek-R1 --gguf_path /data/DeepSeek-R1-Q4_K_M --cpu_infer 56 --max_new_tokens 1000 --force_think true

Image

你这个模型体积是多大的?

<!-- gh-comment-id:2655975157 --> @murongweibo commented on GitHub (Feb 13, 2025): > > > Platinum P-8136 > > > > > > 用实际核心数,也就是56,超线程在llm推理上是负加成 > > 调整成--cpu_infer 56,测下来大概是1.7 token/s > > ``` > python3 ./ktransformers/local_chat.py --model_path /data/download_deepseek_r1/DeepSeek-R1 --gguf_path /data/DeepSeek-R1-Q4_K_M --cpu_infer 56 --max_new_tokens 1000 --force_think true > ``` > > ![Image](https://github.com/user-attachments/assets/9e9ca93c-7d98-48da-b5a3-d8db73e12cbc) 你这个模型体积是多大的?
Author
Owner

@hello2mao commented on GitHub (Feb 13, 2025):

Platinum P-8136

用实际核心数,也就是56,超线程在llm推理上是负加成

调整成--cpu_infer 56,测下来大概是1.7 token/s

python3 ./ktransformers/local_chat.py --model_path /data/download_deepseek_r1/DeepSeek-R1 --gguf_path /data/DeepSeek-R1-Q4_K_M --cpu_infer 56 --max_new_tokens 1000 --force_think true

Image

你这个模型体积是多大的?

用的这个:https://huggingface.co/unsloth/DeepSeek-R1-GGUF/tree/main/DeepSeek-R1-Q4_K_M

<!-- gh-comment-id:2656002881 --> @hello2mao commented on GitHub (Feb 13, 2025): > > > > Platinum P-8136 > > > > > > > > > 用实际核心数,也就是56,超线程在llm推理上是负加成 > > > > > > 调整成--cpu_infer 56,测下来大概是1.7 token/s > > ``` > > python3 ./ktransformers/local_chat.py --model_path /data/download_deepseek_r1/DeepSeek-R1 --gguf_path /data/DeepSeek-R1-Q4_K_M --cpu_infer 56 --max_new_tokens 1000 --force_think true > > ``` > > > > > > > > > > > > > > > > > > > > > > > > ![Image](https://github.com/user-attachments/assets/9e9ca93c-7d98-48da-b5a3-d8db73e12cbc) > > 你这个模型体积是多大的? 用的这个:https://huggingface.co/unsloth/DeepSeek-R1-GGUF/tree/main/DeepSeek-R1-Q4_K_M
Author
Owner

@tarjintor commented on GitHub (Feb 13, 2025):

为什么不用v0.3,以及如果直接ollama跑速度多少可以对比下吗,我之前有更低配epyc2代,ollama都远远不止这个速度

<!-- gh-comment-id:2656033256 --> @tarjintor commented on GitHub (Feb 13, 2025): 为什么不用v0.3,以及如果直接ollama跑速度多少可以对比下吗,我之前有更低配epyc2代,ollama都远远不止这个速度
Author
Owner

@hello2mao commented on GitHub (Feb 13, 2025):

为什么不用v0.3,以及如果直接ollama跑速度多少可以对比下吗,我之前有更低配epyc2代,ollama都远远不止这个速度

因为没有支持amx的cpu。我看官方v0.2的数据也不差,想实测下。

<!-- gh-comment-id:2656042112 --> @hello2mao commented on GitHub (Feb 13, 2025): > 为什么不用v0.3,以及如果直接ollama跑速度多少可以对比下吗,我之前有更低配epyc2代,ollama都远远不止这个速度 因为没有支持amx的cpu。我看官方v0.2的数据也不差,想实测下。
Author
Owner

@tarjintor commented on GitHub (Feb 13, 2025):

为什么不用v0.3,以及如果直接ollama跑速度多少可以对比下吗,我之前有更低配epyc2代,ollama都远远不止这个速度

因为没有支持amx的cpu。只要我看官方v0.2的数据也不差,想实测下。

不支持也直接v0.3试试?也可以直接ollama试试,我的经验觉得你的这个配置ollama中短5tps肯定可以,0.6肯定那里出问题了

<!-- gh-comment-id:2656049153 --> @tarjintor commented on GitHub (Feb 13, 2025): > > 为什么不用v0.3,以及如果直接ollama跑速度多少可以对比下吗,我之前有更低配epyc2代,ollama都远远不止这个速度 > > 因为没有支持amx的cpu。只要我看官方v0.2的数据也不差,想实测下。 不支持也直接v0.3试试?也可以直接ollama试试,我的经验觉得你的这个配置ollama中短5tps肯定可以,0.6肯定那里出问题了
Author
Owner

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

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 DRAM (448GB)

git clone https://github.com/kvcache-ai/ktransformers.git
cd ktransformers
git submodule init
git submodule update
export USE_NUMA=1
make dev_install
# Dual socket version (112 cores)
python3 ./ktransformers/local_chat.py --model_path /data/download_deepseek_r1/DeepSeek-R1 --gguf_path /data/DeepSeek-R1-Q4_K_M --cpu_infer 112 --max_new_tokens 1000 --force_think true

如下:13GB VRAM Image 如下:112核占满;内存378GB Image 如下:0.6 token/s Image

你的u太老了,不支持amx
双路仅支持12通道 2400,带宽太低

请问下,”12通道 2400“的意思是,我把--cpu_infer 112改成--cpu_infer 24?

内存通道数啊,你这只有12通道,还是d4 2400,带宽太低了

<!-- gh-comment-id:2656259012 --> @BiFangKNT commented on GitHub (Feb 13, 2025): > > > 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 DRAM (448GB) > > > ``` > > > git clone https://github.com/kvcache-ai/ktransformers.git > > > cd ktransformers > > > git submodule init > > > git submodule update > > > export USE_NUMA=1 > > > make dev_install > > > # Dual socket version (112 cores) > > > python3 ./ktransformers/local_chat.py --model_path /data/download_deepseek_r1/DeepSeek-R1 --gguf_path /data/DeepSeek-R1-Q4_K_M --cpu_infer 112 --max_new_tokens 1000 --force_think true > > > ``` > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 如下:13GB VRAM ![Image](https://github.com/user-attachments/assets/f7862567-a784-4433-9928-5105b9036b6b) 如下:112核占满;内存378GB ![Image](https://private-user-images.githubusercontent.com/8265961/412792421-c5afe2b9-bbba-4de6-a647-467c5f4d2e60.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MzYyNTksIm5iZiI6MTczOTQzNTk1OSwicGF0aCI6Ii84MjY1OTYxLzQxMjc5MjQyMS1jNWFmZTJiOS1iYmJhLTRkZTYtYTY0Ny00NjdjNWY0ZDJlNjAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTNUMDgzOTE5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Y2E5NDg1ZWZkN2Y1NTNhOTExYTJiMDRkYzlkYzg4MGRkNzVlYThiMTRhNmQ3YTJlNzk3N2M3Mjg4MDg4NjYyOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.P17XZu1mrxXJY4GeepgP5bUvtNOt0OnDKZTsmVp8QJk) 如下:0.6 token/s ![Image](https://private-user-images.githubusercontent.com/8265961/412792481-03f5550f-a233-4587-adb9-773ccdc73937.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MzYyNTksIm5iZiI6MTczOTQzNTk1OSwicGF0aCI6Ii84MjY1OTYxLzQxMjc5MjQ4MS0wM2Y1NTUwZi1hMjMzLTQ1ODctYWRiOS03NzNjY2RjNzM5MzcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTNUMDgzOTE5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTYyZjgzMGYxOWUwNjBlYjMxNTRhMWIwOGZhYWQyYjM3YWQyYmMzZWYxOGRjZWE2M2U5YTZkMzgyZGQ1MGNkOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.HwleK0MgmIhutrsLPqyg8CFuVsAIJ8WkSFugIWW65Hc) > > > > > > 你的u太老了,不支持amx > > 双路仅支持12通道 2400,带宽太低 > > 请问下,”12通道 2400“的意思是,我把--cpu_infer 112改成--cpu_infer 24? 内存通道数啊,你这只有12通道,还是d4 2400,带宽太低了
Author
Owner

@lulu2048 commented on GitHub (Feb 13, 2025):

调整成--cpu_infer 24,测下来大概是多少token/s?

<!-- gh-comment-id:2657519613 --> @lulu2048 commented on GitHub (Feb 13, 2025): 调整成--cpu_infer 24,测下来大概是多少token/s?
Author
Owner

@hello2mao commented on GitHub (Feb 14, 2025):

调整成--cpu_infer 24,测下来大概是多少token/s?

1.8 token/s
Image

<!-- gh-comment-id:2658084657 --> @hello2mao commented on GitHub (Feb 14, 2025): > 调整成--cpu_infer 24,测下来大概是多少token/s? 1.8 token/s ![Image](https://github.com/user-attachments/assets/0eb20ad8-0211-4c03-94c7-9bee6f1e9a50)
Author
Owner

@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

<!-- gh-comment-id:2658152334 --> @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`
Author
Owner

@jhscut commented on GitHub (Feb 14, 2025):

请问你的optimize_rule怎么写的

<!-- gh-comment-id:2658170860 --> @jhscut commented on GitHub (Feb 14, 2025): 请问你的optimize_rule怎么写的
Author
Owner

@hello2mao 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

谢谢提醒,我看了下,目前内存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 应该是符合预期的。

<!-- gh-comment-id:2658202567 --> @hello2mao 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` 谢谢提醒,我看了下,目前内存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 应该是符合预期的。
Author
Owner

@hello2mao commented on GitHub (Feb 14, 2025):

请问你的optimize_rule怎么写的

这部分我也没修改。

<!-- gh-comment-id:2658205460 --> @hello2mao commented on GitHub (Feb 14, 2025): > 请问你的optimize_rule怎么写的 这部分我也没修改。
Author
Owner

@lulu2048 commented on GitHub (Feb 14, 2025):

调整成--cpu_infer 24,测下来大概是多少token/s?

1.8 token/s Image

https://github.com/kvcache-ai/ktransformers/issues/181#issuecomment-2657583298
听说cpu_infer 4-20内推理速度最佳,启用核心太多会互相争抢内存带宽,可以关闭CPU超线程功能后用二分法测试

<!-- gh-comment-id:2658206193 --> @lulu2048 commented on GitHub (Feb 14, 2025): > > 调整成--cpu_infer 24,测下来大概是多少token/s? > > 1.8 token/s ![Image](https://github.com/user-attachments/assets/0eb20ad8-0211-4c03-94c7-9bee6f1e9a50) https://github.com/kvcache-ai/ktransformers/issues/181#issuecomment-2657583298 听说cpu_infer 4-20内推理速度最佳,启用核心太多会互相争抢内存带宽,可以关闭CPU超线程功能后用二分法测试
Author
Owner

@BiFangKNT 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

谢谢提醒,我看了下,目前内存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 应该是符合预期的。

内存带宽是最重要的,你竟然没插满😂🤣

<!-- gh-comment-id:2658293500 --> @BiFangKNT 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` > > 谢谢提醒,我看了下,目前内存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 应该是符合预期的。 内存带宽是最重要的,你竟然没插满😂🤣
Author
Owner

@leizhang588 commented on GitHub (Feb 14, 2025):

你这个内存带宽远远不够,12通道,才插了7个,理论带宽134G,实际带宽最多120G,只有作者带宽的1/5,速度最多也就1.8t/s,如果插满的话,理论230G,实际带宽大概有220G,预计速度接近4t/s.

<!-- gh-comment-id:2658336758 --> @leizhang588 commented on GitHub (Feb 14, 2025): 你这个内存带宽远远不够,12通道,才插了7个,理论带宽134G,实际带宽最多120G,只有作者带宽的1/5,速度最多也就1.8t/s,如果插满的话,理论230G,实际带宽大概有220G,预计速度接近4t/s.
Author
Owner

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

提醒下,双路U要开numactl,内存需要预备两倍

<!-- gh-comment-id:2660980047 --> @Radohead commented on GitHub (Feb 15, 2025): 提醒下,双路U要开numactl,内存需要预备两倍
Author
Owner

@yansiyu550 commented on GitHub (Feb 18, 2025):

htop 看cpu都满了吗?作者的内存带宽600GB/s,你的 Intel Xeon Platinum P-8136两个: 6x2 = 12通道都插满了吗?按理得有250GB/s,250/600 * 作者的12t/s ≈ 4-5token/s

您好,想问一下

  • GPU:8 * NVIDIA GeForce RTX 4090 24G
  • CPU:Intel(R) Xeon(R) Gold 6430(2 NUMA node(s),支持AMX)
  • 内存960G
    V0.2性能数据符合预期吗?比作者低很多,用的API接口:Performance(T/s): prefill 4.045294075735022, decode 3.956256483823671. Time(s): tokenize 0.01299285888671875, prefill 1.9776065349578857, decode 284.10695934295654
<!-- gh-comment-id:2664750113 --> @yansiyu550 commented on GitHub (Feb 18, 2025): > htop 看cpu都满了吗?作者的内存带宽600GB/s,你的 Intel Xeon Platinum P-8136两个: 6x2 = 12通道都插满了吗?按理得有250GB/s,`250/600 * 作者的12t/s ≈ 4-5token/s` 您好,想问一下 * GPU:8 * NVIDIA GeForce RTX 4090 24G * CPU:Intel(R) Xeon(R) Gold 6430(2 NUMA node(s),支持AMX) * 内存960G V0.2性能数据符合预期吗?比作者低很多,用的API接口:Performance(T/s): prefill 4.045294075735022, decode 3.956256483823671. Time(s): tokenize 0.01299285888671875, prefill 1.9776065349578857, decode 284.10695934295654
Author
Owner

@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

Image

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是满负载了,哪里出问题了呢?

<!-- gh-comment-id:2664770749 --> @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 ![Image](https://github.com/user-attachments/assets/39f3377f-2c56-425c-91b5-c139085e2c4f) 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是满负载了,哪里出问题了呢?
Author
Owner

@yansiyu550 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

Image

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是满负载了,哪里出问题了呢?

用top看内存吧,很多工具不准确

<!-- gh-comment-id:2664789554 --> @yansiyu550 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 > > ![Image](https://github.com/user-attachments/assets/39f3377f-2c56-425c-91b5-c139085e2c4f) > > 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是满负载了,哪里出问题了呢? 用top看内存吧,很多工具不准确
Author
Owner

@yansiyu550 commented on GitHub (Feb 18, 2025):

你这个内存带宽远远不够,12通道,才插了7个,理论带宽134G,实际带宽最多120G,只有作者带宽的1/5,速度最多也就1.8t/s,如果插满的话,理论230G,实际带宽大概有220G,预计速度接近4t/s.

只看cpu计算带宽,不需要看D2H的带宽吗?

<!-- gh-comment-id:2665003561 --> @yansiyu550 commented on GitHub (Feb 18, 2025): > 你这个内存带宽远远不够,12通道,才插了7个,理论带宽134G,实际带宽最多120G,只有作者带宽的1/5,速度最多也就1.8t/s,如果插满的话,理论230G,实际带宽大概有220G,预计速度接近4t/s. 只看cpu计算带宽,不需要看D2H的带宽吗?
Author
Owner

@su161021 commented on GitHub (Feb 18, 2025):

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 DRAM (448GB)

git clone https://github.com/kvcache-ai/ktransformers.git
cd ktransformers
git submodule init
git submodule update
export USE_NUMA=1
make dev_install
# Dual socket version (112 cores)
python3 ./ktransformers/local_chat.py --model_path /data/download_deepseek_r1/DeepSeek-R1 --gguf_path /data/DeepSeek-R1-Q4_K_M --cpu_infer 112 --max_new_tokens 1000 --force_think true

如下:13GB VRAM Image 如下:112核占满;内存378GB Image 如下:0.6 token/s Image

你的u太老了,不支持amx
双路仅支持12通道 2400,带宽太低

请问下,”12通道 2400“的意思是,我把--cpu_infer 112改成--cpu_infer 24?

内存通道数啊,你这只有12通道,还是d4 2400,带宽太低了

你好 我测试出来的结果是 显存使用14G,内存使用8G,cpu 16核,这个数据对吗,每秒token数量5个。

<!-- gh-comment-id:2665096994 --> @su161021 commented on GitHub (Feb 18, 2025): > > > > 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 DRAM (448GB) > > > > ``` > > > > git clone https://github.com/kvcache-ai/ktransformers.git > > > > cd ktransformers > > > > git submodule init > > > > git submodule update > > > > export USE_NUMA=1 > > > > make dev_install > > > > # Dual socket version (112 cores) > > > > python3 ./ktransformers/local_chat.py --model_path /data/download_deepseek_r1/DeepSeek-R1 --gguf_path /data/DeepSeek-R1-Q4_K_M --cpu_infer 112 --max_new_tokens 1000 --force_think true > > > > ``` > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 如下:13GB VRAM ![Image](https://github.com/user-attachments/assets/f7862567-a784-4433-9928-5105b9036b6b) 如下:112核占满;内存378GB ![Image](https://private-user-images.githubusercontent.com/8265961/412792421-c5afe2b9-bbba-4de6-a647-467c5f4d2e60.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MzYyNTksIm5iZiI6MTczOTQzNTk1OSwicGF0aCI6Ii84MjY1OTYxLzQxMjc5MjQyMS1jNWFmZTJiOS1iYmJhLTRkZTYtYTY0Ny00NjdjNWY0ZDJlNjAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTNUMDgzOTE5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Y2E5NDg1ZWZkN2Y1NTNhOTExYTJiMDRkYzlkYzg4MGRkNzVlYThiMTRhNmQ3YTJlNzk3N2M3Mjg4MDg4NjYyOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.P17XZu1mrxXJY4GeepgP5bUvtNOt0OnDKZTsmVp8QJk) 如下:0.6 token/s ![Image](https://private-user-images.githubusercontent.com/8265961/412792481-03f5550f-a233-4587-adb9-773ccdc73937.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MzYyNTksIm5iZiI6MTczOTQzNTk1OSwicGF0aCI6Ii84MjY1OTYxLzQxMjc5MjQ4MS0wM2Y1NTUwZi1hMjMzLTQ1ODctYWRiOS03NzNjY2RjNzM5MzcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTNUMDgzOTE5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTYyZjgzMGYxOWUwNjBlYjMxNTRhMWIwOGZhYWQyYjM3YWQyYmMzZWYxOGRjZWE2M2U5YTZkMzgyZGQ1MGNkOSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.HwleK0MgmIhutrsLPqyg8CFuVsAIJ8WkSFugIWW65Hc) > > > > > > > > > 你的u太老了,不支持amx > > > 双路仅支持12通道 2400,带宽太低 > > > > > > 请问下,”12通道 2400“的意思是,我把--cpu_infer 112改成--cpu_infer 24? > > 内存通道数啊,你这只有12通道,还是d4 2400,带宽太低了 你好 我测试出来的结果是 显存使用14G,内存使用8G,cpu 16核,这个数据对吗,每秒token数量5个。
Author
Owner

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

多gpu要用这个参数,--optimize_rule_path ./ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-multi-gpu.yaml

<!-- gh-comment-id:2671779521 --> @txg1550759 commented on GitHub (Feb 20, 2025): 多gpu要用这个参数,--optimize_rule_path ./ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat-multi-gpu.yaml
Author
Owner

@leizhang588 commented on GitHub (Feb 21, 2025):

你这个内存带宽远远不够,12通道,才插了7个,理论带宽134G,实际带宽最多120G,只有作者带宽的1/5,速度最多也就1.8t/s,如果插满的话,理论230G,实际带宽大概有220G,预计速度接近4t/s.

只看cpu计算带宽,不需要看D2H的带宽吗?

也需要看,所以双路带宽在实际上并不等效双U的内存总带宽,会有一定的损失,接近损失10%

<!-- gh-comment-id:2673084922 --> @leizhang588 commented on GitHub (Feb 21, 2025): > > 你这个内存带宽远远不够,12通道,才插了7个,理论带宽134G,实际带宽最多120G,只有作者带宽的1/5,速度最多也就1.8t/s,如果插满的话,理论230G,实际带宽大概有220G,预计速度接近4t/s. > > 只看cpu计算带宽,不需要看D2H的带宽吗? 也需要看,所以双路带宽在实际上并不等效双U的内存总带宽,会有一定的损失,接近损失10%
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:3639922707 --> @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#134
No description provided.