Systems and methods for a neural network language model
AssigneeSalesforce, Inc.
InventorsShafiq Rayhan Joty, Xuan Phi Nguyen, Yifei Ming, Zixuan Ke
Life of this patent
Estimating the term…
Abstract
Embodiments described herein provide a multi-stage training and/or post-training framework to train and/or finetune a GLLM for domain-specific tasks so as to build an AI agent in a variety of technical applications. Specifically, the training framework comprises a first stage of combined continual pretraining (CPT) and instruction tuning (IT), and a second state of preference training.
Claims20
A method of building an artificial intelligence (AI) agent using a neural network based language model, the method comprising:
- constructing, via a data interface, a first training dataset comprising one or more text samples;
- constructing, via a data interface, a second training dataset comprising one or more instructional samples, at least one instructional sample comprising a question, an answer and an instruction instructing the neural network based language model to perform a specific task resulting in the answer;
- constructing a third training dataset by mixing the first training dataset and a second training dataset using a pre-defined mixture ratio;
- randomly selecting a training sample from the third training dataset;
- generating, by the neural network based language model, a predicted answer to the question conditioned on the instruction when the randomly selected training sample belongs to the second training dataset;
- generating, by the neural network based language model, a reconstructed text in response to a text sample when the randomly selected training sample belongs to the first training dataset;
- jointly training the neural network based language model based on a first loss comparing the predicted answer to the answer, and a second loss comparing the reconstructed text and the text sample over one or more training iterations;
- and
- building the AI agent based on the jointly trained neural network based language model to generate a task response to a user input request.
A system of building an artificial intelligence (AI) agent using a neural network based language model, the system comprising:
- a data interface constructing a first training dataset comprising one or more text samples and a second training dataset comprising one or more instructional samples, at least one instructional sample comprising a question, an answer and an instruction instructing the neural network based language model to perform a specific task resulting in the answer;
- a memory storing a plurality of processor-executable instructions;
- and
- one or more processors executing the plurality of processor-executable instructions to perform operations comprising:
- constructing a third training dataset by mixing the first training dataset and a second training dataset using a pre-defined mixture ratio;
- randomly selecting a training sample from the third training dataset;
- generating, by the neural network based language model, a predicted answer to the question conditioned on the instruction when the randomly selected training sample belongs to the second training dataset;
- generating, by the neural network based language model, a reconstructed text in response to a text sample when the randomly selected training sample belongs to the first training dataset;
- jointly training the neural network based language model based on a first loss comparing the predicted answer to the answer, and a second loss comparing the reconstructed text and the text sample over one or more training iterations;
- and
- building the AI agent based on the jointly trained neural network based language model to generate a task response to a user input request.
A non-transitory processor-readable medium storing a plurality of processor-executable instructions for building an artificial intelligence (AI) agent using a neural network based language model, the instructions executable by one or more processors to perform operations comprising:
- constructing, via a data interface, a first training dataset comprising one or more text samples;
- constructing, via a data interface, a second training dataset comprising one or more instructional samples, at least one instructional sample comprising a question, an answer and an instruction instructing the neural network based language model to perform a specific task resulting in the answer;
- constructing a third training dataset by mixing the first training dataset and a second training dataset using a pre-defined mixture ratio;
- randomly selecting a training sample from the third training dataset;
- generating, by the neural network based language model, a predicted answer to the question conditioned on the instruction when the randomly selected training sample belongs to the second training dataset;
- generating, by the neural network based language model, a reconstructed text in response to a text sample when the randomly selected training sample belongs to the first training dataset;
- jointly training the neural network based language model based on a first loss comparing the predicted answer to the answer, and a second loss comparing the reconstructed text and the text sample over one or more training iterations;
- and
- building the AI agent based on the jointly trained neural network based language model to generate a task response to a user input request.
Dependencies are inferred from the claim text.