Tuning generative models using latent-variable inference
TRICE addresses the inefficiencies in processing large datasets and generating accurate step-by-step reasoning for complex tasks by employing chain-of-thought prompting and supervised tuning, resulting in improved model performance and rationale generation for tasks like BIG-Bench Hard and GSM8K.
Patent Information
- Application Number
- GB2024006619
- Authority / Receiving Office
- GB · GB
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-02
- Filing Date
- 2024-05-10
- Publication Date
- 2024-12-18
AI Technical Summary
Current machine learning models face challenges in efficiently processing large datasets and generating accurate, step-by-step reasoning for complex tasks, such as math word problems, due to limitations in fine-tuning strategies and reliance on human-generated rationales.
The proposed solution involves a fine-tuning strategy called TRICE (Tuning Rationales with Independence-Chain Expectation-Maximization) that uses chain-of-thought prompting and supervised tuning to maximize the marginal log-likelihood of correct answers, averaging over all possible rationales, and incorporates a control variate to reduce variance in gradient estimates, allowing for improved model performance on tasks like BIG-Bench Hard and GSM8K datasets.
TRICE significantly improves the accuracy of language models on complex tasks by generating accurate intermediary text tokens and rationales, outperforming existing methods like STaR and direct tuning, and demonstrates robustness in generating valid rationales for a large proportion of training examples.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[0177] Compute resource(s) 31-2 can include one or more processors (central processing units, graphical processing units, tensor processing units, machine-learning accelerators, etc.) connected to one or more memory devices. Compute resource(s) 31-2 can include a dynamic pool of available resources shared with other processes. Compute resource(s) 31-2 can include memory devices large enough to fit an entire model instance in a single memory instance. Compute resource(s) 31-2 can also share model instance(s) across multiple memory' devices (e.g., using data parallelization or tensor parallelization, etc.). This can be done to increase parallelization or to execute a large model using multiple memory devices which individually might not be able to fit the entire model into memory.
[0178] Input request 33 can include data for input(s) 2. Model host 31 can process input request 33 to obtain mput(s) 2. Input(s) 2 can be obtained directly from input request 33 or can be retrieved using input request 33. Input request 33 can be submitted to model host 31 via an API.
[0179] Model host 31 can perform inference over batches of input requests 33 in parallel. For instance, a model instance 31-1 can be configured with an input structure that has a batch dimension. Separate input(s) 2 can be distributed across the batch dimension (e.g,, rows of an array). The separate mput(s) 2 can include completely different contexts. The separate input!s) 2 can be multiple inference steps of the same task. The separate input(s) 2 can be staggered in an input structure, such that any given inference cycle can be operating on different portions of the respective input(s) 2. In this manner, for instance, model host 31 can perform inference on the batch in parallel, such that output(s) 3 can also contain the batch dimension and return the inference results for the batched mput(s) 2 in parallel. In this manner, for instance, batches of input request(s) 33 can be processed in parallel for higher throughput of output payload(s) 34.
[0180] Output payload 34 can include or be based on output(s) 3 from machine-learned model(s) 1. Model host 31 can process output(s) 3 to obtain output payload 34. This can include chaining multiple rounds of inference (e.g., iteratively, recursively, across the same model(s) or different model (s)) to arrive at a final output for a task to be returned in output pay load 34. Output payload 34 can be transmitted to client]s) 32 via an API.
[0181] Online learning interface] s) 36 can facilitate reinforcement learning of machine-learned model(s) 1. Online learning mterface(s) 36 can facilitate reinforcement learning with human feedback (RLHF). Online learning interface] s) 36 can facilitate federated learning of machine-learned model(s) 1.
[0182] Model host 31 can execute machine-learned model(s) 1 to perform inference for various tasks using various types of data. For example, various different input]s) 2 and output(s) 3 can be used for various different tasks. In some implementations, input(s) 2 can be or otherwise represent image data. Machine-learned model(s) 1 can process the image data to generate an output. As an example, machine-learned model(s) 1 can process the image data to generate an image recognition output (e.g., a recognition of the image data, a latent embedding of the image data, an encoded representation of the image data, a hash of the image data, etc.). As another example, machine-learned model(s) 1 can process the image data to generate an image segmentation output. As another example, machine-learned model(s) 1 can process the image data to generate an image classification output. As another example, machine-learned model(s) 1 can process the image data to generate an image data modification output (e.g., an alteration of the image data, etc.). As another example, machine-learned model(s) 1 can process the image data to generate an encoded image data output (e.g., an encoded and / or compressed representation of the image data, etc.). As another example, machine-learned model(s) 1 can process the image data to generate an upscaled image data output. As another example, machine-learned model(s) 1 can process the image data to generate a prediction output.
[0183] In some implementations, the task, is a computer vision task. In some cases, input(s) 2 includes pixel data for one or more images and the task, is an image processing task. For example, the image processing task, can be image classification, where the output is a set of scores, each score corresponding to a different object class and representing the likelihood that the one or more images depict an object belonging to the object class. The image processing task may be object detection, where the image processing output identifies one or more regions in the one or more images and, for each region, a likelihood that region depicts an object of interest. As another example, the image processing task can be image segmentation, where the image processing output defines, for each pixel in the one or more images, a respective likelihood for each category in a predetermined set of categories. For example, the set of categories can be foreground and background. As another example, the set of categories can be object classes. As another example, the image processing task can be depth estimation, where the image processing output defines, for each pixel in the one or more images, a respective depth value. As another example, the image processing task can be motion estimation, where the network input includes multiple images, and the image processing output defines, for each pixel of one of the input images, a motion of the scene depicted at the pixel between the images in the network input.
[0184] In some implementations, input(s) 2 can be or otherwise represent natural language data. Machine-learned model(s) 1 can process the natural language data to generate an output. As an example, machine-learned model(s) 1 can process the natural language data to generate a language encoding output. As another example, machine-learned model(s) 1 can process the natural language data to generate a latent text embedding output. As another example, machine-learned modei(s) 1 can process the natural language data to generate a translation output. As another example, machine-learned model(s) 1 can process the natural language data to generate a classification output. As another example, machine-learned model(s) 1 can process the natural language data to generate a textual segmentation output. As another example, machine-learned model(s) 1 can process the natural language data, to generate a semantic intent, output. As another example, machine-learned model(s) 1 can process the natural language data to generate an upscaled text or natural language output, (e.g., text or natural language data that is higher quality than the input text or natural language, etc.). As another example, machine-learned model(s) 1 can process the natural language data to generate a prediction output, (e.g., one or more predicted next portions of natural language content).
[0185] In some implementations, input(s) 2 can be or otherwise represent speech data (e.g., data describing spoken natural language, such as audio data, textual data, etc. ). Machine-learned model(s) 1 can process the speech data to generate an output. As an example, machine-learned model(s) 1 can process the speech data to generate a speech recognition output. As another example, machine-learned model(s) 1 can process the speech data to generate a speech translation output. As another example, machine-learned model(s) 1 can process the speech data, to generate a latent embedding output. As another example, machine-learned model(s) 1 can process the speech data to generate an encoded speech output (e.g., an encoded and / or compressed representation of the speech data, etc.). As another example, machine-learned model(s) 1 can process the speech data to generate an upscaled speech output (e.g., speech data that is higher quality than the input speech data, etc.). As another example, machine-learned model(s) 1 can process the speech data to generate a textual representation output (e.g., a textual representation of the input speech data, etc.). As another example, machine-learned model(s) 1 can process the speech data to generate a prediction output.
[0186] In some implementations, input(s) 2 can be or otherwise represent latent encoding data (e.g., a latent space representation of an input, etc.). Machine-learned model(s) 1 can process the latent encoding data to generate an output. As an example, machine-learned model(s) 1 can process the latent encoding data to generate a recognition output. As another example, machine-learned model(s) 1 can process the latent encoding data to generate a reconstruction output. As another example, machine-learned model(s) 1 can process the latent encoding data to generate a search output. As another example, machine-learned model(s) 1 can process the latent encoding data to generate a reclustering output. As another example, machine-learned model(s) 1 can process the latent encoding data to generate a prediction output.
[0187] In some implementations, input(s) 2 can be or otherwise represent statistical data. Statistical data can be, represent, or otherwise include data computed and / or calculated from some other data source. Machine-learned model(s) 1 can process the statistical data to generate an output. As an example, machine-learned model(s) 1 can process the statistical data to generate a recognition output. As another example, machine-learned model(s) 1 can process the statistical data to generate a prediction output. As another example, machine-learned model(s) 1 can process the statistical data, to generate a classification output. As another example, machine-learned model(s) 1 can process the statistical data to generate a segmentation output. As another example, machine-learned rnodel(s) 1 can process the statistical data to generate a visualization output. As another example, machine-learned rnodel(s) 1 can process the statistical data to generate a diagnostic output.
[0188] In some implementations, mput(s) 2 can be or otherwise represent sensor data. Machine-learned rnodel(s) 1 can process the sensor data to generate an output. As an example, machine-learned model(s) 1 can process the sensor data to generate a recognition output. As another example, machine-learned model(s) 1 can process the sensor data to generate a prediction output. As another example, machine-learned model(s) 1 can process the sensor data to generate a classification output. As another example, machine-learned model(s) 1 can process the sensor data to generate a segmentation output. As another example, machine-learned model(s) 1 can process the sensor data to generate a visualization output. As another example, machine-learned rnodel(s) 1 can process the sensor data to generate a diagnostic output. As another example, machine-learned model(s) 1 can process the sensor data to generate a detection output.
[0189] In some implementations, machine-learned model(s) I can be configured to perform a task that includes encoding input data for reliable and / or efficient transmission or storage (and / or corresponding decoding). For example, the task may be an audio compression task. The input may include audio data and the output may include compressed audio data. In another example, the input includes visual data (e.g. one or more images or videos), the output comprises compressed visual data, and the task is a visual data compression task. In another example, the task may comprise generating an embedding for input data (e.g. input audio or visual data). In some cases, the input includes audio data representing a spoken utterance and the task is a speech recognition task. The output may comprise a text output which is mapped to the spoken utterance. In some cases, the task comprises encrypting or decrypting input data. In some cases, the task comprises a microprocessor performance task, such as branch prediction or memory address translation,
[0190] In some implementations, the task is a generative task, and machine-learned model(s) 1 can be configured to output content generated in view of input(s) 2. For instance, input(s) 2 can be or otherwise represent data of one or more modalities that encodes context for generating additional content.
[0191] In some implementations, the task can be a text completion task. Machine-learned model(s) 1 can be configured to process input(s) 2 that represent textual data, and to generate output(s) 3 that represent additional textual data that completes a textual sequence that includes input(s) 2. For instance, machine-learned model(s) 1 can be configured to generate output(s) 3 to complete a sentence, paragraph, or portion of text that follows from a portion of text represented by input(s) 2.
[0192] In some implementations, the task can be an instruction following task. Machine-learned model(s) 1 can be configured to process input(s) 2 that represent instructions to perform a function and to generate output(s) 3 that advance a goal of satisfying the instruction function (e.g., at least a step of a multi-step procedure to perform the function). Output(s) 3 can represent data of the same or of a different modality as inputs) 2, For instance, inputs) 2 can represent textual data (e.g., natural language instructions for a task to be performed) and machine-learned rnodel(s) 1 can process mput(s) 2 to generate output(s) 3 that represent textual data responsive to the instructions (e.g., natural language responses, programming language responses, machine language responses, etc.). Input(s) 2 can represent image data (e.g., image-based instructions for a task to be performed, optionally accompanied by textual instructions) and machine-learned model(s) 1 can process input(s) 2 to generate output(s) 3 that represent textual data responsive to the instructions (e.g., natural language responses, programming language responses, machine language responses, etc.). One or more output(s) 3 can be iteratively or recursively generated to sequentially process and accomplish steps toward accomplishing the requested functionality. For instance, an initial output can be executed by an external system or be processed by machine-learned model(s) 1 to complete an initial step of performing a function. Multiple steps can be performed, with a final output being obtained that is responsive to the initial instructions.
[0193] In some implementations, the task can be a question answering task. Machine-learned modei(s) 1 can be configured to process input(s) 2 that represent a question to answer and to generate output(s) 3 that advance a goal of returning an answer to the question (e.g., at least a step of a multi-step procedure to perform the function), Output(s) 3 can represent data of the same or of a different modality7 as mput(s) 2, For instance, input(s) 2 can represent textual data (e.g., natural language instructions for a task to be performed) and machine-learned model(s) 1 can process mput(s) 2 to generate output(s) 3 that represent textual data responsive to the question (e.g., natural language responses, programming language responses, machine language responses, etc.). Input(s) 2 can represent image data (e.g., image-based instructions for a task to be performed, optionally accompanied by textual instructions) and machine-learned rnodel(s) 1 can process input(s) 2 to generate output(s) 3 that, represent, textual data responsive to the question (e.g., natural language responses, programming language responses, machine language responses, etc.). One or more outputs) 3 can be iteratively or recursively generated to sequentially process and accomplish steps toward answering the question. For instance, an initial output can be executed by an external system or be processed by machine-learned model(s) 1 to complete an initial step of obtaining an answer to the question (e.g., querying a database, performing a computation, executing a script, etc.). Multiple steps can be performed, with a final output being obtained that is responsive to the question.
[0194] In some implementations, the task can be an image generation task. Machine-learned model(s) 1 can be configured to process mput(s) 2 that represent context regarding a desired portion of image content. The context can include text data, image data, audio data, etc. Machine-learned model(s) I can be configured to generate output(s) 3 that represent image data that depicts imagery related to the context. For instance, machine-learned model(s) 1 can be configured to generate pixel data of an image. Values for channel(s) associated with the pixels in the pixel data can be selected based on the context (e.g., based on a probability determined based on the context).
[0195] In some implementations, the task can be an audio generation task. Machine-learned model(s) 1 can be configured to process input(s) 2 that represent context regarding a desired portion of audio content. The context can include text data, image data, audio data, etc. Machine-learned model(s) 1 can be configured to generate output(s) 3 that represent audio data related to the context. For instance, machine-learned model(s) 1 can be configured to generate waveform data in the form of an image (e.g., a spectrogram). Values for channel(s) associated with pixels of the image can be selected based on the context. Machine-learned model(s) 1 can be configured to generate waveform data in the form of a sequence of discrete samples of a continuous waveform. Values of the sequence can be selected based on the context (e.g., based on a probability determined based on the context),
[0196] In some implementations, the task can be a data generation task. Machine-learned model(s) 1 can be configured to process mput(s) 2 that, represent context regarding a desired portion of data (e.g., data, from various data domains, such as sensor data, image data, multimodal data, statistical data, etc.). The desired data can be, for instance, synthetic data for training other machine-learned models. The context can include arbitrary data type(s). Machine-learned model(s) 1 can be configured to generate output(s) 3 that represent data that aligns with the desired data. For instance, machine-learned model(s) 1 can be configured to generate data values for populating a dataset. Values for the data object(s) can be selected based on the context (e.g., based on a probability determined based on the context). Example Computing Systems and Devices
[0197] Figure 15 is a block diagram of an example networked computing sy stem that can perform aspects of example implementations of the present disclosure. The system can include a number of computing devices and systems that are communicatively coupled over a network 49. An example computing device 50 is described to provide an example of a computing device that can perform any aspect of the present disclosure (e.g., implementing model host 31, client) s) 32, or both). An example server computing system 60 is described as an example of a server computing system that can perform any aspect of the present disclosure (e.g., implementing model host 31, client(s) 32, or both). Computing device 50 and server computing system)s) 60 can cooperatively interact (e.g., over network 49) to perform any aspect of the present disclosure (e.g., implementing model host 31, client(s) 32, or both). Model development platform system 70 is an example system that can host or serve model development platform(s) 12 for development of machine-learned models. Third-party system(s) 80 are example system(s) with which any of computing device 50, server computing system(s) 60, or model development platform system(s) 70 can interact in the performance of various aspects of the present disclosure (e.g., engaging third-party' tools, accessing third-party databases or other resources, etc.).
[0198] Network 49 can be any type of communications network, such as a local area network (e.g., intranet), wide area network (e.g., Internet), or some combination thereof and can include any number of wired or wireless links. In general, communication over network 49 can be carried via any type of wired or wireless connection, using a wide variety of communication protocols (e.g., TCP / IP, HTTP, SMTP, FTP), encodings or formats (e.g., HTML, XML), or protection schemes (e.g., VPN, secure HTTP, SSL). Network 49 can also be implemented via a system bus. For instance, one or more devices or systems of Figure 15 can be co-located with, contained by, or otherwise integrated into one or more other devices or systems.
[0199] Computing device 50 can be any type of computing device, such as, for example, a personal computing device (e.g., laptop or desktop), a mobile computing device (e.g., smartphone or tablet), a gaming console or controller, a wearable computing device, an embedded computing device, a server computing device, a virtual machine operating on a host device, or any other type of computing device. Computing device 50 can be a client computing device. Computing device 50 can be an end-user computing device. Computing device 50 can be a computing device of a service provided that provides a service to an end user (who may use another computing device to interact with computing device 50).
[0200] Computing device 50 can include one or more processors 51 and a memory 52. Processor(s) 51 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. Memory 52 can include one or more non-transitory computer-readable storage media, such as HBM, RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. Memory 52 can store data 53 and instructions 54 which can be executed by processor(s) 51 to cause computing device 50 to perform operations. The operations can implement any one or multiple features described herein. The operations can implement example methods and techniques described herein. [0201 ] Computing device 50 can also include one or more input components that receive user input. For example, a user input component can be a touch-sensitive component (e.g., a touch-sensitive display screen or a touch pad) that is sensitive to the touch of a user input object (e.g., a finger or a stylus). The touch-sensitive component can serve to implement a virtual keyboard. Other example user input components include a microphone, camera, LIDAR, a physical keyboard or other buttons, or other means by which a user can provide user input.
[0202] Computing device 50 can store or include one or more machine-learned models 55. Machine-learned models 55 can include one or more machine-learned model(s) 1, such as a sequence processing model 4. Machine-learned models 55 can include one or multiple model instance(s) 31-1. Machine-learned model(s) 55 can be received from server computing system(s) 60, model development platform system 70, third party system(s) 80 (e.g., an application distribution platform), or developed locally on computing device 50. Machine-learned model(s) 55 can be loaded into memory 52 and used or otherwise implemented by processor(s) 51. Computing device 50 can implement multiple parallel instances of machine-learned model(s) 55,
[0203] Server computing system(s) 60 can include one or more processors 61 and a memory 62. Processor(s) 61 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. Memory 62 can include one or more non-transitory computer-readable storage media, such as HBM, RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. Memory 62 can store data 63 and instructions 64 which can be executed by processor(s) 61 to cause server computing system(s) 60 to perform operations. The operations can implement any one or multiple features described herein. The operations can implement example methods and techniques described herein.
[0204] In some implementations, server computing system 60 includes or is otherwise implemented by one or multiple server computing devices. In instances in which server computing system 60 includes multiple server computing devices, such server computing devices can operate according to sequential computing architectures, parallel computing architectures, or some combination thereof.
[0205] Server computing system 60 can store or otherwise include one or more machine-learned models 65. Machine-learned model(s) 65 can be the same as or different from machine-learned model(s) 55. Machine-learned models 65 can include one or more machine-learned model(s) 1, such as a sequence processing model 4. Machine-learned models 65 can include one or multiple model mstance(s) 31-1. Machine-learned modei(s) 65 can be received from computing device 50, model development platform system 70, third party system(s) 80, or developed locally on server computing system(s) 60. Machine-learned model(s) 65 can be loaded into memory’ 62 and used or otherwise implemented by processor(s) 61. Server computing system(s) 60 can implement multiple parallel instances of machine-learned model(s) 65.
[0206] In an example configuration, machine-learned models 65 can be included in or otherwise stored and implemented by server computing system 60 to establish a client-server relationship with computing device 50 for serving model inferences. For instance, server computing system(s) 60 can implement model host 31 on behalf of client(s) 32 on computing device 50, For instance, machine-learned models 65 can be implemented by server computing system 60 as a portion of a web service (e.g., remote machine-learned model hosting service, such as an online interface for performing machine-learned model operations over a network on server computing system(s) 60). For instance, server computing system(s) 60 can communicate with computing device 50 over a local intranet or internet connection. For instance, computing device 50 can be a workstation or endpoint in communication with server computing system(s) 60, with implementation of machine-learned models 65 being managed by server computing system(s) 60 to remotely perform inference (e.g., for runtime or training operations), with output(s) returned (e.g., cast, streamed, etc.) to computing device 50. Machine-learned models 65 can work cooperatively or inter operatively with machine-learned models 55 on computing device 50 to perform various tasks.
[0207] Model development platform system(s) 70 can include one or more processors 71 and a memory 72. Processors) 71 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. Memory 72 can include one or more non-transitory computer-readable storage media, such as HBM, RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. Memory 72 can store data 73 and instructions 74 which can be executed by processor(s) 71 to cause model development platform system(s) 70 to perform operations. The operations can implement anyone or multiple features described herein. The operations can implement example methods and techniques described herein. Example operations include the functionality described herein with respect to model development platform 12. This and other functionality can be implemented by developer tool(s) 75. [02081 Third-party system(s) 80 can include one or more processors 81 and a memory 82. Processor(s) 81 can be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and can be one processor or a plurality of processors that are operatively connected. Memory 82 can include one or more non-transitory computer-readable storage media, such as HBM, RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. Memory- 82 can store data 83 and instructions 84 which can be executed by processor(s) 81 to cause third-party- system(s) 80 to perform operations. The operations can implement any one or multiple features described herein. The operations can implement example methods and techniques described herein. Example operations include the functionality described herein with respect to tools and other external resources called when training or performing inference with machine-learned model(s) 1, 4, 16, 20, 55, 65, etc. (e.g., third-party resource(s) 85).
[0209] Figure 15 illustrates one example arrangement of computing systems that can be used to implement the present disclosure. Other computing system configurations can be used as well. For example, in some implementations, one or both of computing system 50 or server computing system(s) 60 can implement all or a portion of the operations of model development platform system 70. For example, computing system 50 or server computing system) s) 60 can implement developer tool(s) 75 (or extensions thereof) to develop, update / tram, or refine machine-learned models 1,4, 16, 20, 55, 65, etc. using one or more techniques described herein with respect to model alignment toolkit 17. In this manner, for instance, computing system 50 or server computing system(s) 60 can develop, update / tram, or refine machine-learned models based on local datasets (e.g., for model personalization / customization, as permitted by user data, preference selections).
[0210] Figure 16 is a block diagram of an example computing device 98 that performs according to example embodiments of the present disclosure. Computing device 98 can be a user computing device or a server computing device (e.g., computing device 50, server computing system(s) 60, etc.). Computing device 98 can implement model host 31. For instance, computing device 98 can include a number of applications (e.g., applications 1 through N). Each application can contain its own machine learning library and machine-learned model(s). For example, each application can include a machine-learned model. Example applications include a text messaging application, an email application, a dictation application, a virtual keyboard application, a browser application, etc. As illustrated in Figure 16, each application can communicate with a number of other components of the computing device, such as, for example, one or more sensors, a context manager, a device state component, or additional components. In some implementations, each application can communicate with each device component using an API (e.g., a public API). In some implementations, the API used by each application is specific to that application.
[0211] Figure 17 is a block diagram of an example computing device 99 that performs according to example embodiments of the present disclosure. Computing device 99 can be the same as or different from computing device 98. Computing device 99 can be a user computing device or a server computing device (e.g., computing device 50, server computing system(s) 60, etc.). Computing device 98 can implement model host 31, For instance, computing device 99 can include a number of applications (e.g., applications 1 through N). Each application can be in communication with a central intelligence layer. Example applications include a text messaging application, an email application, a dictation application, a virtual keyboard application, a browser application, etc. In some implementations, each application can communicate with the central intelligence layer (and model(s) stored therein) using an API (e.g., a common API across all applications).
[0212] The central intelligence layer can include a number of machine-learned models. For example, as illustrated in Figure 17, a respective machine-learned model can be provided for each application and managed by the central intelligence layer. In other implementations, two or more applications can share a single machine-learned model. For example, in some implementations, the central intelligence layer can provide a single model for all of the applications. In some implementations, the central intelligence layer is included within or otherwise implemented by an operating system of computing device 99. [0213 ] The central intelligence layer can communicate with a central device data layer. The central device data layer can be a centralized repository of data for computing device 99. As illustrated in Figure 17, the central device data layer can communicate with a number of other components of the computing device, such as, for example, one or more sensors, a context manager, a device state component, or additional components. In some implementations, the central device data layer can communicate with each device component using an API (e.g., a private API). Example Implementations and Experiments
[0214] Large language models (LLMs) can solve problems more accurately when instructed to work out the answer step by step using a “chain-of-thought” (CoT) prompt. Additionally and / or alternatively, the performance of language models may be improved on a specific task by supervised fine-tuning (e.g., by using gradient ascent on some tunable parameters to maximize the average log-likelihood of correct answers from a labeled training set). Combining chain-of-thought prompting with supervised tuning can include supervision not just of the correct answers, but. also of detailed rationales that lead to those answers. The rationales can be expensive to produce by hand. Therefore, the systems and methods disclosed herein may include a fine-tuning strategy that attempts to maximize the marginal log-likelihood of generating a correct answer using chain-of-thought prompting, approximately averaging over all possible rationales. The systems and methods can sample from the posterior over rationales (and / or intermediary text tokens) conditioned on the correct answer, which may include using a simple Markov-chain Monte Carlo (MCMC) expectation-maximization (EM) process (which may include a self-taught reasoner, mernoized wake-sleep, Markovian score climbing, and / or persistent contrastive divergence). The process can include a control-variate technique that drives the variance of a gradient that estimates to zero as the model improves. The MCMC-EM finetuning technique can improve the model’s accuracy on held-out examples more than STaR or prompt-tuning with or without chain-of-thought.
[0215] For some mathematical, logical, and common-sense reasoning problems, large language models can solve problems more accurately when instructed to work out the answer step by step in a chain of thought or a scratchpad. The chain-of-thought processing can encourage the model to produce a set of intermediary text tokens (e.g., text describing a sequence of reasoning steps that leads to an answer).
[0216] The systems and methods can fine-tune models to generate logical and accurate rationales. Sets of intermediary text tokens can be obtained via crowdsourcing and / or automatically. The sets of intermediary text tokens can then be utilized for supervised and / or unsupervised training. In some implementations, the training can include generating a training dataset by obtaining datasets that include questions and correct answers only, which may be more readily available, and can bootstrap sets of intermediary text tokens during learning. The bootstrapping may include utilization of a self-taught reasoner (STaR) (e.g., the reasoner discussed in Zelikman et al., “Star: Bootstrapping reasoning with reasoning,” arXiv, (Mar. 28, 2022), https: / / arxiv.org / abs / 2203.14465.), which can generate proposed sets of intermediary’ text tokens from an LLM, and can then fine-tune the model on sets of intermediary text tokens that lead to the correct result (e.g., the correct answer).
[0217] The systems and methods can include utilizing one or more probabilistic latent-variable models. The language model (e.g., a large language model) can learn a joint probability distribution over questions, rationales, and answers. The joint distribution can include a marginal distribution of answers given questions, averaging over all possible sets of intermediary text tokens (e.g., all possible rationales) weighted by their probability given the question. The problem of self-training for reasoning can then become one of learning with incomplete data, which can be a core task in probabilistic machine learning.
[0218] In some implementations, computing the marginal distribution can include averaging over a vast set of potential rationales. The systems and methods disclosed herein can include a learning technique (e.g., a technical process, a pipeline, and / or an algorithm) for intermediary' text token generation (e.g., rationale generation), which can be denoted as tuning rationales with independence-chain expectation-maximization (TRICE). Tuning rationales with independence-chain expectation-maximization (TRICE) can include a Markov-chain Monte Carlo (MCMC) expectation-maximization (EM) algorithm combined with a control-variate scheme.
[0219] The TRICE configuration can provide an alternative interpretation of STaR as a kind of biased stochastic expectation-maximization algorithm that underweights difficult examples when its rationalization process fails. Self-consistency can be seen as a Monte Carlo algorithm for computing the most likely answer under the marginal distribution. Compared to selfconsistency, the probabilistic learning approach of TRICE can allow the system to average over sets of intermediary text tokens (e.g., rationales) not only at inference time, but also at training time.
[0220] The chain-of-thought language model may be trained on the GSM8K dataset (Cobbe et al. “Training verifiers to solve math word problems,” arXiv (Oct. 27, 2021), https: / / arxiv.org / abs / 2110.14168.) and / or may utilize the BIG-Bench Hard benchmark (Suzgun et al. “Challenging big-bench tasks and whether chain-of-thought can solve them,” arXiv (Oct. 17, 2022), https: / / arxiv.org / abs / 2210.09261.). Experiments can show that TRICE improves the model’s performance significantly, can outperform models tuned with STaR, direct tuning with or without CoT, and supervised fine-tuning on human-generated rationales.
[0221] Given a training set of N questions x1;N and answers y1:W, the chain-of-thought tuning can optimize a parameter vector 9 to maximize the average marginal log-likelihood of answers given questions: £($) = logP0(yn|*n) = logSz Pe(z\Xn)P(yn\Z-Xu)’ (1) where z is an unobserved latent rationale, pg(z|x) is the probability of obtaining the set of intermediary text tokens z by prompting an LLM with the question x and tunable parameters 0, and pg(y\z, x) is the probability of obtaining the answer y given set of intermediary text tokens z, question x, and parameters 0. The models can have a configuration with the likelihood pg(y\x, z) E {0.,1], where the answer y is a deterministic function of z. For example, the model’s answer can then be y ~ "(cC)” if z ends with the string “The answer is (a).” For the deterministic model, the system can define p(y|z, x) ~ c(z, y) E {0 / 1}. A binary likelihood model may be utilized for question-answering tasks where z is a rationale. A good set of intermediary text tokens may leave no ambiguity about the correct answer. The derivations below may assume a binary likelihood function. The methods may generalize to cases where the relationship between z and y is weaker and therefore p(y\x, z) is more complicated.
[0222] The system can initialize a memory containing a latent set of intermediary text tokens zn for each example pair xn, yn by sampling zn from a hinted guide distribution q(z|xn, yn) that may condition on the correct answer yn as well as the question xn. For example, the guide may prompt an LLM specifically to give a set of intermediary text tokens for the answer. In some cases, sampling from the guide instead of the model p0(z|xn) can increase the chances of generating a correct rationale.
[0223] The system can then proceed to the main optimization loop. Each iteration, the system can sample a minibatch of M questions and answers from the dataset and can retrieve the sets of intermediary text tokens associated with those examples from the memory. The system can then propose new sets of intermediary text tokens z from the current model p8(z |x), and whenever the new set of intermediary text tokens z is correct (i.e., c(z, y) = 1), the system can replace the old set of intermediary text tokens in memory with the new one.
[0224] The system can then compute a gradient estimate. For example, the system can average the gradients Vj?logp(?(zi kiTO) that are obtained from those sets of intermediary text tokens in the updated memory' that are correct (e g., ignore examples where both the proposed set of intermediary’ text tokens and the previous set of intermediary text tokens were wrong).
[0225] In some implementations, the system can reduce the variance of the gradient estimator by incorporating a control variate, as in control variate gradient estimate. The system can first compute leave-one-out estimates of the average probability of accepting a new rationale. For each example m, the system can subtract off a scaled control variate Pnye^°SPe(^m\xim) whose expected value is zero (since it is a score function). If the proposed set of intermediary text tokens zm for example m is correct, then = zm, and the mth gradient contribution can become (1 ■■■■ fim^elogpeQzi \xim) (e.g., the gradient contribution can be scaled down by 1 ■■■■ pm). If zm is incorrect, then the system can adjust the gradient estimate to try to make zm less likely under p0. As the model becomes more accurate (e.g., ft gets closer to 1), the system can give more weight to incorrect sets of intermediary text tokens (when they occur) and less weight to correct rationales.
[0226] Process I: TRICE
[0227] Input: Generative model pg(z, yjx), is-correct function c(z, y), dataset x^, y^, hinted guide distribution q(z\x, y), initial parameters 0, optimizer update function h(0, g, t), minibatch size M, gradient minibatch size L, number of iterations T.
[0228] Output: Tuned parameters 6, sets of intermediary text tokens zVN. (1) for n G 1,,.,, N do (in parallel) (2) Sample zn from q(z\xn,yn). tokens from guide q. (3) end for (4) for t £ 1,.,., T do / 7 Initialize Markov chain states. H Sample “fallback” set of intermediary text / / Main optimization loop. 15) Get next minibatch of M indices iVM into the dataset. (6) for m G 1,..., M do (in parallel) chain states. (7) Sample zm from pe(^x£m). (8) if c(zm,yij (9) Update zim <■■■■ zm. (10) end if (11) Let cm — c(zm, yim). (12) Letc'm = c(zim,yim). tokens is correct. / 7 Take one MCMC step to update Markov / 7 Accept, or reject proposal, / / Whether the proposal is correct. / / Whether the updated set of intermediary text (13) end for (14) Compute g using either basic_gradient_estimate(z, x, c'), control variate gradient estimate^ x, z, c, c!), or subsampled_control_vanate__gradient_estimate(2, x, z, c, c'). (15) Update 0 h(0, g, t). / / Apply gradient update. (16) end for (17) return 0, zVN. (18) procedure basic_gradient_estimatez, x, c' (19) return c^Vglogp^ |xf ). (20) end procedure (21) procedure control variate gradient estimatez, x, z, c, c' (22) for m G 1,..., M do (in parallel) (23) Set = / / Compute leave-one-out. control-variate Lmft-m mf scales. (24) end for (z5) retain 2^^^(^0^8^0(¾^¾^) (26) end procedure (27) procedure subsampled control variate gradient estimates, x, z, c, c! (28) for m G 1,..., M do (in parallel) (29) Set pm = / / Compute leave-one-out control-variate Lm>*m cfmi scales. (30) Set wm = c'm(l — cmpm), / 7 Compute unnormalized weights for subsampling. wM+m ”■ c m(l ~ (31) end for (32) Choose a subset of L indices using systematic resampling with probabilities 1 Wm (33) for £ G 1,..., L do (in parallel) (34) if< M then / / Selected correct set of intermediary text tokens, (35) Let m = j(, z = z^, s = 1. (36) else / / Selected incorrect set of intermediary text tokens. (37) Let m = j( - M, z ~ zm, s ~ —1. (38) end if (39) Compute = sV^logp^z^ ). / / Negate gradient if / th set of intermediary text tokens is incorrect. (40) end for (41) return fa. (42) end procedure
[0229] control_variate_gradient_estimate can be more expensive than basic__gradient_estimate, since the system may compute gradients not only for the sets of intermediary text tokens in memory but also for any incorrect sets of intermediary text tokens the system generates. This may be wasteful, if many of the weights on those gradients (1 ---- p for correct proposals, P for incorrect proposals) are close to zero, because P may be close to zero or one. To reduce this cost, in subsampled_control_variate_gradient_estimate, the system may use systematic resampling to generate a subsample of L question-set of intermediary text tokens pairs, from which the system may obtain an unbiased estimate of the output of control_vanate__gradient__estimate. In some implementations, the system may preferentially sample gradients with higher scalar weights. For example, if p is small, the system may be less likely to sample incorrect sets of intermediary text tokens (winch have weight P), and if / ? is large, the system may be less likely to sample correct proposed sets of intermediary text tokens (which have weight 1 ■■■■ p).
[0230] The variance-reduced stochastic MCMC-EM procedure may be derived as follows.
[0231] The gradient (“true gradient”) of the marginal log-likeiihood logp0(y|x) with respect to 3 can be V0loglz p0Uy|x) = = p0(z|x,y)V0Iogp0(z|x), (2
[0232] For example, the expectation can be with respect to the posterior pg(z\x, y) of the gradient of the conditional log-prior logp$(z|x), since the likelihood p(y\z, x) = c(z, y) may not depend on 3. If the system samples from the posterior over sets of intermediary text tokens z conditioned on the question-answer pair x, y, then the system can compute an unbiased estimate of the gradient of the marginal log-likelihood logp0(y|x). The system can interpret this as “bootstrapping” sets of intermediary text tokens z that are consistent with both the prior on sets of intermediary text tokens Pe(z\x) and the observed answer y.
[0233] The system can include an independence sampler for p^zlx, y).
[0234] The system may not directly sample from p§(zjx, y). The system can then leverage Markov chain Monte Carlo (MCMC) expectation maximization. The system can maintain a memory memorized wake sleep of a single set of intermediary text tokens zn for each questionanswer pair xn, yn, and each iteration, the system may apply a random update to zn that leaves the posterior yn) invariant training. Each MCMC update can bring the zn’s closer in distribution to pe(zn\xni yn)- Updates to 3 may change the posterior p9(zn\xn,yn). In some implementations, the system may update the chains to control the bias of the gradient estimates.
[0235] To update the chains, the system may use a hyperparameter-free independence sampler. Additionally and / or alternatively, the system can update the current state z with a draw' z from a distribution rxy that does not depend on z, and can accept the update with probability a(z|z) = The system may choose rx>y(z) = pg(z|x), which simplifies the acceptance probability to a(z|z) = min Tbe simplification can be 1 if c(z, y) = 1, 0 if c(z, y) = 0 and c(z,y) = 1, and ill-defined (implying rejection) if both c(z, y) = 0 and c(z, y) = 0. In some implementations, the system can accept whenever the proposal z is correct and reject otherwise.
[0236] Independence samplers may be understood as importance samplers that spread the work of generating and evaluating proposals over time. The update may attempt to sample from the posterior by rejection sampling, then falling back on an old sample if that fails. The expected number of iterations between successful updates can be p(y|x)-1, which can include mixing, which may be faster for easier questions x, and may be accelerated as the model improves.
[0237] The system may include a basic gradient estimator. The MCMC / rejection-sampling procedure can approximate the gradient of the marginal log-likelihood. Denoting as z the state of the Markov chain for an example x, y before the update, the system can sample a proposal z from pg(2jx), accept the new state if it is correct (i.e., if c(z, y) = 1), and can compute the gradient of the log-probability of the result: z' = c(z,y)z + (1 - c(z,y))z; g = V0logp0( / |x); E^LgJ#] « [Ve logp0 (z|x)], (3) where EZjg[- |0j denotes an expectation with respect to both the proposal z and the previous state z.
[0238] The estimate may have low bias if the distribution of z! is close to the posterior p(z\x, y), which can be expected to be true if the chain is mixing quickly enough relative to how fast 6 is changing. This may happen if either the probability of getting a correct answer is high, or if 0 is changing slowly due to a small learning rate and / or gradient. If the model’s training-set accuracy may improve with training and the system can use a decaying learning-rate schedule, then as training proceeds both of the factors may work to reduce the bias of the gradient estimate,
[0239] The system may include adding a control variate. The mean of an estimator g may not be affected by subtracting a zero-mean random variable b from mean. If b is positively correlated with g, then g — b may have lower variance than g, and b can be used as a “control variate”. Since, by the score-function identity, EPzi%[ / ?V0logp0(z|x)] = 0 (for any scalar / 3 independent of z), the system can use the proposed samples z to generate control variates for the gradient estimator: = EJE,Wogpe( / |x)]|0] - omiogMn*) ~ 1}
[0240] In some implementations, the value of the estimator may depend on whether or not the system accepts the proposal z: VSlogp0(z» = / (1-^)V0logp0( / |x) ifc = 1, ~ / ?V0logp0(z|x) \V0logp0(z'|x)-^Vglogp0(z|x) ifc = 0, where the shorthand may be denoted as c ~ c(z,y).
[0241] The control variate can drive the variance of the gradient estimator to zero as the model converges to perfect accuracy on the training set. If the system sets ft = n, where re is the probability of a correct answer (i.e., that c = 1), then as n gets large, most of the time c = 1, the system may multiply the gradient estimator by 1 — n (multiplying its variance by a factor of (1 — re)2). If c = 0, then the system may use of both a correct and incorrect set of intermediary text tokens. The weights attached to the updates may not be small, but if incorrect sets of intermediary text tokens are relatively rare then their contribution to the variance of the gradient estimator may be correspondingly small. On the other hand, if the model has not yet learned to frequently generate good sets of intermediary' text tokens for the training examples, then the system may set / 3 closer to 0, since in this case the signal from the incorrect set of intermediary’ text tokens may be less informative. The system can show that the variance of gradient estimators based on incorrect sets of intermediary text tokens may depend strongly on the model’s accuracy n. Moreover, the system may show that choosing p = re can be optimal up to 0((1 — re)2) terms, and that the variance of the resulting estimator may be proportional to 1 — re.
[0242] For each example xm, ym, the system can compute a pm « E[cm] in a way that ensures that pm is independent of Vglogp0(zm|xm). The system may assume that E[cm] « E [On] (e.g., that the per-example acceptance probability’ can be close to the average acceptance probability across the minibatch), and the system can compute the leave-one-out estimate pm = 1 where c’m; = c(zm„y). In some implementations, the system may restrict the estimate to consider only examples for which the system may have a correct set of intermediary' text tokens (e.g., where c'TO = 1), since these may be the only examples that influence the gradient estimate. Leaving out cm and c'm from the estimate may ensure that is independent of zm.
[0243] In some implementations, the system can include gradient subsampling. The system can reduce the cost of the gradient estimator by using systematic resampling to select a subset of rationales. The reduction may not affect the expected value of the estimator as long as the marginal probability of selecting a set of intermediary’ text tokens is proportional to the yaw w corresponding weight wm, and the averaged gradient can be reweighted by
[0244] In some implementations, the systems and methods can include one or more alternatives to the MCMC-EM approach. The alternatives may include variational EM (Bishop, Pattern recognition and machine learning, Springer, 2006.), reweighted wake-sleep (RWS) (Bomschein et al., “Reweighted wake-sleep,” ARXlV (Apr. 16, 2015) https: / / arxiv.org / abs / 1406.2751.), and / or rejection sampling.
[0245] Variational expectation-maximization can be a strategy for training latent-variable models.
[0246] RWS can be an alternative that avoids high-variance score-function gradients. RWS can proceed by sampling M samples zA.M from a guide model q^(z\x, y), assigning the samples weights wm x and updating both the model parameters 6 and the guide parameters (p to maximize the reweighted log-probabilities wmlogp$(z!n|x) and w^ogq^z^x, y). RWS training may lead to degenerate zero-length sets of intermediary text tokens z. Shorter sequences with RWS can get higher weights, and the model and guide may learn to produce shorter and shorter sequences until they consistently produce empty' sets of intermediary text tokens.
[0247] Longer sequences can tend to get lower weights. The system may augment the unnormalized weights as wm = c(y, zm) ~~~~~ = c(y, zm) [f where Tm is the length of zm and £ may be added to address the case where none of the samples are correct. If there is a mismatch between and p(zmt\x, then may be less than one, with rare Ingh-weight exceptions that may ensure that Q 0 1 x»y >zm, ) vIpWLAvkd = i-
[0248] If the exceptions are rare enough to not typically appear in a sample of M sequences z1;M, then the normalized weights w1:M = may assign higher mass to shorter sequences unless those shorter sequences are much less likely to be correct.
[0249] With careful initialization and learning-rate tuning, the system can get RWS to avoid the potential problem of empty sets of intermediary text tokens. In some implementations, the guide q^(z\xs y) can be learned to closely mimic the prior p(z\x~) until the very end of the rationale, and can then paste in the correct answer whether or not the answer had anything to do with the set of intermediary text tokens up to that point. [02501 Quantitatively, denoting by t the index of the token at which the “final answer” section of the set of intermediary text tokens begins, the average KL between q{zvt |x, y) and p(z1:t|x) may be about 0.61 nats, while the conditional KL between q(zQt+1).T\x,y, z1;t) and P^rt+iy.T^’ zi:t) was about 42.5 nats, which may confirm that the guide was not “reasoning backwards” (e.g., copying the correct answer).
[0251] In some implementations, the system can include a rejection-sampling scheme in which the system samples K proposal sets of intermediary text tokens zVK from p(z|x), and may average the gradients from those sets of intermediary text tokens that lead to correct answers. The rejection-sampling scheme may include reducing the minibatch size by a factor of K to keep the per-iteration cost constant compared to TRICE, which in turn may lead to slower convergence.
[0252] In some implementations, the systems and methods can include a self-taught reasoner (e.g., the self-taught reasoner of Zelikman et al. “STaR: Bootstrapping Reasoning With Reasoning,” ARXlV (Mar. 28, 2022), https: / / arxiv.org / abs / 2203.14465.). Three potential differences between TRICE and STaR can include the use of greedy decoding, resampling, and / or set of intermediary text tokens updates. First, STaR can use greedy decoding, which may reduce the diversity of the sets of intermediary text, tokens the system trains on. In some implementations, the greedy decoding can generate correct answers for the wrong reasons.
[0253] A second difference can be that TRICE resamples sets of intermediary text tokens every iteration to reduce the likelihood to overfit to any particular rationale, STaR. may have an inner loop that runs many training iterations on a single set of rationales. For example, STaR may use stale sets of intermediary text tokens to estimate the gradient of the marginal likelihood.
[0254] The approximate policy-gradient algorithm trying may minimize the 0-1 loss [1 -c(z, y)] = 1 — Pe(y|x). The marginal likelihood may be derived from Pg(y|x)V0logp9(y|x). For example, the derivative of the marginal / og-likelihood (which TRICE can aim to maximize) may be weighted by p^Cylx).
[0255] Third, STaR can update the rationales. For example, STaR may replace a rationale from the model p(z\x) with a rationale from a surrogate y). As the model memorizes a set of correct rationales for the training set, STaR may be less likely to fall back on the surrogate, but the replacement strategy may affect early training dynamics.
[0256] The systems and methods can be evaluated on the GSM8K dataset (Cobbe et al. “Training verifiers to solve math word problems,” ARXlV (Oct. 27, 2021), https: / / arxiv.org / abs / 2110.14168.) and the 27 BigBench-Hard (BBH) tasks (Suzgun et al. “Challenging big-bench tasks and whether chain-of-thought can solve them,” arXiv (Oct. 17, 2022), https: / / arxiv.org / abs / 2210.09261.) using the medium-size PaLM 2-M (Anil et al., “PaLM 2 Technical Report,” ARXlV (May 17, 2023), https: / / arxiv.org / abs / 2305.10403.), and / or Transformer-based LLM (Vaswani et al., “Attention Is All You Need,” arXiv (Jun. 12, 2017), https: / / arxiv.org / abs / 1706.03762.). For the BBH experiments, the system may use the Flan instruction-tuned (Chung et al., “Scaling Instruction-Finetuned Language Models,” ARXlV (Oct. 20, 2022), https: / / arxiv.org / abs / 2210.11416.) version of PaLM 2. For GSM8K, the system may use the base PaLM 2 model. All experiments may be run on TPU v4 and v5e chips (Jouppi et al,, “Tpu v4: An optically reconfigurable supercomputer for machine learning with hardware support for embeddings,” In Proceedings of the 50th Annual International Symposium on Computer Architecture, pp. 1-14, 2023.).
[0257] In some implementations, the systems and methods may fine-tune the model weights. Alternatively and / or additionally, the systems and methods may use prompt tuning (Lester et al., “The power of scale for parameter-efficient prompt tuning,” IN PROCEEDINGS OF the 2021 Conference on Empirical Methods in Natural Language Processing, pp. 3045-3059, 2021.), The system may prepend a sequence of embedding vectors 0 (a “soft prompt”) to the embeddings corresponding to the tokenized chain-of-thought prompt used to condition the model. Prompt tuning can achieve similar accuracy gains to full fine-tuning, while using a small fraction of the parameters. The system may initialize the soft prompt with the embedding sequence obtained from a series of three (for BBH) or five (for GSM8K) exemplar chain-of- thought (CoT) prompts, each of the form “Question: <QUESTION>‘nAnswer: Let’s think step by step.‘n<RATIONALE>”. The system may consider two initialization schemes: one where the system uses the standard few-shot CoT prompts that are provided with BBH, and one where the system may attempt to bootstrap a few-shot CoT prompt by sampling random questions from the training set, generating random sets of intermediary text tokens from the base model, and picking three or five examples where the random sets of intermediary text tokens lead to correct answers. The first scheme can be leveraged as a way of fine-tuning a good initial few-shot prompt, but the first scheme may rely on a small amount of detailed CoT supervision, while the second scheme may only rely on label supervision.
[0258] On each BBH task, the experiment may include splitting the examples into 60% tram and 40% test sets. For all but three tasks, the split can be 150 training and '100 test examples. For GSM8K, the experiment may use the standard 7473-example training set and 1319-example test set. The experiment may evaluate CoT models’ accuracy in two ways: first, using greedy (temperature-0) decoding, and second, using “self-consistency” (Wang et al., “Self-Consistency Improves Chain of Thought Reasoning in Language Models,” arXiv (Mar. 21, 2022), https: / / arxiv.Org / abs / 2203.l 1171.). In self-consistency evaluation, the experiments may draw 40 samples and may check whether the most common answer is correct. The evaluation may be a plug-in estimator for the prediction argmaxyp(y|x) that minimizes 0-1 loss under the model.
[0259] The experiment can compare the configurations against four baseline prompt-tuning methods: direct prompt tuning, Col' prompt tuning, rejection sampling, and STaR. All methods may be evaluated against the same validation sets, and may use the same training labels, fewshot prompts (except for direct tuning, which may only use question-answer pairs), and / or initialization strategies as appropriate.
[0260] Table 1 and table 2 can summarize the results. TRICE can be able to learn to generate sets of intermediary text tokens that lead to the correct answer even without humangenerated exemplar rationales. TRICE may outperform a model trained directly on humangenerated sets of intermediary text tokens on GSM8K.
[0261] Initializing the soft prompt with a human-generated 3-shot exemplar questionrationale-answer prompt may improve performance on BBH. Evaluating with self-consistency may improve performance. By the end of training, TRICE can manage to generate at least one valid set of intermediary text tokens for almost all training examples, while STaR fails to generate valid sets of intermediary text tokens for almost 10% of training examples. Prompt-Tuning Strategy Initialization Greedy-Decoding Acc. (%) Self-Consistency Acc. (%) % Valid Rationales STaR Bootstrapped 3-shot Q-R-A 62 62.1 91.6 Rejection Sampling 64.6 65.3 - TRICE without CV 67.8 68 98.7 TRICE with CV 72.8 73.1 98.8 Direct Prompt Timing 3-shot Q-A 70.4 - - TRICE without CV 3-shot Q-R-A 73.4 75.2 98.2 TRICE with CV 76.7 77.6 98.6
[0262] Table 1 can depict average accuracies (columns 3 and 4) and fraction of training examples for which the models can generate correct sets of intermediary text tokens (column 5) across the 27 BIG-Bench Hard (BBH) tasks. All methods but direct prompt tuning in the experiment group use CoT prompting. All trainable prompts in the experiment are initialized with an embedding sequence obtained from a few-shot prompt containing either example question-answer pairs (“Q-A”) or example question-rationale-answer triples (“Q-R-A”). For direct prompt tuning, the Q-A pairs come from the training set. For TRICE, the experiment can use either the three Q-R-A triples provided with BBH (bottom two rows) or bootstrap a set of sets of intermediary text tokens as described in the text. For STaR and rejection sampling, the experiment can evaluate on bootstrapped initializations. Prompt-Tuning Strategy Greedy-Decoding Acc. (%) Self-Consistency Acc. (%) % Valid Rationales STaR 53.5 60.1 80.2 CoT Prompt Tuning 58.6 73.8 - Rejection Sampling 77.9 87 Direct Prompt Tuning 19.4 - - TRICE without CV 72.8 81.5 98.9 TRICE with CV 74,7 82.3 98.8 i RKE with CV (not bootstrapped) ii 7 86.6 98.4
[0263] Table 2 can depict average accuracies (columns 2 and 3) and fraction of training examples for which the experiment can generate correct sets of intermediary text tokens (column 4) on GSM8K. Direct prompt tuning can be initialized with an embedding sequence obtained from a few-shot prompt containing example question-answer pairs (“Q-A”). All remaining prompt-tuning methods of the experiment may be initialized with an embedding sequence obtained from a few-shot prompt containing example question-rationale-answer triples (“Q-R-A”) obtained randomly from the GSM8K training set or bootstrapped as described in the text.
[0264] The systems disclosed herein can include a method for tuning LLMs to be better at solving question-answering tasks using chain-of-thought (Col') prompting. By framing the CoT-prompted LLM as a latent-variable model, the system can be able to derive a principled and effective fine-tuning method. When applied to GSM8K and BIG-Bench Hard (BBH) tasks, the system disclosed herein can outperform three strong baselines: direct prompt-tuning, STaR, and rejection sampling.
[0265] For BBH tasks experiments, the system may run TRICE for 500 steps with batch size M = 32 and may not use subsampling (e.g., compute L = 64 gradients per batch). The system may use the Adam optimizer (e.g,, the optimizer in Kingma et al., “Adam: A Method for Stochastic Optimization,” ARX1V (Dec. 22, 2014), https: / / arxiv.org / abs / 1412.6980.) with an initial learning rate 1.0 and a cosine decay schedule (Loshchilov et al., “ SGDR: Stochastic gradient descent with warm restarts,” In International Conference on Learning Representations (2017), https: / / openreview.net / foram7id~Skq89Scxx.) that may reduce the learning rate by lOx over the first 450 steps. For GSM8K, the experiments may include running TRICE for 5000 steps with a constant learning rate of 1.0, batch size M = 128, and may compute L = 128 gradients per batch.
[0266] For the experiments, the bootstrap reasoning may use an adaptation of the STaR strategy, where the system may perform prompt-tuning rather than fine-tuning on all weights. The method may alternate between updating the memory and retuning the model from scratch on the updated memory in an inner loop. The experiments may apply the procedure for 10 outerloop steps. The system may start with 40 inner-loop optimization steps and may increase the number of inner-loop steps by 20% each outer-loop iteration up to a maximum of 200 steps. If the training loss goes below 0.01, the system may break out of the inner loop. For STaR’s inner-loop optimization, the system may use the same prompt-tuning initialization, Adam hyperparameters as above, but with cosine decay from 1.0 to 0.1 over the course of each inner loop. To update the STaR memory, the experiments may first try generating a set of intermediary text tokens from the prompt-tuned model by greedy decoding, then if that set of intermediary text tokens is incorrect fall back on a rationalization generated by greedy decoding from the same guide model used in TRICE to initialize the MCMC memory, and finally if neither procedure generates a valid set of intermediary text tokens the experiments may omit the example from the memory'.
[0267] For the experiments, the rejection sampling may include reducing mini-batch size by 4 and drawing 4 sets of intermediary text tokens for each example in the mini-batch. The experiments may use the same mini-batch size, train steps, and optimizer as in TRICE for all BBH and GSM8K experiments. In BBH, the system may use the initial learning rate 1.0 as in TRICE. In GSM8K, the experiments may use the learning rate 0,1, because the experiments may achieve better results than learning rate 0.3, and the training procedure may become unstable with learning rate 1.0.
[0268] To do supervised CoT tuning, the experiments may prompt-tune the model to maximize the log-likelihoods of the training sets of intermediary text tokens given questions. The BBH datasets may include very few exemplar rationales. On GSM8K, the experiments may use the same hyperparameters as in TRICE except that we early-stop the algorithm after only 1000 train steps, since the model overfits badly when the system runs longer.
[0269] In the experimental implementation of the direct prompt tuning method, the model may attempt to guess the answer directly without generating a rationale. Prompt-tuning to maximize the log-likelihood of the answers in this setup may be configured to be straightforward, since there may be no latent set of intermediary text tokens to integrate out. The experiments may initialize the soft prompt using 3 examples from the training set and truncate its length to 64. The optimization procedure may be carried out over 150 steps with batch size 16 and the same Adam hyperparameters as above, except that the cosine decay period is set to 150 instead of 450.
[0270] To apply the systems and methods disclosed herein beyond question-answering problems, a nondeterministic likelihood model may be utilized. For example, the desired output y may be a summary of a text x, and z may be a scratchpad or outline. In some implementations, there may be many y’s that are appropriate for a given x and z. From a modeling perspective, p(y\x, z) may have nonzero entropy. As the number of reasonable values that y could take given x increases, the probability of sampling the precise y that was observed may go down at a rate that may be exponential in the size of the output space. [0271 ] The differences in a nondeterministic likelihood configuration can include: (1) the acceptance probability for an independence sampler where the proposals are generated from p(y|z,x) ’ p(y|zX) proposed latents z, the system may update the memory probabilistically, always accepting proposals that make the observed y more likely , but sometimes may accept proposals that make y a little less likely. (2) The control-variate weights can be a function of the acceptance 1 probabilities a. pm — — ~Xm*m
[0272] The value of the control variate in the nondeterministic configuration may be less than the control variate when in the deterministic-likelihood setting.
[0273] In some implementations, the system can include a variance of the fcth element gk of the gradient estimator. To minimize clutter, the system may suppress subscript indices and define g-' = V$felogp(z'|x), g = Vefelogp(z|x), and g = V$fe]ogp(z|x), where z! is the updated rationale, z is the proposed rationale, and z is the previous set of intermediary' text tokens in memory. The gradient can be g! = g if the proposal z is accepted and g' = g if z is rejected. The system may be configured to assume that the previous set of intermediary text tokens z is a piz\x) is a(z\z) = min{l }. For example, instead of deterministically accepting correct sample from p(z|x, y). The shorthands can be defined as g+ ~ y) = 1], g_ = E[tg|c(z,y) = 0], v = VarQg) = Mg2], v+ = Var(g|c(z,y) = 1), = Var(,g|c(z,y) ---- O'). Additionally and / or alternatively, the probability of accepting a proposal can be defined as n = MMa y)]. [02741 The gradient estimator can be g = g’ - Pg; E[g] = g+. (6)
[0275] The variance of g can be MG / ~~ g+- Pg)2] = - 5+)2] + p2E[#2] - 2 / ?E[(g' - g+)g] (7) = v++p2v ---2^^9]. (8)
[0276] In equation 8, E[g] = 0 and g+ can be nonrandom and therefore independent of g. Breaking out the cases where c(z, y) = 0 (so g1 = g) and c(z, y) = 1 (so g' = g), the rightmost expectation can be E^] = 7rE[#2|c(z,y) = 1] + (1 ■■■■ 7T)E[^|c(z,y) = 0] (9) = n(v+ + g2) + ¢1 - n)g+g_. (10)
[0277] The term on the right can be simplified, since 0 = E[#] = ng+ + (1 — n)g_, (1 ■■■■ ^)9+9- ~ -^9+- Plugging the simplification into equation 10, the simplified equation may be e^] = + 9+) -■ ^9+ = ^+- (11)
[0278] The variance of g can simplify to Var(^) = (1 ■■■■ 2pn)v+ + p2v. (12)
[0279] Taking the derivative with respect to P can show that the equation can be minimized when 2(Pv - nv*) = 0; pa = rrM (13)
[0280] Plugging the minimization back into equation 12 can give the optimal variance va: Va = Vj. + Tt2 “ — 2h2 ™ ---- Vj. (1-712 (14)
[0281] v can be expanded by considering the case where c(z,y) - 1 (which happens with probability tc and the case where c(z, y) = 0 (which happens with probability 1 ■■■■ tt): v = EU2] = nv+ + + (1 - + (1 - w)g2 = nv+ - (1 ■■■■ n)g+g_ + (1 -■ - ng+g_ = nv+ + (1 ■■■• - g+g_ = m?+ + (1- 4- g2 (15) = nv+ 4-(1- h)v_ 4- (1 — re)(2 - n)gi 4- 0((1 — n)3) — nv+ + (1- ii)v_ + (1 — 7r)(l + 1 — n\g2 + 0((1 — n)3~) = m>+ + (1 - jt)(v_ + gi) + 0((1 ■■■• zr)2), where in the second line the system can leverage the fact that ng+ — -(1 — and in the 1 1 third-to-last line the system can approximate - with the first-order Taylor approximation - — 2 — n n n + 0((1 — zr)2). Thus, the equation can be rewritten as 7TV4. n ™ ~--------------- v nv*+(1 -n) (v.„ +.g£ )+0 ((1 -n)2 ) ™ H--(v„ 4~ + ^((1 — (16) - ] .... ™~(v_ + g2) + 0((1 - if)2),
[0282] Therefore, the optimal variance va can be ? f 1 2 v+\ v — v+ 1 — zr — \ V / — v+ — n + y^-(v... + g2) + 0((1 — zr)2)) U 0 = (1 - zr)(v+ + v„ + g2) + 0((1 - zr)2)).
[0283] By contrast, plugging the heuristic value of ft — n into equation 12 can give the suboptimal variance vn\ vn — (1 — 2n2')v+ + n2v = (1 -■ 2vr2)v+ + zr2(zrv+ + (1 - zr)(v_ + g2) + 0((1 - n)2 j) -(1- 2h2 + 7t3)v+ + tt2(1 - zr)(v„ + g2) + 0((1 - n)2) = (1 - 7f)(v+ + v_ + g2) + 0((1 - n)2 j, where the system may use the approximation nk — (1 — (1 — n)^ — 1 — / <(1 — it) + 0((1 — n)2) to simplify the zr2 and n3 terms. Thus, va and u1" may be the same up to 0((1 — zz)2), and as the probability n of getting the correct answer increases, the suboptimality of setting p = n may go down faster than the variance does.
[0284] Gradient estimators based solely on incorrect sets of intermediary text tokens may be utilized and may center on the identity 0 — E[tg] — ng+ + (1 — n)g..., (19) which relates the gradient the system may want to estimate (the expected gradient given that the set of intermediary text tokens is correct) to g_ (the expected gradient given that the set of intermediary text tokens is incorrect).
[0285] Equation 19 can imply that g+ = -L^g^ (20)
[0286] The systems and methods may consider the variance of an estimator based on the right hand side of equation 20: .... —g^ — = O- + g.:.) —~r~g~ Jl'" JI — .—-.. q.
[0287] If ti: is small, then the equation can become —r-(v_ + ?r^£) = —7 + O(n i), (22) such that unless the variance v_ of incorrect sets of intermediary text tokens is very low, the variance of this estimator may be O^n"’2), which is very high. By contrast, the variance of a gradient estimator based purely on correct sets of intermediary text tokens may be simply v+. Therefore, unless the gradient variance for incorrect sets of intermediary text tokens is dramatically lower than that for correct rationales, then if ti: is small then incorrect sets of intermediary text tokens may lead to much noisier gradient estimates.
[0288] On the other hand, if 1 -- ti is small, then the equation may be + Tig2} = (1 - + g2.} + 0((1 -- ti)2}, (23) which may go to zero as n approaches 1.
[0289] Equation 20 can imply that, in principle, given unbiased estimates for 1 — n and rr”1, the system may compute gradient updates purely based on sets of intermediary text tokens that^ / 7 to obtain the correct answer. Unbiased estimates of 1 — n may be obtained. The system may rely on the compute 1 — c(z, y). Unbiased estimates of / r”1 may then be obtained.
[0290] The sy stem may compute a biased estimator that ignores the n"'1 term and then correct for the bias: E[-(l - c(z, y)")g] = -(1 - n)g^ - ng+ (24) = g. - ¢1 - u)g+.
[0291] The expected value of the estimator -(1 — c(z, y))g may be too small by a factor of (1 — n)g+. The system can then correct the bias by adding in an unbiased estimator of it that uses g (the gradient for a correct set of intermediary text tokens from memory): E[—(1 - c(z, y))(g - ^)] = g+ -(1- u)g+ + (1- n)g+ = g+. (25)
[0292] The gradient estimator described above may be utilized by TRICE when the sampled set of intermediary text tokens g is incorrect and p — 1. Smaller values of may be interpolated between this estimator and an estimator based purely on correct sets of intermediary text tokens. Additional Disclosure
[0293] The technology discussed herein makes reference to servers, databases, software applications, and other computer-based systems, as well as actions taken and information sent to and from such systems. The inherent flexibility of computer-based systems allows for a great variety of possible configurations, combinations, and divisions of tasks and functionality between and among components. For instance, processes discussed herein can be implemented using a single device or component or multiple devices or components working in combination. Databases and applications can be implemented on a single system or distributed across multiple systems. Distributed components can operate sequentially or in parallel.
[0294] While the present subject matter has been described in detail with respect to various specific example embodiments thereof, each example is provided by way of explanation, not limitation of the disclosure. Those skilled in the art, upon attaining an understanding of the foregoing, can readily produce alterations to, variations of, and equivalents to such embodiments. Accordingly, the subject disclosure does not preclude inclusion of such modifications, variations and / or additions to the present subject matter as would be readily apparent to one of ordinary skill in the art. For instance, features illustrated or described as part of one embodiment can be used with another embodiment to yield a still further embodiment. Thus, it is intended that the present disclosure cover such alterations, variations, and equivalents.
Claims
1. A computing system for model tuning, the system comprising:one or more processors; andone or more non-transitory computer-readable media that collectively store instructions that, when executed by the one or more processors, cause the computing system to perform operations, the operations comprising:obtaining a training dataset, wherein the training dataset comprises a plurality of training examples, wherein a first training example of the plurality of training examples comprises a first input and a respective first set of output tokens associated with the first input;obtaining a stored set of intermediary text tokens associated with the first training example;processing the first input with a machine-learned model to generate a predicted set of intermediary text tokens and a predicted set of output text tokens, wherein the predicted set of output text tokens is determined based at least in part on the predicted set of intermediary text tokens;determining the predicted set of intermediary text tokens and the stored set of intermediary text tokens are associated with a different result; andin response to determining the predicted set of intermediary text tokens and the stored set of intermediary text tokens are associated with a different result, adjusting one or more parameters of the machine-learned model based on a combined gradient of a loss function, wherein the combined gradient is based on a difference between a first gradient associated with the stored set of intermediary text tokens and a second gradient associated with the predicted set of intermediary text tokens.
2. The system of claim 1, wherein adjusting the one or more parameters of the machine-learned model comprises adjusting a probability of the machine-learned model generating an output associated with the stored set of intermediary text tokens.
3. The system of claims 1 or 2, wherein the stored set of intermediary text tokens is included in the training dataset.
4. The system of any preceding claim, wherein the difference between a first gradient associated with the stored set of intermediary text tokens and the second gradient associated with the predicted set of intermediary text tokens comprises a weighted difference, the weighted difference being weighted by a control variate value, and wherein the machine-learned model comprises a latent-variable model.
5. The system of any preceding claim, wherein the training dataset comprises a second training example, wherein the second training example comprises a second input and a second set of output tokens, wherein the second set of output tokens is responsive to the second input, and wherein the operations further comprise:processing the second input with the machine-learned model to generate a second predicted set of intermediary text tokens and a second set of predicted output tokens, wherein the second set of predicted output tokens is determined at least in part on the second predicted set of intermediary text tokens;determining the second set of output tokens and the second set of predicted output tokens are associated with a similar result; andin response to determining the second set of output tokens and the second set of predicted output tokens are associated with a similar result, replacing a stored second set of intermediary text tokens with the second predicted set of intermediary text tokens in a set of intermediary text tokens memory associated with the second input6. The system of any preceding claim, wherein the operations comprise processing the first input with the machine-learned model to generate the stored set of intermediary text tokens.
7. The system of any preceding claim, wherein processing the first input with the machine-learned model to generate the predicted set of intermediary text tokens and the predicted set of output text tokens comprises temperature being set to one.
8. The system of any preceding claim, wherein the stored set of intermediary text tokens comprise a plurality of text strings that are fed back into the machine-learned model to perform a next inference to generate at least one of the next intermediary text token or a plurality of output text tokens, and wherein the stored set of intermediary text tokens is obtained based on a stored set of output tokens for the stored set of intermediary text tokens being determined to be associated with the respective first set of output tokens; andwherein the stored set of output tokens comprises a text string generated by: processing a stored input with the machine-learned model to generate a first stored intermediary text token of the stored set of intermediary text tokens;processing the stored input and the first stored intermediary text token of the stored set of intermediary text tokens with the machine-learned model one or more next intermediary text tokens of the stored set of intermediary text tokens; andprocessing the stored input and the stored set of intermediary text tokens with the generative model to generate the stored set of output tokens.
9. The system of any preceding claim, wherein determining the predicted set of output text tokens and the first set of output text tokens are associated with a different result comprises: determining the predicted set of output text tokens is incorrect.
10. The system of any preceding claim, wherein the first input comprises text data descriptive of an input prompt, and wherein the first set of output tokens set of output text tokens comprises set of output text tokens token data descriptive of an example set of output text tokens for the input prompt.
11. A computer-implemented method for generative model training, the method comprising:obtaining, by a computing system comprising one or more processors, a training dataset, wherein the training dataset comprises a plurality of training examples, wherein a first training example of the plurality of training examples comprises a first input and a respective first set of output tokens associated with the first input;obtaining, by the computing system, a stored set of intermediary text tokens associated with the first training example;processing, by the computing system, the first input with a machine-learned model to generate a predicted set of intermediary text tokens;processing, by the computing system, the predicted set of intermediary text tokens with the machine-learned model to generate a predicted set of output text tokens;determining, by the computing system, the predicted set of output text tokens is associated with an incorrect set of output tokens based on the respective first set of output tokens; andin response to determining the predicted set of output text tokens is associated with an incorrect set of output tokens, adjusting, by the computing system, one or more parameters of the machine-learned model based on a combined gradient of a loss function, wherein the combined gradient is based on a difference between a first gradient associated with the stored set of intermediary text tokens and a second gradient associated with the predicted set of intermediary text tokens.
12. The method of claim 11, wherein processing, by the computing system, the first input with the machine-learned model to generate the predicted set of intermediary text tokens comprises:determining, by the computing system, a plurality of set of intermediary text tokens intermediary text embeddings determined to be associated with the first input;determining, by the computing system, an average set of intermediary text tokens intermediary text embedding for the plurality of set of intermediary text tokens intermediary text embeddings; andgenerating, by the computing system, the predicted set of intermediary text tokens based on the average set of intermediary text tokens intermediary text embedding.
13. The method of any of claims 11 or 12, further comprising:performing, by the computing system, a plurality of training loops with a particular set of training examples of the plurality of training examples;determining, by the computing system, a subset of the particular set of training examples iteratively generate correct results; andperforming, by the computing system, additional training loops with the training dataset without the subset.
14. The method of any of claims 11 to 13, wherein the machine-learned model is trained to determine a joint probability distribution over inputs, output tokens, and intermediary tokens.
15. The method of any of claims 11 to 14, wherein adjusting, by the computing system, the one or more parameters of the machine-learned model comprises determining a parameter adjustment based at least in part on a control variate, wherein the control variate reduces the parameter adjustment as a global accuracy of the machine-learned model increases, wherein the global accuracy is determined based on a probability of generating correct sets of intermediary text tokens on the training set.
16. The method of any of claims 11 to 15, wherein the predicted set of intermediary text tokens comprises a sequence of inferences, and wherein the predicted set of output text tokens comprises a determined result associated with the sequence of inferences.
17. One or more non-transitory computer-readable media that collectively store instructions that, when executed by one or more computing devices, cause the one or more computing devices to perform operations, the operations comprising:obtaining a prompt, wherein the prompt is descriptive of input text data;processing the prompt with a machine-learned model to generate an output, wherein the output comprises a predicted set of output text tokens and a respective predicted set of intermediary text tokens associated with the predicted set of output text tokens, wherein the machine-learned model was trained to generate an output set of intermediary text tokens with an output set of output text tokens by training the machine-learned model on training datasets thatcomprise a plurality of input examples and a plurality of output examples, and wherein training comprises generating the output set of intermediary text tokens and determining whether to store the output set of intermediary text tokens based on comparing the output set of output text tokens to a respective set of output text tokens example for an input example; andproviding the output to a user.
18. The one or more non-transitory computer-readable media of claim 17, wherein processing the prompt with the machine-learned model to generate the output comprises: processing the prompt to determine the respective predicted set of intermediary text tokens; andprocessing the prompt and the respective predicted set of intermediary text tokens to generate the predicted set of output text tokens.
19. The one or more non-transitory computer-readable media of claims 17 or 18, wherein the respective predicted set of intermediary text tokens is determined based on one or more stored text tokens.
20. The one or more non-transitory computer-readable media of any of claims 17 to 19, wherein the prompt and the output comprise natural language text strings.
21. A computer-implemented method, the method comprising:obtaining, by a computing system comprising one or more processors, a triplet training dataset, wherein the triplet training dataset comprises a first triplet training set, wherein the first triplet training set comprises a training input example, a training set of intermediary text tokens, and a training set of output text tokens, wherein the training set of intermediary text tokens comprises data descriptive of a set of intermediary text tokens generated by a first machine-learned model in response to processing the training input example, wherein the first machine-learned model was trained on a first loss function that comprises a combined gradient that is based on a difference between a first gradient associated with a previously stored set of intermediary text tokens and a second gradient associated with a model inference set of intermediary text tokens;processing, by the computing system, the training input example with a second machine-learned model to generate a predicted set of intermediary text tokens and a predicted set of output text tokens;evaluating, by the computing system, a second loss function that evaluates a difference between the predicted set of intermediary text tokens and the training set of intermediary text tokens; andadjusting, by the computing system, one or more parameters of the second machine-learned model based at least in part on the second loss function.
