ChatPaper.aiChatPaper

GQLA : Attention latente par requêtes groupées pour le décodage de grands modèles de langage adaptatif au matériel

GQLA: Group-Query Latent Attention for Hardware-Adaptive Large Language Model Decoding

May 14, 2026
Auteurs: Fanxu Meng
cs.AI

Résumé

L'Attention Latente Multi-tête (MLA), l'attention utilisée dans DeepSeek-V2/V3, compresse conjointement les clés et les valeurs en un latent de faible rang et correspond presque parfaitement à la roofline du H100. Ses poids entraînés, cependant, n'exposent qu'un seul chemin de décodage – une forme MQA absorbée – ce qui lie l'inférence efficace aux ratios bande passante/calcul de classe H100, renonce au parallélisme tensoriel le long de l'axe des têtes, et ne produit aucun gain de prédiction multi-token (MTP) sur les GPU d'inférence grand public tels que le H20 soumis à des restrictions d'exportation. Nous proposons l'Attention Latente par Groupe-Requête (GQLA), une modification minimale de MLA dont les poids entraînés exposent deux chemins de décodage algébriquement équivalents sur les mêmes paramètres : un chemin absorbé MQA identique à celui de MLA, et un chemin GQA avec un cache élargi par groupe. L'exécution sélectionne le chemin qui correspond au matériel cible – sans réentraînement, sans noyaux personnalisés – de sorte qu'un seul ensemble de poids GQLA épingle les rooflines à la fois du H100 (absorbé MQA, s_q=1) et du H20 (GQA + MTP, s_q=2), tout en supportant jusqu'à 8 voies de parallélisme tensoriel sans redondance sur le chemin GQA. Pour éviter un pré-entraînement à partir de zéro, nous étendons TransMLA en TransGQLA, qui convertit un point de contrôle GQA pré-entraîné en un modèle GQLA ; sur LLaMA-3-8B, il compresse le cache KV par token à 28,125 % de la référence GQA sur le chemin absorbé MQA tout en préservant structurellement le trafic de niveau GQA sur le chemin par groupe.
English
Multi-head Latent Attention (MLA), the attention used in DeepSeek-V2/V3, jointly compresses keys and values into a low-rank latent and matches the H100 roofline almost perfectly. Its trained weights, however, expose only one decoding path - an absorbed MQA form - which ties efficient inference to H100-class compute-bandwidth ratios, forfeits tensor parallelism along the head axis, and yields no Multi-Token Prediction (MTP) gain on commodity inference GPUs such as the export-restricted H20. We propose Group-Query Latent Attention (GQLA), a minimal modification of MLA whose trained weights expose two algebraically equivalent decoding paths over the same parameters: an MQA-absorb path identical to MLA's, and a GQA path with a per-group expanded cache. The runtime picks the path that matches the target hardware - no retraining, no custom kernels - so a single set of GQLA weights pins the rooflines of both H100 (MQA-absorb, s_q=1) and H20 (GQA + MTP, s_q=2), while supporting up to 8-way zero-redundancy tensor parallelism on the GQA path. To avoid pretraining from scratch we extend TransMLA into TransGQLA, which converts a pretrained GQA checkpoint into a GQLA model; on LLaMA-3-8B it compresses the per-token KV cache to 28.125% of the GQA baseline on the MQA-absorb path while structurally preserving GQA-level traffic on the per-group path.