Forcing weights of transformer model layers
Abstract
Embodiments of the present disclosure include systems and methods for forcing weights of transformer model layers when training a transformer model. In some embodiments, input data is received at a first layer included in a transformer model. The input data is processed through the first layer of the transformer model to produce a first output data. The first output data is processed through the first layer of the transformer model to produce a second output data. The first output data is processed through a second layer included in the transformer model to produce a third output data. A difference is calculated between the second output data and the third output data. Weights included in the first layer of the transformer model are adjusted based on the calculated difference.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 6 · Forward citations: 0.
Claims (17 — 3 Independent, 14 Dependent)
- Claim 1Independent Claim
A system comprising: a set of processing units; and a non-transitory machine-readable medium storing instructions that when executed by at least one processing unit in the set of processing units cause the at least one processing unit to: train a transformer model over repeated iterations of training operations, the training operations facilitating a gradual convergence of weights in adjacent layers of a transformer model such that the weights in a pair of the adjacent layers approach identical values without transmitting weights between the adjacent layers, the training operations including: receive, at a first layer included in the transformer model, input data; process the input data through the first layer of the transformer model so that the first layer of the transformer model outputs a first output data; process the first output data through the first layer of the transformer model so that the first layer of the transformer model outputs a second output data; process the first output data through a second layer included in the transformer model so that the second layer of the transformer model outputs a third output data; calculate a difference between the second output data of the first layer and the third output data of the second layer; and adjust first weights included in the first layer of the transformer model based on a summation between gradient data and a difference term, the gradient data being received at the first layer during a backpropagation training step and the difference term quantifying a difference between the second output data generated by the first layer and the third output data generated by the second layer.
- Claim 2Depends on #1
The system of claim 1, wherein the transformer model includes a pipeline of layers, wherein the first layer and the second layer are included in the pipeline of layers.
- Claim 3Depends on #1
The system of claim 1, wherein the gradient data is a first gradient data, wherein adjusting the first weights included in the first layer of the transformer model based on the second output data and the third output data comprises: adding the difference and the first gradient data to form a second gradient data; and using the second gradient data to adjust the first weights included in the first layer of the transformer model.
- Claim 4Depends on #1
The system of claim 1, wherein the instructions further cause the at least one processing unit to: process the third output data through the second layer of the transformer model to produce a fourth output data; process the third output data through a third layer included in the transformer model to produce a fifth output data; calculate a second difference between the fourth output data and the fifth output data; and adjust second weights included in the second layer of the transformer model based on the second difference.
- Claim 5Depends on #4
The system of claim 4, wherein the instructions further cause the at least one processing unit to receive, during a backpropagation operation, second gradient data generated for the third layer of the transformer model, and wherein second weights included in the second layer of the transformer model are adjusted based on the second gradient data.
- Claim 6Depends on #5
The system of claim 5, wherein adjusting the second weights included in the second layer of the transformer model based on the second difference comprises: adding the second difference and the second gradient data to form a third gradient data; and using the third gradient data to adjust the second weights included in the second layer of the transformer model.
- Claim 7Independent Claim
A method comprising: training a transformer model over repeated iterations of training operations that facilitate a gradual convergence of weights in adjacent layers of the transformer model such that the weights in a pair of the adjacent layers approach identical values without transmitting weights between the adjacent layers, the training operations including: receiving, at a first layer included in the transformer model, input data; processing the input data through the first layer of the transformer model so that the first layer of the transformer model outputs a first output data; processing the first output data through the first layer of the transformer model so that the first layer of the transformer model outputs a second output data; processing the first output data through a second layer included in the transformer model so that the second layer of the transformer model outputs a third output data; calculating a difference between the second output data of the first layer and the third output data of the second layer; and adjusting first weights included in the first layer of the transformer model based on a summation between gradient data and a difference term, the gradient data being received at the first layer during a backpropagation training step and the difference term quantifying a difference between the second output data generated by the first layer and the third output data generated by the second layer.
- Claim 8Depends on #7
The method of claim 7, wherein the transformer model includes a pipeline of layers, wherein the first layer and the second layer are included in the pipeline of layers.
- Claim 9Depends on #7
The method of claim 7, wherein the gradient data is a first gradient data, wherein adjusting the first weights included in the first layer of the transformer model based on the second output data and the third output data comprises: adding the difference and the first gradient data to form a second gradient data; and using the second gradient data to adjust the first weights included in the first layer of the transformer model.
- Claim 10Depends on #7
The method of claim 7 further comprising: processing the third output data through the second layer of the transformer model to produce a fourth output data; processing the third output data through a third layer included in the transformer model to produce a fifth output data; calculating a second difference between the fourth output data and the fifth output data; and adjusting second weights included in the second layer of the transformer model based on the second difference.
- Claim 11Depends on #10
The method of claim 10 further comprising receiving, during a backpropagation operation, second gradient data generated for the third layer of the transformer model, wherein adjusting the second weights included in the second layer of the transformer model is further based on the second gradient data.
- Claim 12Depends on #11
The method of claim 11, wherein adjusting the second weights included in the second layer of the transformer model based on the second difference comprises: adding the second difference and the second gradient data to form a third gradient data; and using the third gradient data to adjust the second weights included in the second layer of the transformer model.
- Claim 13Independent Claim
A non-transitory machine-readable medium storing a program executable by at least one processing unit of a computer system, the program comprising sets of instructions for: training a transformer model over repeated iterations of training operations that facilitate a gradual convergence of weights in adjacent layers of a transformer model such that the weights in a pair of the adjacent layers approach identical values without transmitting weights between the adjacent layers, the training operations including: receiving, at a first layer included in the transformer model, input data; processing the input data through the first layer of the transformer model so that the first layer of the transformer model outputs a first output data; processing the first output data through the first layer of the transformer model so that the first layer of the transformer model outputs a second output data; processing the first output data through a second layer included in the transformer model so that the second layer of the transformer model outputs a third output data; calculate a difference between the second output data of the first layer and the third output data of the second layer; and adjusting first weights included in the first layer of the transformer model based on a summation between gradient data and a difference term, the gradient data being received at the first layer during a backpropagation training step and the difference term quantifying a difference between the second output data generated by the first layer and the third output data generated by the second layer.
- Claim 14Depends on #13
The non-transitory machine-readable medium of claim 13, wherein the gradient data is a first gradient data, wherein adjusting the first weights included in the first layer of the transformer model based on the second output data and the third output data comprises: adding the difference and the first gradient data to form a second gradient data; and using the second gradient data to adjust the first weights included in the first layer of the transformer model.
- Claim 15Depends on #13
The non-transitory machine-readable medium of claim 13, wherein the program further comprises sets of instructions for: processing the third output data through the second layer of the transformer model to produce a fourth output data; processing the third output data through a third layer included in the transformer model to produce a fifth output data; calculating a second difference between the fourth output data and the fifth output data; and adjusting second weights included in the second layer of the transformer model based on the second difference.
- Claim 16Depends on #15
The non-transitory machine-readable medium of claim 15, wherein the program further comprises a set of instructions for receiving, during a backpropagation operation, second gradient data generated for the third layer of the transformer model, wherein adjusting the second weights included in the second layer of the transformer model is further based on the second gradient data.
- Claim 17Depends on #16
The non-transitory machine-readable medium of claim 16, wherein adjusting the second weights included in the second layer of the transformer model based on the second difference comprises: adding the second difference and the second gradient data to form a third gradient data; and using the third gradient data to adjust the second weights included in the second layer of the transformer model.
Technical Overview & Description
BACKGROUND The present disclosure relates to a computing system. More particularly, the present disclosure relates to techniques for training a neural network. Natural-language understanding (NLU) is a subfield of natural-language processing (NLP) in artificial intelligence that addresses comprehension by computers of the structure and meaning of human language. NLU enables voice technology, search engines, and machine translation to deduce what a user means, regardless of the way it is expressed A neural network is a machine learning model that underpins NLU applications. A neural network is trained for a particular purpose by running datasets through it, comparing results from the neural network to known results, and updating the network based on the differences. BRIEF DESCRIPTION OF THE DRAWINGS Various embodiments of the present disclosure are illustrated by way of example and not limitation in the figures of the accompanying drawings. FIG. 1 illustrates a system for training a transformer model according to some embodiments. FIG. 2 illustrates an example configuration of transformer layers for forcing weights of transformer layers according to some embodiments. FIG. 3 illustrates another example configuration of transformer layers for forcing weights of transformer layers according to some embodiments. FIG. 4 illustrates a process for forcing weights of transformer model layers according to some embodiments. FIG. 5 depicts a simplified block diagram of an example computer system according to some embodiments. FIG. 6 illustrates a neural network processing system according to some embodiments. DETAILED DESCRIPTION In the following description, for purposes of explanation, numerous examples and specific details are set forth in order to provide a thorough understanding of the present disclosure. Such examples and details are not to be construed as unduly limiting the elements of the claims or the claimed subject matter as a whole. It will be evident to one skille
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (6)
| Patent | Title | Year | Citations |
|---|
Non-Patent Literature (10)
- Dabre, Raj, and Atsushi Fujita.
- “
- Multi-Layer Softmaxing during Training Neural Machine Translation for Flexible Decoding with Fewer Layers.
- ”
- arXiv preprint arXiv:1908.10118 (2019). (Year: 2019).
- Yun, Seongjun, et al.
- “
- Graph transformer networks.
- ”
- Advances in neural information processing systems 32 (2019). (Year: 2019).