mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #186] DeepSeek-R1-UD-IQ1_M 回答乱码 #104
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#104
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 @ruifenggong on GitHub (Feb 13, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/186
配置:
CPU: Intel Xeon Gold 6348 @ 112x 3.5GHz [39.0°C]
GPU: NVIDIA GeForce RTX 4090, NVIDIA GeForce RTX 4090, NVIDIA GeForce RTX 4090, NVIDIA GeForce RTX 4090, NVIDIA GeForce RTX 4090, NVIDIA GeForce RTX 4090, NVIDIA GeForce RTX 4090, NVIDIA GeForce RTX 4090
RAM: 46928MiB / 515602MiB
目前安装的是:ktransformers-0.2.0+cu121torch23avx512-cp310-cp310-linux_x86_64.whl
模型是:https://huggingface.co/unsloth/DeepSeek-R1-GGUF/tree/main/DeepSeek-R1-UD-IQ1_M
启动命令:python ./ktransformers/local_chat.py --model_path deepseek-ai/DeepSeek-R1 --gguf_path /workspace/llms/DeepSeek-R1-GGUF --cpu_infer 33 --max_new_tokens 1000 --force_think true
然后实际测试效果:
帮忙看下什么问题?
@kissint8 commented on GitHub (Feb 13, 2025):
您好,DeepSeek-R1-Q4_K_M,装入需要400+GB显存,从上述来看 似乎内存分担了40GB,剩余部分靠24GB的4090x8应该难以容下吧?跑的是多机吗,还是有其他优化的trick?
@ruifenggong commented on GitHub (Feb 13, 2025):
不好意思,这个是我写错了,这个模型 是DeepSeek-R1-UD-IQ1_M,但确实只是用了一个24g显存的4090,内存也如你所说用了不到40g。没有用其他trick,单机。
@Itsanewday commented on GitHub (Feb 13, 2025):
你好,请教下这个是如何运行成功的?
@kissint8 commented on GitHub (Feb 13, 2025):
UD-IQ1的尺寸大概170GB左右,能单张4090+不到40GB的CPU内存跑起来,Ktransformers对MoE模型的专家卸载确实厉害。 我下个相同配置跑跑看,之前用LLamA70B蒸馏版本总会报meta tensor的错误。
@ruifenggong commented on GitHub (Feb 13, 2025):
测了下DeepSeek-R1-Q4_K_M,速度非常慢,0.8token/s,显存占用也用不满一张卡,然后内存的使用量也没上来。
运行命令:
python ./ktransformers/local_chat.py --model_path deepseek-ai/DeepSeek-R1 --gguf_path /workspace/llms/DeepSeek-R1-Q4_K_M --cpu_infer 64 --max_new_tokens 1000 --force_think true@tarjintor commented on GitHub (Feb 13, 2025):
似乎是因为还没支持其他量化版本,我q2也是乱码输出,但速度还行,等官方支持了
@kissint8 commented on GitHub (Feb 13, 2025):
4090单卡+CPU辅助,跑DS-Q4还是太勉强了吧:),之前尝试用HXXX*8用ollama跑,总体显存占用410GB,计算利用率10%,速度大概24tokens/s;vllm的Q4还在部署中,预期计算利用率应该能拉到60%以上。
@ruifenggong commented on GitHub (Feb 13, 2025):
我也用ollama跑过DeepSeek-R1-UD-IQ1_M,8*4090,计算利用率也不高,大概4个token/s;目前本地最丝滑的还是qwen 32b 的量化版;vllm有空也折腾下看看。
@Atream commented on GitHub (Feb 13, 2025):
IQ1和IQ2的量化版本还没支持,正在写代码
@ruifenggong commented on GitHub (Feb 13, 2025):
nice,坐等
@Fankbai commented on GitHub (Feb 13, 2025):
使用unsloth的或者is210379/DeepSeek-R1-UD-IQ1_S 都報錯
/
DeepSeek-R1-GGUF
報錯:
@ruifenggong commented on GitHub (Feb 13, 2025):
你的网络没法连接上huggingface吧,
配置个镜像看看
export HF_ENDPOINT=https://hf-mirror.com@Zha-Miku commented on GitHub (Feb 13, 2025):
我的是10卡 l40,480g显存,但是不知道要用那个yaml好,这怎么不支持deepseekV3呢
@LVFENGCHUN commented on GitHub (Feb 13, 2025):
你的rule yaml是什么呢?
@Zha-Miku commented on GitHub (Feb 14, 2025):
10*l40 vram:480G, ran:512G,运行q4km的gguf回答乱码,显存10%都占不到
@luckychen2025 commented on GitHub (Feb 14, 2025):
持续关注进展,我本机是4090+128内存,ollama+1.58量化版本的unsloth能勉强跑起来基本不可用,期待黑科技。
@ubergarm commented on GitHub (Feb 14, 2025):
感谢@Fankbai ,我的模型已经跑通啦!
还有几个问题想确认一下:
prompt_file参数指的是系统提示词吗?(确定R1模型应该留空)我正在编写运行指南帮助更多人:
https://github.com/ubergarm/r1-ktransformers-guide
感谢!
Yeah thanks @Fankbai , I got it working!
I still have a few questions:
prompt_filerefer to thesystemprompt? (should be empty for R1 pretty sure).I am working on a guide to help people run this:
https://github.com/ubergarm/r1-ktransformers-guide
Thanks!
@tarjintor commented on GitHub (Feb 15, 2025):
this works for me,thanks a lot @ubergarm ,but I found it seems the model not smart enough now,I run 2.51bit with llama.cpp can answer the physics question '
now with this it can't,would you like to test its intellegence with other questions?
@Atream commented on GitHub (Feb 15, 2025):
Thank you for pointing out the issue. We will conduct the relevant tests.
@montagetao commented on GitHub (Feb 15, 2025):
请教下KT 目前能跑在纯CPU 模式下么? 看到KT 0.3 会支持AMX ,意味着能支持纯CPU模式么? 谢谢
@BiFangKNT commented on GitHub (Feb 16, 2025):
不用kt也能纯cpu跑啊
现在应该只要给gpu分配0层就行
@montagetao commented on GitHub (Feb 16, 2025):
我知道呀,想试试他们的区别
@BiFangKNT commented on GitHub (Feb 16, 2025):
那你就自己试试嘛,肯定是比有gpu慢的,发挥不了太多加速效果
@montagetao commented on GitHub (Feb 16, 2025):
没有跑通呀,总是cuda 报错,看起来必须有GPU才行
@BiFangKNT commented on GitHub (Feb 16, 2025):
好像该项目专注于cpu+gpu协同推理,应该是没做纯cpu这个功能?
@Atream 召唤大佬来解释一下
@GuokaiLiu commented on GitHub (Feb 16, 2025):
@BiFangKNT commented on GitHub (Feb 16, 2025):
#148
@yansiyu550 commented on GitHub (Feb 19, 2025):
麻烦帮忙看一下V0.2.1预填充速度与官方差距这么大原因是啥?
测试环境:
CPU:Intel(R) Xeon(R) Gold 6430, 29 cores per socket, 2 sockets, 2 numa nodes
GPU: 4090 24G VRAM
test after enough warm up
944G DRAM
System: Ubuntu 22.04.3 LTS
Python 3.10.12
CUDA:Build cuda_12.3.r12.3
NVIDIA Driver:12.2 - NVIDIA GeForce RTX 4090 x 8
PyTorch version: 2.6.0+cu124
flash-attn: 2.7.1.post4
python -m ktransformers.local_chat --model_path /workspace/Deepseek-models/DeepSeek-R1 --gguf_path /workspace/Deepseek-models/DeepSeek-R1-Q4_K_M --cpu_infer 65 --max_new_tokens 1000
测试结果:
Prefill token/s(最高):13.35
Decode token/s(最高):10.11
内存占用: 903.6G/944G = 95.7%
显存占用:14881MiB / 24564MiB = 14.54G/24G = 60.51%
内存理论带宽是563 GB/s,实测出来的大约352GB/s
官方速度:V0.2.1
Prefill token/s:88.2
Decode token/s:13.5
@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 的贡献!