Data processing method, apparatus, device, and medium

CN122153227APending Publication Date: 2026-06-05广州壁仞智能科技有限公司 +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
广州壁仞智能科技有限公司
Filing Date
2026-02-11
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing FlashAttention algorithms require scaling and hardware adaptation operations when calculating the attention score matrix, which increases the computational load and consumes hardware computing power.

Method used

The scaling operation of the attention score matrix and the hardware adaptation conversion operation are combined into a single multiply-add instruction. The entire attention sequence is then processed in blocks using attention optimization rules, and the computation can be achieved with just one operation instruction.

Benefits of technology

This reduces the computational load of the FlashAttention algorithm, saves hardware computing power, and improves computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122153227A_ABST
    Figure CN122153227A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of artificial intelligence, and provides a data processing method, device and equipment and medium, the data processing method comprises: determining the attention full sequence corresponding to target data based on the embedding tensor corresponding to the target data; based on the attention optimization rule, the attention optimization processing is carried out on the attention full sequence, and the global semantic information of the target data is obtained, and the attention optimization rule is used to merge the first attention score matrix scaling operation and the hardware adaptation conversion operation corresponding to the target data into a multiply-add instruction in the process of carrying out the block processing on the attention full sequence.The present application combines the attention score matrix scaling operation and the hardware adaptation instruction into the multiply-add instruction conforming to the hardware, and when the attention optimization processing is carried out on the attention full sequence, only one operation instruction is needed to realize the calculation, without multiple instructions, thereby reducing the calculation amount of the FlashAttention algorithm and saving the calculation capacity of the hardware.
Need to check novelty before this filing date? Find Prior Art