Head-wise token pruning method and electronic device
AssigneeIndustrial Technology Research Institute
InventorsYao-Hua Chen, Yu-Sung Lee, Chih-Tsun Huang
Life of this patent
Estimating the term…
Loading patent…
AssigneeIndustrial Technology Research Institute
InventorsYao-Hua Chen, Yu-Sung Lee, Chih-Tsun Huang
Estimating the term…
The disclosure provides a token pruning method and an electronic device. The method includes: computing a plurality of query matrices and a plurality of key matrices corresponding to a plurality of heads; computing an attention matrix according to the corresponding query matrix and key matrix for each of the heads, wherein the attention matrix corresponds to a plurality of tokens and includes a plurality of attention values; computing an importance corresponding to each of the tokens according to the corresponding attention value, and determining at least one pruned token according to the importance for each of the heads, wherein the pruned token of a first head is different from the pruned token of a second head; and omitting the pruned tokens corresponding to each of the heads in a subsequent computation.
A token pruning method, adapted to an electronic device, the token pruning method comprising:
An electronic device, comprising:
Dependencies are inferred from the claim text.