mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #782] [Bug] Newly added IQ1-2 quants produces garbage output using Unsloth quants and default optimize rules #565
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#565
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 @ThomasBaruzier on GitHub (Mar 4, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/782
Checklist
Describe the bug
I wanted to try https://github.com/kvcache-ai/ktransformers/pull/754
However, the local chat demo produces garbage outputs when using
/optimize/optimize_rules/DeepSeek-V3-Chat.yamlwith the following command:Under
/home/user/files/ai/llama/models/there isDeepSeek-R1-UD-IQ2_XXS.gguf.The same bug applies for
DeepSeek-R1-UD-IQ1_S.gguf, and everything works when usingDeepSeek-R1-UD-Q2_K_XL.ggufand the exact same setup.Also, the DRAM usage is off. Loading
DeepSeek-R1-UD-IQ1_S.ggufuses 14GB DRAM andDeepSeek-R1-UD-IQ2_XXS.ggufuses 88GB DRAM, which is definitely suspicious. Could it be that/optimize/optimize_rules/DeepSeek-V3-Chat.yamlneeds modifications to work properly with such quants?Example output:
Using these models in llama.cpp do not present any issues.
Reproduction
Environment
ArchLinux x86_64
Cuda 12.8
Driver 570.124.04
Python 3.12.9
Torch 2.6.0
KTransformers @ file:///home/user/files/ai/ktransformers
3 x RTX 3090
128GB DDR4
Ryzen 9 5950x
@Azure-Tang commented on GitHub (Mar 4, 2025):
I'm testing UD-IQ1_S, it works fine here. Can you create a clean env to rebuild KT and try again?
@ThomasBaruzier commented on GitHub (Mar 4, 2025):
Thanks for your response, but I am still having issues with a clean install and this script:
Command for IQ1_S quant:
Model:
@Azure-Tang commented on GitHub (Mar 4, 2025):
Seems that you didn't run
bash install.sh?@ThomasBaruzier commented on GitHub (Mar 4, 2025):
@Azure-Tang I did, it's in the script I provided. It says that the KTransformer package has been built and installed in my python environment
Testing llama.cpp with the same model produces coherent outputs:
@Azure-Tang commented on GitHub (Mar 4, 2025):
Use conda instead or try this:
I suspect that your env is not switching.
@ThomasBaruzier commented on GitHub (Mar 5, 2025):
I confirm the venv is used, Arch does not accept global envs and KTransformers is not installed on this scope.
I used Docker to try again:
build.sh:compose.yml.venv:Dockerfile.venv:Then,
docker exec -it docker-ktransformers-1 bash,source venv/bin/activate, and finally the same command as before with IQ1_S. Sadly, same garbage output.I was unable to use anaconda or miniconda due to unkown errors and missing symbols such as the following: https://github.com/pytorch/pytorch/issues/123097
@Azure-Tang commented on GitHub (Mar 5, 2025):
Try use latest image and rebuild in container?
docker pull approachingai/ktransformersdont use venv in container.
@ThomasBaruzier commented on GitHub (Mar 5, 2025):
I did a clean build from scratch using miniconda3 and the ktransformers wiki on arch, no containers:
Env:
Command:
Output:
What's weird is that the RAM usage is still 10GB, even without optimization rules.
Also, the CUDA error here cannot be fixed by
--use_cuda_graph False.Once again, the exact same setup works for Q2_K_XL dynamic quant.
I will try the approachingai/ktransformers container and report back.
@ThomasBaruzier commented on GitHub (Mar 5, 2025):
Previous comment, TLDR I crashed because I used AVX512 instead of AVX2
Here are my results using
approachingai/ktransformer:latest-AVX512 644b3538931c:This time, all quants are crashing. I tried redownloading IQ_1S and not merging the splited files as well, without success.
Here are my results using
approachingai/ktransformer:latest-AVX2:Edit: The process still uses around 15GB of RAM for unknown reasons
Edit: Even shorter prompts don't crash, but do not output anything:
@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 的贡献!