Sequence processing method and device
The invention provides a sequence processing method and device, and relates to the field of computers. The sequence processing method comprises the following steps: according to the number of a plurality of computer processing units, dividing a sequence vector to be processed into a plurality of sub...
Gespeichert in:
Hauptverfasser: | , , , , , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention provides a sequence processing method and device, and relates to the field of computers. The sequence processing method comprises the following steps: according to the number of a plurality of computer processing units, dividing a sequence vector to be processed into a plurality of sub-sequence vectors with the same number; the plurality of computer processing units execute the following processing on the plurality of sub-sequence vectors in parallel: the ith computer processing unit obtains the ith sub-sequence vector of the sequence vectors at the attention layer, wherein i is a positive integer; the i-th computer processing unit determines the i-th query vector corresponding to the i-th sub-sequence vector on the attention layer; and the ith computer processing unit performs attention calculation on the attention layer based on the ith query vector to obtain an ith group of attention calculation results output by the attention layer. Therefore, the time complexity of self-attention mechanism |
---|