الملخص

تمت ترجمة أجزاء من هذه الصفحة آلياً وقد تحتوي على أخطاء.

Efficient long-context inference is essential for large language models (LLMs), yet it poses a severe computational bottleneck. Hash-based retrieval offers an efficient alternative by encoding queries and keys into binary codes and using Hamming distance for key selection. However, this leads to a critical mismatch between Hamming distance and attention relevance. Query-Key logits depend jointly on directional similarity and feature magnitudes, whereas hash binarization discards magnitude information, causing both false-positive retrieval of low-logit keys and false-negative omission of high-logit keys. To address these failures, we propose Hierarchical Hash Retrieval (HHR), a coarse-to-fine framework that progressively improves retrieval accuracy through Geometry-Aware Key Routing (GKR) and Learned Hash Projection (LHP). GKR learns a head-wise orthogonal transformation to redistribute feature magnitudes and derive more discriminative page-level logit bounds, enabling effective pruning of low-logit keys while preserving important candidates. LHP then learns a head-wise projection space that aligns Hamming distance with the true Query-Key relevance ranking for fine-grained retrieval. By combining GKR and LHP, HHR suppresses false positives and recovers false negatives, substantially improving the fidelity of hash-based sparse attention. Extensive experiments across diverse LLMs and benchmarks demonstrate that HHR achieves superior performance over existing methods. For example, on LongBench, HHR improves the average score by 1.10 points and, at a context length of 128K, achieves up to a 3.30x decoding speedup and a 2.83x end-to-end speedup for Llama-3.1-8B-Instruct. The code is publicly available at https://github.com/lianjunl13-sudo/HHR.

الكلمات المفتاحية

الموضوع

بيانات النشر

المجلة
غير متاح
وصول مفتوح
وصول مفتوح أخضر

اقتبس هذه المقالة

APA 7

Liu, L., Zheng, T., Huang, Y., Yan, W., Qiu, M., Liu, H., Zhu, X., & Zhong, Y. (2026). HHR: الاسترجاع الهرمي بالتجزئة لتوليد فعّال من النماذج اللغوية الكبيرة. https://omanscience.com/ar/articles/hhr-hierarchical-hash-retrieval-for-efficient-llm-generation

MLA 9

Liu, Lianjun, et al. "HHR: الاسترجاع الهرمي بالتجزئة لتوليد فعّال من النماذج اللغوية الكبيرة." https://omanscience.com/ar/articles/hhr-hierarchical-hash-retrieval-for-efficient-llm-generation.

شيكاغو (المؤلف–التاريخ)

Liu, Lianjun, Tiantian Zheng, You Huang, Weiqi Yan, Mingte Qiu, Huazhong Liu, Xiaofeng Zhu, and Yunshan Zhong. 2026. "HHR: الاسترجاع الهرمي بالتجزئة لتوليد فعّال من النماذج اللغوية الكبيرة." https://omanscience.com/ar/articles/hhr-hierarchical-hash-retrieval-for-efficient-llm-generation.

هارفارد

Liu, L., Zheng, T., Huang, Y., Yan, W., Qiu, M., Liu, H., Zhu, X. and Zhong, Y. (2026) 'HHR: الاسترجاع الهرمي بالتجزئة لتوليد فعّال من النماذج اللغوية الكبيرة', Available at: https://omanscience.com/ar/articles/hhr-hierarchical-hash-retrieval-for-efficient-llm-generation.

فانكوفر

Liu L, Zheng T, Huang Y, Yan W, Qiu M, Liu H, et al. HHR: الاسترجاع الهرمي بالتجزئة لتوليد فعّال من النماذج اللغوية الكبيرة. https://omanscience.com/ar/articles/hhr-hierarchical-hash-retrieval-for-efficient-llm-generation

IEEE

L. Liu, T. Zheng, Y. Huang, W. Yan, M. Qiu, H. Liu, X. Zhu, and Y. Zhong, "HHR: الاسترجاع الهرمي بالتجزئة لتوليد فعّال من النماذج اللغوية الكبيرة," https://omanscience.com/ar/articles/hhr-hierarchical-hash-retrieval-for-efficient-llm-generation.