mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #973] 显存占用是否存在优化方式 #693
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#693
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 @sunhaoyu-1990 on GitHub (Mar 25, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/973
Originally assigned to: @KMSorSMS on GitHub.
目前通过Ktransformer 0.2版本,已经运行起来了DeepSeek-R1-671B-Q4-K-M的模型
硬件配置如下:
显卡:3080Ti(12GB) * 8
内存:512GB
运行命令为
ktransformers --optimize_config_path /ktransformers/ktransformers/optimize/optimize_rules/DeepSeek-V3-Chat.yaml --model_path /mount/DeepSeek-R1-671B --gguf_path /mount/DeepSeek-R1-671B-GGUF --cpu_infer 56 --max_new_tokens 1024 --model_name DeepSeek-R1-full其中DeepSeek-V3-Chat.yaml配置文件内容进行了更改,权重分到了6个卡上,以下是其中一部分内容
刚布上去时显存总占用16GB,内存占用381GB,推理速度为7t/s,如下图所示
开启接口后,通过open webUI进行调用。目前问题是第一次请求,显存占用没有什么变化,但是继续请求沟通问题之后,显存直接暴涨到50GB,基本上吧5张卡占满了。
当再多次请求后,程序直接强退,并报错:Segmentation fault (core dumped)
请问这是什么原因,或者怎么解决
@KMSorSMS commented on GitHub (Mar 25, 2025):
应该是server端有历史记录信息,但是第二次沟通直接暴涨的情况应该是之前版本的遗留bug,请问您是用的就是v0.2版本吗?有试试更高版本的吗?
@sunhaoyu-1990 commented on GitHub (Mar 25, 2025):
对,目前用的就是v0.2的版本,高版本还没有试,那具体哪一个版本解决了这个bug嘞
@KMSorSMS commented on GitHub (Mar 25, 2025):
应该是在这里https://github.com/kvcache-ai/ktransformers/releases/tag/v0.2.3,
因为这里解决了显存大的开销,从而支持了长文本