Systems and methods for training language models with automatic curriculum
AssigneeSalesforce, Inc.
InventorsAmrita Saha, Caiming Xiong, Doyen Sahoo, Hanze Dong, Zirui Zhao
Life of this patent
Estimating the term…
Abstract
Embodiments described herein provide a method for training a neural network based language model (LM), comprising: receiving a training dataset including pairs of queries and ground-truth responses; performing a training iteration using a reward based on response length with respect to a tunable value when the predicted response refuses to respond to a query; automatically modifying the tunable value; and repeating the training iteration with the modified tunable value.
Claims20
A method for training a neural network based language model (LM), comprising:
- receiving, via a data interface, a training dataset including pairs of queries and ground-truth responses;
- performing a training iteration including:
- generating, via the LM, a predicted response based on a training query from the training dataset,
- computing a reward for the response based on a length of the predicted response when the predicted response refuses to answer the training query, with a positive reward in response to the length being above a tunable value and a negative reward in response to the length being shorter than the tunable value, and
- training the LM based on the training query and the predicted response, the training query being sampled from the training dataset with a sampling frequency determined based on the reward;
- automatically modifying the tunable value;
- repeating the training iteration with the modified tunable value;
- receiving, via a user interface, a user query;
- and
- generating an output response to the user query via the trained LM.
A system for training a neural network based language model (LM), the system comprising:
- a memory that stores the LM and a plurality of processor executable instructions;
- a communication interface that receives a training dataset including pairs of queries and ground-truth responses;
- and
- one or more hardware processors that read and execute the plurality of processor-executable instructions from the memory to perform operations comprising:
- performing a training iteration including:
- generating, via the LM, a predicted response based on a training query from the training dataset,
- computing a reward for the response based on a length of the predicted response when the predicted response refuses to answer the training query, with a positive reward in response to the length being above a tunable value and a negative reward in response to the length being shorter than the tunable value, and
- training the LM based on the training query and the predicted response, the training query being sampled from the training dataset with a sampling frequency determined based on the reward;
- automatically modifying the tunable value;
- repeating the training iteration with the modified tunable value;
- receiving, via a user interface, a user query;
- and
- generating an output response to the user query via the trained LM.
A non-transitory machine-readable medium comprising a plurality of machine-executable instructions which, when executed by one or more processors, are adapted to cause the one or more processors to perform operations comprising:
- receiving, via a data interface, a training dataset including pairs of queries and ground-truth responses;
- performing a training iteration including:
- generating, via a neural network based language model (LM), a predicted response based on a training query from the training dataset,
- computing a reward for the response based on a length of the predicted response when the predicted response refuses to answer the training query, with a positive reward in response to the length being above a tunable value and a negative reward in response to the length being shorter than the tunable value, and
- training the LM based on the training query and the predicted response, the training query being sampled from the training dataset with a sampling frequency determined based on the reward;
- automatically modifying the tunable value;
- repeating the training iteration with the modified tunable value;
- receiving, via a user interface, a user query;
- and
- generating an output response to the user query via the trained LM.
Dependencies are inferred from the claim text.