Bug Report: kvarn6 KV-quantization causes massive performance regression on ROCm (RX 7900 XTX)
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 30/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- cpp
- Domaine
- machine-learning, performance
Piste de recherche
Reproduce with the two llama-server commands and compare the attached level-5 logs, focusing on where the kvarn6 path diverges from q8_0 in the ROCm backend. Profile prompt processing and token generation separately to find whether the slowdown is in quantization, attention, or kernel dispatch. Done means the regression is localized to a specific ROCm kernel or code path and kvarn6 throughput is no longer an order of magnitude below q8_0.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Issue: Using KV-quantization kvarn6 results in extremely slow performance compared to q8_0 on AMD ROCm hardware.
Performance Comparison
Both tests used the same prompt (10,410 tokens) and identical settings except for KV quantization.
Note: The kvarn6 run was canceled early due to excessive runtime.
| Metric | q8_0 | kvarn6 | Regression |
|---|---|---|---|
| Prompt Processing | 821.19 tokens/sec | 53.79 tokens/sec | ~15.3x slower |
| Text Generation | 29.52 tokens/sec | 1.34 tokens/sec | ~22x slower |
This is a severe performance regression that makes kvarn6 practically unusable.
Steps to Reproduce
- Use llama.cpp build
11192 (ee8754c57)with ROCm backend on Windows - Load a large model (tested with Qwen3.6-27B-Fable-Fusion-Q4_K_M)
- Run with full offload (
-ngl 99) and flash attention (-fa 1) - Compare these two configurations:
q8_0 (baseline):
llama-server.exe -m <model> -ngl 99 -fa 1 -ctk q8_0 -ctv q8_0 -c 40000
kvarn6 (regression):
llama-server.exe -m <model> -ngl 99 -fa 1 -ctk kvarn6 -ctv kvarn6 -c 40000
System Information
- GPU: AMD Radeon RX 7900 XTX (24 GB VRAM)
- CPU: AMD Ryzen 9 7900X 12-Core
- RAM: 64 GB
- OS: Windows
- Backend: ROCm (HIP), NO_VMM = 1
- Build: 11192 (ee8754c57) with Clang 20.1.8 for Windows x86_64
- Model: Qwen3.6-27B-Fable-Fusion (Q4_K_M, 65 layers, 27.32B params, 17.22 GiB)
Relevant Log Excerpts
q8_0 performance:
prompt processing, n_tokens = 10410, progress = 1.00, t = 11.93 s / 872.56 tokens per second
prompt eval time = 12681.67 ms / 10414 tokens (1.22 ms per token, 821.19 tokens per second)
eval time = 73468.79 ms / 2169 tokens (33.87 ms per token, 29.52 tokens per second)
kvarn6 performance (run canceled after ~5.5 minutes):
prompt processing, n_tokens = 10410, progress = 1.00, t = 193.54 s / 53.79 tokens per second
n_decoded = 144, tg = 1.34 t/s
Expected Behavior
kvarn6 should provide competitive or better performance than q8_0 while using less VRAM, or at least not be an order of magnitude slower.
Actual Behavior
kvarn6 is 15-22x slower than q8_0 on ROCm hardware, making it impractical for use.
Additional Notes
- This appears to be ROCm-specific; the kvarn6 implementation may not be optimized for AMD GPUs
- The issue affects both prompt processing and token generation equally severely
- The kvarn6 run was manually canceled due to excessive runtime; actual degradation may be even more severe over longer generations
- Full log level 5 logs for both q8_0 and kvarn6 runs are attached to this issue
- Langage dominant
- C++
- Étoiles
- 1.2k
- Forks
- 80
- Merge moyen
- 4 j 20 h
- PR mergées (30 j)
- 2
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de Anbeeld/beellama.cpp
-
[BUG] KVarN assertion failure in build_inp_mem_hybrid_iswa() due to uninitialized self_kvarn_rotOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Anbeeld/beellama.cpp#205 ·
-
Difficulté 3/5 Une demi-journée Accessibilité débutants 58/100
Anbeeld/beellama.cpp#206 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 57/100
Anbeeld/beellama.cpp#204 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
Anbeeld/beellama.cpp#203 · 2 commentaires ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
Anbeeld/beellama.cpp#202 · 1 commentaire ·
Toutes les issues de Anbeeld/beellama.cpp
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
CachyOS/packageinstaller#144 ·
Les mainteneurs répondent en général sous 1 jour
-
documentation
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
TomerAberbach/profiler-md#951 ·
Les mainteneurs répondent en général sous 1 jour
-
[Bug] Default key routing (JavaStringHash) picks a different partition than the Java client for about half of keysPeut-être pris @0z5a l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
apache/pulsar-client-go#1575 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
pocoproject/poco#5764 ·
Les mainteneurs répondent en général sous 2 jours
-
bug cpp-core-guidelines low-priority
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
NatronGitHub/openfx-supportext#164 ·
Les mainteneurs répondent en général sous 1 jour