Key value compression method in self-attention mechanism, large language model and electronic equipment
By performing multiple residual decomposition and cluster compression on the key-value matrix, and combining the query matrix for attention calculation, the limitations of the traditional self-attention mechanism in long-sequence tasks are solved, and efficient long-sequence processing and flexible sequence representation are achieved.
Patent Information
- Application Number
- CN202510344978.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-03-21
AI Technical Summary
The traditional self-attention mechanism based on softmax has limitations in memory capacity and computing efficiency when processing long-sequence tasks, making it difficult to effectively process long-sequence data.
By performing multiple residual decompositions on the key matrix and the value matrix, clustering and compression of the key residual vector and the value residual vector after each decomposition, attention calculation is performed in combination with the query matrix, and all attention calculation results are accumulated to achieve approximate attention output.
Improves the efficiency of Transformer in long-sequence tasks, solves the problem that Linear Transformer cannot use standard Softmax Transformer parameters, and implements a more flexible and robust sequence representation to adapt to various attention mechanisms.