WO2025155705A1 - Robust training of neural networks at arbitrary precision and sparsity - Google Patents
Robust training of neural networks at arbitrary precision and sparsityInfo
- Publication number
- WO2025155705A1 WO2025155705A1 PCT/US2025/011848 US2025011848W WO2025155705A1 WO 2025155705 A1 WO2025155705 A1 WO 2025155705A1 US 2025011848 W US2025011848 W US 2025011848W WO 2025155705 A1 WO2025155705 A1 WO 2025155705A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- values
- machine
- training
- learned model
- model
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0495—Quantised networks; Sparse networks; Compressed networks
Definitions
- generating the one or more first training outputs can include scaling, by the computing system, a plurality of respective first values to generate a plurality of respective scaled values, wherein the plurality of respective first values comprises one or more of a plurality of respective parameters of the first machine-learned model and a plurality of respective activation values, and wherein the plurality of respective first values is characterized by a first precision.
- generating the one or more first training outputs can include perturbing, by the computing system based on a second precision that is lower than the first precision, the plurality of respective scaled values to generate a plurality of respective perturbed values.
- the second precision can be less than or equal to four bits.
- the second precision can be less than or equal to two bits.
- the plurality of training iterations can be a plurality of first training iterations.
- the example method can include, for each of a plurality of second training iterations, generating, by the computing system using the first machine-learned model or a second machine-learned model based on the one or more first training inputs or one or more second training inputs, one or more second training outputs.
- the example method can include, for each of the plurality of second training iterations, updating, by the computing system based at least in part on the one or more second training outputs, one or more parameters of the first machine-learned model or the second machine-learned model.
- the example method can include, for each of the plurality of second training iterations, generating, by the computing system after the plurality of second training iterations based on the first machine-learned model or the second machine-learned model, a sparse machine- learned model comprising a plurality of shared-value weights having a shared value and a plurality of other weights having a value other than the shared value.
- a number of weights of the plurality of shared-value weights can be greater than 20 percent of a total number of weights of the sparse machine-learned model.
- generating the one or more second training outputs can include perturbing, by the computing system, a plurality of weights of the first machine-learned model or the second machine- learned model toward a shared value to generate a second plurality of respective perturbed values.
- generating the one or more second training outputs can include performing, by the computing system, a first matrix multiplication based at least in part on the second plurality of respective perturbed values.
- the respective first values can include the plurality of respective parameters of the first machine-learned model.
- generating the one or more first training outputs can include scaling, by the computing system, a plurality of respective second values to generate a second plurality of respective scaled values.
- the plurality of respective second values can include a plurality of respective activation values.
- the plurality of respective second values can be characterized by a third precision.
- generating the one or more first training outputs can include perturbing, by the computing system based on a fourth precision that is lower than the third precision, the second plurality of respective scaled values to generate a second plurality of respective perturbed values.
- the denoising transformation comprises a transformation based at least in part on a first scaling factor associated with the plurality of respective first values and a second scaling factor associated with the plurality of respective first values.
- the second matrix multiplication can correspond to a multiplication of a first matrix comprising the plurality of respective first values and a second matrix comprising the plurality of respective second values.
- the first machine-learned model can correspond to a spiking neural network.
- the plurality of respective first values can include the plurality of respective activation values.
- the second precision can be one bit.
- scaling the plurality of respective first values can include scaling each respective first value based on a minimum value associated with the plurality of respective first values, a maximum value associated with the plurality of respective first values, and a number of bits associated with the second precision.
- the minimum value can include a blockwise minimum value associated with a subset of a plurality of parameters of a layer of the first machine- learned model.
- the maximum value can include a blockwise maximum value associated with the subset of the plurality of parameters of the layer of the first machine-learned model.
- the rounding operation can include rounding to a nearest whole-bit approximation of a respective scaled value in the second precision.
- performing the denoising transformation can include determining a variance associated with the plurality of respective perturbed values.
- the example operations can include, for each of the plurality of training iterations, updating, based at least in part on the one or more first training outputs, one or more parameters of the first machine-learned model.
- generating the one or more first training outputs can include scaling a plurality of respective first values to generate a plurality of respective scaled values.
- the plurality of respective first values can include one or more of a plurality of respective parameters of the first machine-learned model and a plurality of respective activation values.
- the plurality of respective first values can be characterized by a first precision.
- generating the one or more first training outputs can include scaling a plurality of respective first values to generate a plurality of respective scaled values.
- the plurality of respective first values can include one or more of a plurality of respective parameters of the first machine-learned model and a plurality of respective activation values.
- the plurality of respective first values can be characterized by a first precision.
- generating the one or more first training outputs can include perturbing, based on a second precision that is lower than the first precision, the plurality of respective scaled values to generate a plurality of respective perturbed values.
- Figure 8 is a flow chart diagram illustrating an example method for training a quantized machine-learned model according to example implementations of aspects of the present disclosure
- Figure 9 is a flow chart diagram illustrating an example method for training a sparse machine-learned model according to example implementations of aspects of the present disclosure
- Figure 12 is a block diagram of an example sequence processing model according to example implementations of aspects of the present disclosure.
- Figure 14 is a block diagram of an example model development platform according to example implementations of aspects of the present disclosure.
- Figure 18 is a block diagram of an example computing device according to example implementations of aspects of the present disclosure.
- the present disclosure is directed to systems and methods for robust training of neural networks at arbitrary precision and sparsity.
- example implementations of the present disclosure provide another approach that formulates discontinuous operations as the introduction of perturbations.
- Example implementations of the present disclosure can address this challenge directly by mitigating the effects of these perturbations, effectively denoising the signal. Examples of the proposed approach can include three fundamental steps:
- This initial step can apply an affine transform f to an input signal, moving the signal to the desired scale without introducing any additional perturbations or noise (e.g. clipping).
- example implementations of the present disclosure can inject a controlled perturbation 6 into the signal, capturing the exact change introduced by the quantization process.
- quantization can include, for example, scaling one or more higher-precision numerical values to lower-precision values (e.g., from a 32-bit floating point value between 10' 38 and 10 38 to an 8-bit integer between 0 and 255).
- Quantized matrix multiplication can include quantizing the values of one or more matrices; multiplying the quantized matrices; and rescaling (which can include shifting) the multiplied values to reconstruct an approximation of an unquantized matrix multiplication result.
- Denoised quantized matrix multiplication can include denoised reconstruction, wherein noise introduced during the quantizing step is reduced relative to a naive reconstruction.
- a sparse machine-learned model can include a model having a large percentage (e.g., 25 percent, 50 percent, 75 percent, 90 percent, 99 percent, etc.) of same-valued (e.g., mean-valued, zero-valued, etc.) parameters and only a small percentage of different-valued (e.g., non-mean-valued, non-zero- valued, etc.) parameters.
- same-valued e.g., mean-valued, zero-valued, etc.
- different-valued e.g., non-mean-valued, non-zero- valued, etc.
- provided systems and methods can enable the differentiable training of sparsified and quantized machine-learned models at very low precisions, sometimes using off-the-shelf training recipes associated with higher-precision models (e.g., models having 32-bit weights, etc.) and without hand-tuned empirical adjustments for lower-precision training.
- higher-precision models e.g., models having 32-bit weights, etc.
- a spiking neural network can include, for example, a machine-learned model having a temporal component (e.g., recurrent neural network, long short-term memory, transformer, etc.) and a plurality of one-bit quantized activation values.
- Spiking neural networks have attracted significant research interest because of a relationship between spiking neural networks and biological neural networks (e.g., human brains).
- biological neural networks can primarily consist of brief electrical impulses, commonly known as spikes, in their activity patterns.
- researchers have sought to design artificial neural networks that mimic biological neural networks using spiking neural networks.
- a lack of differentiability can make spiking neural networks difficult to optimize by preventing the straightforward application of gradient descent algorithms.
- provided systems and methods can enable the differentiable training of a spiking neural network using standard gradient descent methods, possibly opening up new avenues in the field of spiking neural networks.
- Quantized matrix multiplication can also include, for example, a reconstruction (e.g., denoising reconstruction), in which the respective products can be rescaled to reconstruct an approximation (e.g., denoised approximation) of a matrix multiplication between the first higher-precision matrix and the second higher-precision matrix.
- Denoised quantized matrix multiplication can include a denoising rescaling, wherein noise introduced during quantization due to rounding can be reduced relative to alternative reconstruction methods.
- a scaling factor for denoising reconstruction can be determined based on one or more of a variance of a plurality of quantized values; a covariance between a plurality of quantized values and a plurality of corresponding full-precision values used to generate the quantized values; a regularization parameter; or other parameters.
- an example scaling factor can include
- mapping values 104 to an unsigned integer quantization format can correspond to where x can be one or more values 104 to be transformed (e.g., a matrix of values 104, etc.); (x) can be a transformation 106 operation; x min and x max can be values (e.g., perturbed values 112, etc.) to be represented by a minimum and maximum value, respectively, of an unsigned integer quantization format; bits can be a number of bits of a precision of the unsigned integer quantization format; and e can be a small value (e.g., value significantly less than 1, such as a value near zero, 10' 8 , etc.). Other transformations 106 are possible (e.g., transformations 106 based on a signed binary format, transformations 106 based on a quantized floating-point format, etc.).
- a denoising transformation 114 can include, for example, one or more operations, computer-executable instructions (e.g., operations or instructions to be performed by a denoising quantization system 102, etc.), or hardware, firmware, or software components configured to transform one or more perturbed values 112 into denoised values 116.
- a denoising transformation 114 can include scaling or offsetting a perturbed value 112, such as scaling the perturbed value 112 based on a scaling factor determined according to a ridge regression operation; offsetting the scaled perturbed value 112 based on an offset value determined according to a ridge regression operation; or the like.
- a ridge regression operation can be based at least in part on a regularization factor.
- a denoising transformation 114 can include mapping a plurality of perturbed values 112 to a plurality of corresponding denoised values 116 based at least in part on a regularized reconstruction loss (e.g., regularized L2 reconstruction loss, etc.), such as based on a mapping that reduces (e.g., minimizes, nearly minimizes, reduces compared to an inverse transformation 106 or a reconstruction that minimizes unregularized reconstruction loss, etc.) the regularized reconstruction loss.
- a regularized reconstruction loss e.g., regularized L2 reconstruction loss, etc.
- a regularization loss can include a loss value that penalizes the scaling factor a such as a loss value that is higher for higher values of a.
- a denoised transformation 114 can include scaling a plurality of perturbed values 112 based on a scaling factor a and offset Z>, wherein the values of a and b are determined based at least in part on a regularized loss function such as where N is a number of values 104 of a plurality of values 104 associated with a denoising quantization 102 operation and is a regularization parameter.
- Other regularized reconstruction losses are possible.
- a scaling factor a that can minimize the above regularized reconstruction loss can include where Cov xq can be a covariance between x and q, and Var q can be a variance of q.
- Other regularized reconstruction losses and other denoising transformations 114 are possible.
- a denoising transformation 114 can include scaling a perturbed value 112 based on a first scaling factor that is smaller (e.g., has a smaller absolute value, etc.) than an inverse of a second scaling factor associated with a transformation 106.
- a first scaling factor used to scale a perturbed value 112 during a denoising transformation 114 can be determined based on a regularization factor.
- a regularization factor can include, for example, a value (e.g., constant value, variable value, percentage value, etc.) for determining a first scaling factor that is smaller than an inverse of the second scaling factor associated with the transformation 106, such as a percentage value (e.g., value less than one) to multiply by the inverse of the second scaling factor; a denominator adjustment value to add to a denominator of a ratio for determining the first scaling factor; or other regularization factor.
- a value e.g., constant value, variable value, percentage value, etc.
- systems and methods according to some aspects of the present disclosure increase an approximation error (e.g., average squared difference between value 104 and corresponding denoised value 116 generated from the value 104 according to a denoised quantization 102) associated with reconstructing a reconstructed value from a perturbed value 112 compared to some alternative implementations (e.g., implementations that minimize an unregularized L2 reconstruction error, etc.), but nevertheless improve convergence of machine learning training operations by reducing an impact of perturbation error, thereby improving the functioning of various technological fields, such as computing technology (e.g., machine learning technology, machine-learned model training technology, quantization technology, quantization-aware training technology, etc.).
- computing technology e.g., machine learning technology, machine-learned model training technology, quantization technology, quantization-aware training technology, etc.
- a denoised transformation 114 can be implemented using a plurality of operations that may be readily available in machine learning libraries.
- a value of a regularization parameter can be based in part on a precision of a binary quantization format.
- a maximum perturbation associated with a perturbation 110 operation can be equal to meaning that a perturbation intensity can double with each reduction in bit precision, potentially leading to a substantially amplified impact on the training process at low precision.
- This heightened perturbation can in some instances disrupt a training operation (e.g., cause the training operation to diverge, etc.) at one or more lower precisions, even if the training operation succeeded at higher precision(s).
- systems and methods according to aspects of the present disclosure can adjust to any precision by adjusting a regularization factor associated with a denoising transformation 114.
- a regularization factor can include a regularization factor that causes an influence of one or more perturbations 6 on a scaling factor a to be bounded.
- an impact of one or more perturbations 6 on a scaling factor a can be proportional to
- Var n *1 + and a regularization factor A can include a regularization factor configured to establish an upper bound on K.
- a regularization factor can include a regularization factor configured to cause the equation
- a denoised value 116 can include a higher-precision (e.g., full-precision) denoised reconstruction of a quantization value associated with the perturbed value 112, wherein the denoised value 116 can be represented in a binary format that is the same as a binary format of a corresponding value 104 used to generate the denoised value 116, although this is not required.
- a denoised value 116 can include a denoised transformed value, such as a denoised reconstructed value associated with a binary quantization format.
- one or more denoising transformations 114 can be performed on a blockwise basis, such as based on a covariance or variance associated with a plurality of values 104 and perturbed values 112 associated with a portion of a layer of a machine-learned model.
- a layer of a large machine-learned model having a large number of parameters e.g., billions or trillions of total parameters; thousands, tens of thousands, or more parameters per layer; etc.
- a plurality of blocks such as a plurality of blocks having 32 parameters per block; 128 parameters per block; 512 parameters per block; or other block size.
- each block of perturbed values 112 can be generated based on separate scaling factors, offset values, and the like.
- a denoising transformation 114 for a block of values can be based at least in part on one or more of a block-specific mean of the block of perturbed values 112; a block-specific mean of a block of values 104 used to generate the block of perturbed values 112; a block-specific covariance between the block of perturbed values 112 and the block of values 104 used to generate the block of perturbed values 112; a block-specific variance of the block of perturbed values 112; a regularization parameter, which may be similar to (e.g., same as) or different from a regularization parameter associated with another block (e.g., a common regularization constant
- one or more operations or components of a denoising quantization 102 as depicted in Figure 1 can be adapted, rearranged, expanded, omitted, combined, or modified in various ways without deviating from the scope of the present disclosure.
- a transformation 106 can be omitted (e.g., in connection with a sparsification operation for training a sparse machine-learned model, etc.), and a perturbation 110 and denoising transformation 114 can be performed on one or more values 104.
- Other examples are possible. Further details of an example system for performing denoised perturbation without an initial transformation 106 (e.g., denoising sparsification, etc.) are provided below with respect to Figure 2.
- a denoising perturbation system 202 can be, comprise, be comprised by, or otherwise share one or more properties with a denoising quantization system 102.
- a denoising perturbation system 202 can have any property described herein with respect to a denoising quantization system 102, and vice versa.
- a denoising perturbation system 202 can be or include one or more software, firmware, or hardware components configured to perform one or more denoising perturbation operations, such as operations that may not include an initial transformation 106 (e.g., scaling, etc.).
- a threshold distance e.g., global minimum distance, local or blockwise minimum distance, minimum absolute or unsigned distance, minimum positive distance or signed distance, etc.
- values 104 having a distance from the mean that is less than the distance threshold can be perturbed toward (e.g., to, etc.) the mean.
- a sparsification target can be identified (e.g., percentage sparsification target such as 25 percent sparse, 50 percent sparse, 75 percent, 90 percent sparse, 95 percent sparse, 99 percent sparse, etc.), and values 104 can be perturbed based on the sparsification target.
- a denoising transformation 214 can be, comprise, be comprised by, or otherwise share one or more properties with a denoising transformation 114.
- a denoising transformation 214 can have any property described herein with respect to a denoising transformation 114, and vice versa.
- a denoising transformation 214 can be performed in any manner described above with respect to a denoising transformation 114, such as using ridge regression; based on one or more of a scaling factor, offset value (e.g., scaling factor or offset value determined based on one or more of ridge regression, regularization parameter, variance, covariance, regularized reconstruction loss, or the like), regularization parameter, variance, covariance, regularized reconstruction loss, smooth and noisy reconstruction components, or the like.
- a denoising transformation 214 can be performed using or based on one or more operations (e.g., computer-executable instructions, code, pseudocode, equation, etc.) that are the same as or different from an operation described with respect to a denoising transformation 114; or the like.
- a denoising transformation 214 can correspond to a denoising transformation 114 performed after a transformation 106 based on a scaling factor of 1.0 and an offset value of zero (i.e., an identity transformation 106), and any reference to a transformation 106 or property thereof in relation to a denoising transformation 114 can be applied to a denoising transformation 214 accordingly.
- a regularization parameter associated with a denoising transformation 214 can be the same as or different from a regularization parameter associated with a denoising transformation 114 (e.g., regularization parameter value described above with respect to Figure 1).
- a regularization parameter associated with a denoising transformation 114 e.g., regularization parameter value described above with respect to Figure 1.
- example machine-learned models were sparsified according to a sparsification training process comprising denoising perturbations 202 with regularization parameters as low as zero (e.g., without regularization in some instances), and the training process in some instances converged even with a regularization parameter equal to zero.
- a nonzero regularization parameter can be used to reduce an amount of noise introduced by the perturbation 210, thereby enabling convergence of a training operation in some instances, thereby improving the functioning of a computing system or other technology (e.g., machine learning training technology, sparsification technology, etc.).
- a perturbed value 212 or denoised value 216 can be, comprise, be comprised by, or otherwise share one or more properties with a perturbed value 112 or denoised value 116 respectively.
- a perturbed value 212 can have any property described herein with respect to a perturbed value 112, and vice versa.
- a denoised value 216 can have any property described herein with respect to a denoised value 116, and vice versa.
- Figures 3A and 3B are block diagrams of two example systems for denoised matrix multiplication according to example implementation of aspects of the present disclosure.
- the respective systems of Figures 3 A and 3B can perform the same operation(s) in alternate orders, and can in some instances arrive at equivalent results.
- the system of Figure 3B can be used in combination with quantized matrix multiplication (e.g., using a binary quantization format having reduced precision compared to a binary format of one or more values 104, etc.), which can in some instances reduce a computational cost (e.g., processor usage cost in instances where low-precision multiplications may require reduced processor usage compared to high-precision multiplications, etc.) of matrix multiplication.
- quantized matrix multiplication e.g., using a binary quantization format having reduced precision compared to a binary format of one or more values 104, etc.
- a computational cost e.g., processor usage cost in instances where low-precision multiplications may require reduced processor usage compared to high-precision multiplications
- matrix multiplication 322 can include a matrix multiplication between a first matrix comprising one or more weights of a machine-learned model (e.g., quantized weights generated according to a denoised quantization 102, full-precision weights, etc.) and a second matrix comprising one or more activations of the machine-learned model (e.g., quantized activations generated according to a denoised quantization 102, full-precision activations, etc.).
- a machine-learned model e.g., quantized weights generated according to a denoised quantization 102, full-precision weights, etc.
- a value 304 can be, comprise, be comprised by, or otherwise share one or more properties with a value 104.
- a value 304 can have any property described herein with respect to a value 104, and vice versa.
- values 304 can include unmodified values associated with a machine- learned model, such as full-precision unquantized activations to be multiplied by quantized weights; full-precision unquantized weights to be multiplied by quantized activations; or other unmodified value 304.
- a denoised value 316 can be, comprise, be comprised by, or otherwise share one or more properties with a denoised value 116, 216.
- a denoised value 316 can have any property described herein with respect to a denoised value 116, 216, and vice versa.
- a denoised value 316 can be generated or determined according to any method or using any system described herein with respect to generating or determining a denoised value 116, 216.
- the terms “quantize” and “reconstruct” can refer, for example, to code or pseudocode functions described above with respect to one or more of a transformation 106, perturbation 110, and denoised transformation 114.
- a matrix multiplication between a first matrix W comprising quantized weight values of the form a w q w + b w and a second matrix X comprising quantized activation values of the form a x q x + b x can be written as
- matrix product(s) 324 can include one or more intermediate dot products described above, such as a dot product of a first matrix of quantized activation values (e.g., first matrix comprising quantized activation values of one block in a blockwise implementation, etc.) and a second matrix of quantized weight values (e.g., Q xi • Q o , etc.), and a denoising transformation 314 can include determining a denoised matrix product 326 based on the intermediate dot product(s) or other values (e.g., intermediate result values, perturbed values 312, values 304, etc.), such as in any manner described herein (e.g., according to the equation above, etc.).
- a denoising transformation 314 can include determining a denoised matrix product 326 based on the intermediate dot product(s) or other values (e.g., intermediate result values, perturbed values 312, values 304, etc.), such as in any manner described herein (e.g., according to the equation
- storing scaling factors and offset values a and b as 8-bit floats delivered similar quality results compared to 16-bit floats.
- a block size of 128 can be employed to maintain a storage overhead of less than one bit per quantized value, which can in some instances provide an advantageous trade-off between memory savings and model accuracy.
- Other block sizes can be used (e.g., larger block sizes to increase memory savings, smaller block sizes to improve model accuracy, etc.).
- a precision of one or more quantized activations e.g., 1 -bit precision, 2-bit precision, 4-bit precision, etc.
- quantized first-matrix values can be the same as or different from a precision (e.g., 1 -bit precision, 2-bit precision, 4-bit precision, etc.) of one or more quantized weights or quantized second-matrix values.
- a denoising quantization 402 can be, comprise, be comprised by, or otherwise share one or more properties with a denoising quantization 102.
- a denoising quantization 402 can have any property described herein with respect to a denoising quantization 102, and vice versa.
- Figure 4A depicts the denoising quantization 402 as a component of the quantization-aware training layer 428, the denoising quantization 402 can in some instances be external to the quantization-aware training layer 428 without deviating from the scope of the present disclosure.
- a computing system can determine denoised quantized weights 416 or denoised quantized updates to the denoised quantized weights 416, and the denoised quantized weights 416 can be stored as a component of the quantization-aware training layer 428 without necessarily performing a denoising quantization 402 at each forward pass.
- Other implementations are possible.
- the denoised quantized weights 416 can include values that are stored at a higher precision (e.g., 32-bit precision, 64-bit precision, 8- or 16-bit precision, etc.) than a precision associated with a binary quantization format in which the weights 416, 430 are to be quantized after a training process, such as in a full-precision binary format that is similar to (e.g., same as) a binary format used to store unquantized layer weights 430.
- a higher precision e.g., 32-bit precision, 64-bit precision, 8- or 16-bit precision, etc.
- a precision associated with a binary quantization format in which the weights 416, 430 are to be quantized after a training process such as in a full-precision binary format that is similar to (e.g., same as) a binary format used to store unquantized layer weights 430.
- a quantization-aware training layer 428 can include, for example, a layer of a machine learning model, such as a machine learning model that is to be trained to generate a lower-precision quantized machine-learned model.
- a quantization-aware training layer 428 can include a plurality of denoised quantized weights 416 or quantized weights (e.g., stored as perturbed values 312, etc.) that were generated from a trained (e.g., pretrained, fine-tuned, etc.) machine-learned model having higher-precision layer weights 430 (e.g., full-precision, 32-bit floating-point, etc.) compared to a quantization binary format associated with a quantized machine learning model to be trained according to example aspects of the present disclosure.
- a quantization-aware training layer 428 can include a plurality of denoised quantized weights 416 or quantized weights (e.g., stored as perturbed values 312, etc.) that were generated from a trained
- An activation transformation 434 can include, for example, any transformation for converting a denoised matrix product 426 into a layer output activation 436.
- an activation transformation 434 can include a nonlinear transformation, such as a rectified linear unit (ReLU) activation, a sigmoidal (e.g., logistic, logit, etc.) transformation, or other nonlinear transformation.
- ReLU rectified linear unit
- sigmoidal e.g., logistic, logit, etc.
- a quantization-aware training model 438 can include, for example, a machine learning model for training a quantized machine-learned model.
- a quantization-aware training model 438 can include or be generated based on a trained (e.g., pretrained, fine-tuned, etc.) machine-learned model, such as a higher-precision machine- learned model to be quantized, or can include a model that was untrained (e.g., having randomly initialized parameters, etc.) before the training process of Figure 4B.
- a quantization-aware training model 438 can include a plurality of layers 428, with each layer 428 having or being initialized with (e.g., prior to a quantization-aware training process or quantized training process, etc.) a plurality of layer weights 430 associated with a trained machine-learned model to be quantized, or a plurality of denoised quantized weights 416 generated from weights of a trained machine-learned model to be quantized.
- a quantization-aware training model 438 can include various model architectures, such as various neural network model architectures.
- An example model architecture for a quantization-aware training model 438 can include a sequence processing model architecture (e.g., a transformer model).
- the quantization- aware training model 438 can be configured to receive an input sequence and generate an output sequence.
- the quantization-aware training model 438 can be configured to generate an output sequence where elements of the output sequence are predicted based on the elements of the input sequence.
- a quantization-aware training model 438 can include a model architecture having an attention mechanism (e.g., self-attention).
- the quantization-aware training model 438 can be a pre-trained model (e.g., pretrained using large-scale unsupervised learning).
- the machine-learned model 108 can be fine-tuned over one or more fine-tuning datasets, such as a fine-tuning dataset associated with one or more specialized generation tasks.
- An input 440 can generally include or otherwise represent various types of data.
- An input 440 can include one type or many different types of data.
- Example data types for an training input 210 can include, for example, any data type described below with respect to Figures 11-12 and inputs 2, such as language data (e.g., natural language data such as text or speech data, programming language data, etc.), sequence data (e.g., language sequence, time series, etc.), image data, audio data, video data, or another data type.
- language data e.g., natural language data such as text or speech data, programming language data, etc.
- sequence data e.g., language sequence, time series, etc.
- image data e.g., audio data, video data, or another data type.
- a fully quantized machine-learned model can be generated based on the quantization-aware training model 538.
- a quantized machine-learned model can include a plurality of quantized weights (e.g., generated based on updated weights 416, 430, etc.) stored in a binary quantization format (e.g., 4-bit, 2-bit, or 1 -bit format, etc.), along with one or more scaling factors, offset values, or the like associated with the binary quantization format.
- a binary quantization format e.g., 4-bit, 2-bit, or 1 -bit format, etc.
- a quantized machine-learned model can include a machine-learned model having weights that are quantized according to a blockwise quantization, wherein each block of 32, 128, 512, or another number of weights per block can be quantized according to a block-specific scaling factor, block-specific offset value, or the like.
- FIG. 5 is a block diagram of an example system for quantization-aware training of a machine-learned model based on quantized activations according to example implementation of aspects of the present disclosure.
- a computing system can perform a denoising quantization 502 on or more layer input activation(s) 532 to generate denoised quantized activation(s) 516.
- the denoised quantized activation(s) 516 can be provided to a machine-learned model layer 548 comprising one or more layer weights 530.
- the machine- learned model layer 548 can perform a matrix multiplication 322 on the layer weight(s) 530 and denoised quantized activation(s) 516 to generate one or more denoised matrix products 526.
- the denoised matrix product(s) 526 can be processed with one or more activation functions 434 to generate one or more layer output activations 536.
- a binary format for quantizing one or more weights of a layer 528, 548 can be the same as or different from a binary format for quantizing one or more activations associated with the same layer 528, 548.
- a quantized machine-learned model having quantized weights and quantized activations can be trained in one combined process (e.g., wherein each training layer 528, 548 uses both denoised quantized activations 516 and denoised quantized weights 416, etc.), or in separate processes without deviating from the scope of the present disclosure.
- activation precisions and weight precisions between 1 bit and 4 bits inclusive were tested, including activation precisions that were the same as or different from weight precisions of a same quantized machine-learned model.
- example training processes converged even for 1 -bit activations or 1 -bit weights.
- lower-precision formats were associated with greater savings in computational cost (e.g., memory footprint, memory bandwidth, etc.), while higher-precision formats were associated with somewhat better inference quality (e.g., accuracy, etc.) compared to lower-precision formats.
- FIG. 6 is a block diagram of an example system for sparsificati on-aware training of a machine-learned model according to example implementations of aspects of the present disclosure.
- One or more layer input activations 632 can be provided to a sparsification training layer 650 comprising one or more layer weights 630.
- the sparsification training layer can perform a denoising sparsification 602 on the layer weight(s) to generate one or more denoised sparsified weights 616.
- the sparsification training layer 650 can perform a matrix multiplication 322 on the denoised sparsified weight(s) 616 and the layer input activation(s) 632 to generate one or more denoised matrix products 626.
- the sparsification layer 650 can perform one or more activation function 434 operations on the denoised matrix products 626 to generate one or more layer output activations 636.
- a denoising sparsification 602 can be, comprise, be comprised by, or otherwise share one or more properties with a denoising perturbation 202.
- a denoising sparsification 602 can have any property described herein with respect to a denoising perturbation 202, and vice versa.
- denoised sparsified weights 516 can be represented or stored in a dense format during a training or sparsification process, and can be converted to a sparse format to generate a sparse machine-learned model to complete the training or sparsification process.
- a structured sparsification can be performed, and the resulting values can be stored in a structured sparse format.
- Machine-learned model(s) 1 can be or include one or multiple machine- learned models or model components.
- Example machine-learned models can include neural networks (e.g., deep neural networks).
- Example machine-learned models can include nonlinear models or linear models.
- Example machine-learned models can use other architectures in lieu of or in addition to neural networks.
- Example machine-learned models can include decision tree based models, support vector machines, hidden Markov models, Bayesian networks, linear regression models, k-means clustering models, etc.
- Example neural networks can include feed-forward neural networks, recurrent neural networks (RNNs), including long short-term memory (LSTM) based recurrent neural networks, convolutional neural networks (CNNs), diffusion models, generative-adversarial networks, or other forms of neural networks.
- RNNs recurrent neural networks
- CNNs convolutional neural networks
- Example neural networks can be deep neural networks.
- Some example machine-learned models can leverage an attention mechanism such as self-attention.
- some example machine-learned models can include multiheaded self-attention models.
- Machine-learned model(s) 1 can include a single or multiple instances of the same model configured to operate on data from input(s) 2.
- Machine-learned model(s) 1 can include an ensemble of different models that can cooperatively interact to process data from input(s) 2.
- machine-learned model(s) 1 can employ a mixture-of-experts structure. See, e.g., Zhou et al., Mixture-of-Experts with Expert Choice Routing, ARXIV:2202.09368V2 (Oct. 14, 2022).
- Input(s) 2 can generally include or otherwise represent various types of data. Input(s) 2 can include one type or many different types of data. Output(s) 3 can be data of the same type(s) or of different types of data as compared to input(s) 2. Output(s) 3 can include one type or many different types of data.
- Example data types for input(s) 2 or output(s) 3 include natural language text data, software code data (e.g., source code, object code, machine code, or any other form of computer-readable instructions or programming languages), machine code data (e.g., binary code, assembly code, or other forms of machine-readable instructions that can be executed directly by a computer's central processing unit), assembly code data (e.g., low-level programming languages that use symbolic representations of machine code instructions to program a processing unit), genetic data or other chemical or biochemical data, image data, audio data, audiovisual data, haptic data, biometric data, medical data, financial data, statistical data, geographical data, astronomical data, historical data, sensor data generally (e.g., digital or analog values, such as voltage or other absolute or relative level measurement values from a real or artificial input, such as from an audio sensor, light sensor, displacement sensor, etc.), and the like.
- software code data e.g., source code, object code, machine code, or any other form of computer-readable instructions or programming languages
- Data can be raw or processed and can be in any format or schema.
- example combinations of data types include image data and audio data, image data and natural language data, natural language data and software code data, image data and biometric data, sensor data and medical data, etc. It is to be understood that any combination of data types in an input 2 or an output 3 can be present.
- An example input 2 can include one or multiple data types, such as the example data types noted above.
- An example output 3 can include one or multiple data types, such as the example data types noted above.
- the data type(s) of input 2 can be the same as or different from the data type(s) of output 3. It is to be understood that the example data types noted above are provided for illustrative purposes only. Data types contemplated within the scope of the present disclosure are not limited to those examples noted above.
- Figure 12 is a block diagram of an example implementation of an example machine-learned model configured to process sequences of information.
- an example implementation of machine-learned model(s) 1 can include machine-learned sequence processing model(s) 4.
- An example system can pass input(s) 2 to sequence processing model(s) 4.
- Sequence processing model(s) 4 can include one or more machine- learned components.
- Sequence processing model(s) 4 can process the data from input(s) 2 to obtain an input sequence 5.
- Input sequence 5 can include one or more input elements 5-1, 5- 2, . . . , 5-A , etc. obtained from input(s) 2.
- Sequence processing model 4 can process input sequence 5 using prediction layer(s) 6 to generate an output sequence 7.
- Output sequence 7 can include one or more output elements 7-1, 7-2, . . . , 7 -A, etc. generated based on input sequence 5.
- the system can generate output(s) 3 based on output sequence 7.
- Sequence processing model(s) 4 can include one or multiple machine-learned model components configured to ingest, generate, or otherwise reason over sequences of information.
- some example sequence processing models in the text domain are referred to as “Large Language Models,” or LLMs. See, e.g., PaLM 2 Technical Report, GOOGLE, https://ai.google/static/documents/palm2techreport.pdf (n.d.).
- Other example sequence processing models can operate in other domains, such as image domains, see, e.g., Dosovitskiy et al., An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale, ARXIV:2010.11929v2 (Jun.
- sequence processing model(s) 4 can obtain input sequence 5 using data from input(s) 2.
- input sequence 5 can include a representation of data from input(s) 2 in a format understood by sequence processing model(s) 4.
- One or more machine- learned components of sequence processing model(s) 4 can ingest the data from input(s) 2, parse the data into pieces compatible with the processing architectures of sequence processing model(s) 4 (e.g., via “tokenization”), and project the pieces into an input space associated with prediction layer(s) 6 (e.g., via “embedding”).
- elements 5-1, 5-2, . . . , 5-M can represent tokens obtained using a tokenizer.
- a tokenizer can process a given portion of an input source and output a series of tokens (e.g., corresponding to input elements 5-1, 5-2, . . . , 5-A ) that represent the portion of the input source.
- Various approaches to tokenization can be used.
- textual input source(s) can be tokenized using a byte-pair encoding (BPE) technique.
- BPE byte-pair encoding
- SentencePiece A simple and language independent subword tokenizer and detokenizer for Neural Text Processing, PROCEEDINGS OF THE 2018 CONFERENCE ON EMPIRICAL METHODS IN NATURAL LANGUAGE PROCESSING (System Demonstrations), pages 66-71 (October 31-November 4, 2018), https://aclanthology.org/D18-2012.pdf.
- Image-based input source(s) can be tokenized by extracting and serializing patches from an image.
- Prediction layer(s) 6 can evaluate associations between portions of input sequence 5 and a particular output element. These associations can inform a prediction of the likelihood that a particular output follows the input context. For example, consider the textual snippet, “The carpenter’s toolbox was small and heavy. It was full of .” Example prediction layer(s) 6 can identify that “It” refers back to “toolbox” by determining a relationship between the respective embeddings. Example prediction layer(s) 6 can also link “It” to the attributes of the toolbox, such as “small” and “heavy.” Based on these associations, prediction layer(s) 6 can, for instance, assign a higher probability to the word “nails” than to the word “sawdust.”
- Prediction layer(s) 6 can include other machine-learned model architectures in addition to or in lieu of transformer-based architectures. For example, recurrent neural networks (RNNs) and long short-term memory (LSTM) models can also be used, as well as convolutional neural networks (CNNs). In general, prediction layer(s) 6 can leverage various kinds of artificial neural networks that can understand or generate sequences of information.
- Output sequence 7 can include or otherwise represent the same or different data types as input sequence 5. For instance, input sequence 5 can represent textual data, and output sequence 7 can represent textual data. Input sequence 5 can represent image, audio, or audiovisual data, and output sequence 7 can represent textual data (e.g., describing the image, audio, or audiovisual data). It is to be understood that prediction layer(s) 6, and any other interstitial model components of sequence processing model(s) 4, can be configured to receive a variety of data types in input sequence(s) 5 and output a variety of data types in output sequence(s) 7.
- Output sequence 7 can have various relationships to input sequence 5. Output sequence 7 can be a continuation of input sequence 5. Output sequence 7 can be complementary to input sequence 5. Output sequence 7 can translate, transform, augment, or otherwise modify input sequence 5. Output sequence 7 can answer, evaluate, confirm, or otherwise respond to input sequence 5. Output sequence 7 can implement (or describe instructions for implementing) an instruction provided via input sequence 5.
- Figure 13 is a block diagram of an example technique for populating an example input sequence 8.
- Input sequence 8 can include various functional elements that form part of the model infrastructure, such as an element 8-0 obtained from a task indicator 9 that signals to any model(s) that process input sequence 8 that a particular task is being performed (e.g., to help adapt a performance of the model(s) to that particular task).
- Input sequence 8 can include various data elements from different data modalities.
- an input modality 10-1 can include one modality of data.
- Input sequence 8 can be the same as or different from input sequence 5.
- Input sequence 8 can be a multimodal input sequence that contains elements that represent data from different modalities using a common dimensional representation.
- an embedding space can have P dimensions.
- Input sequence 8 can be configured to contain a plurality of elements that have / J dimensions. In this manner, for instance, example implementations can facilitate information extraction and reasoning across diverse data modalities by projecting data into elements in the same embedding space for comparison, combination, or other computations therebetween.
- elements 8-0, . . . , 8-9 can indicate particular locations within a multidimensional embedding space. Some elements can map to a set of discrete locations in the embedding space. For instance, elements that correspond to discrete members of a predetermined vocabulary of tokens can map to discrete locations in the embedding space that are associated with those tokens. Other elements can be continuously distributed across the embedding space. For instance, some data types can be broken down into continuously defined portions (e.g., image patches) that can be described using continuously distributed locations within the embedding space.
- the expressive power of the embedding space may not be limited to meanings associated with any particular set of tokens or other building blocks.
- a continuous embedding space can encode a spectrum of high-order information.
- An individual piece of information e.g., a token
- An individual piece of information can map to a particular point in that space: for instance, a token for the word “dog” can be projected to an embedded value that points to a particular location in the embedding space associated with canine-related information.
- an image patch of an image of a dog on grass can also be projected into the embedding space.
- Data-to-sequence models 11-1, 11-2, and 11-3 can form part of machine- learned sequence processing model(s) 4.
- Data-to-sequence models 11-1, 11-2, and 11-3 can be jointly trained with or trained independently from machine-learned sequence processing model(s) 4.
- Data-to-sequence models 11-1, 11-2, and 11-3 can be trained end-to-end with machine-learned sequence processing model(s) 4.
- Model development platform 12 can provide one or more model libraries 13 containing building blocks for new models.
- Model libraries 13 can include one or more pretrained foundational models 13-1, which can provide a backbone of processing power across various tasks.
- Model libraries 13 can include one or more pre-trained expert models 13-2, which can be focused on performance in particular domains of expertise.
- Model libraries 13 can include various model primitives 13-3, which can provide low-level architectures or components (optionally pre-trained), which can be assembled in various arrangements as desired.
- Fine-tuning pipelines 17-3 can include a machine-learned model training workflow configured to refine the model parameters of development model 16 with higher- quality data.
- Fine-tuning pipelines 17-3 can update development model 16 by conducting supervised training with labeled dataset(s) in dataset(s) 17-1.
- Fine-tuning pipelines 17-3 can update development model 16 by conducting reinforcement learning using reward signals from user feedback signals.
- Workbench 15 can implement a fine-tuning pipeline 17-3 to finetune development model 16.
- Prompt libraries 17-4 can include sets of inputs configured to induce behavior aligned with desired performance criteria.
- Prompt libraries 17-4 can include few-shot prompts (e.g., inputs providing examples of desired model outputs for prepending to a desired runtime query), chain-of-thought prompts (e.g., inputs providing step-by-step reasoning within the exemplars to facilitate thorough reasoning by the model), and the like.
- Prompt libraries 17-4 can include pipelines for prompt generation.
- inputs can be generated using development model 16 itself or other machine- learned models.
- a first model can process information about a task and output a input for a second model to process in order to perform a step of the task.
- the second model can be the same as or different from the first model.
- Workbench 15 can implement prompt generation pipelines in development model 16.
- Model development platform 12 can include a model plugin toolkit 18.
- Model plugin toolkit 18 can include a variety of tools configured for augmenting the functionality of a machine-learned model by integrating the machine-learned model with other systems, devices, and software components.
- a machine-learned model can use tools to increase performance quality where appropriate.
- deterministic tasks can be offloaded to dedicated tools in lieu of probabilistically performing the task with an increased risk of error.
- a machine-learned model can recognize a tool to call for obtaining the solution and pass the system of equations to the appropriate tool.
- the tool can be a traditional system of equations solver that can operate deterministically to resolve the system of equations.
- Model plugin toolkit 18 can include validation tools 18-1.
- Validation tools 18- 1 can include tools that can parse and confirm output(s) of a machine-learned model.
- Model plugin toolkit 18 can include interfaces for calling external application programming interfaces (APIs) 18-3. For instance, in addition to or in lieu of implementing tool calls or tool code directly with development model 16, development model 16 can be aligned to output instructions that initiate API calls to send or obtain data via external systems.
- APIs application programming interfaces
- Model development platform 12 can include a computational optimization toolkit 19 for optimizing a computational performance of development model 16.
- tools for model compression 19-1 can allow development model 16 to be reduced in size while maintaining a desired level of performance.
- model compression 19-1 can include quantization workflows, weight pruning and sparsification techniques, etc.
- Tools for hardware acceleration 19-2 can facilitate the configuration of the model storage and execution formats to operate optimally on different hardware resources.
- hardware acceleration 19-2 can include tools for optimally sharding models for distributed processing over multiple processing units for increased bandwidth, lower unified memory requirements, etc.
- Tools for distillation 19-3 can provide for the training of lighter-weight models based on the knowledge encoded in development model 16.
- development model 16 can be a highly performant, large machine-learned model optimized using model development platform 12.
- a smaller model can be a “student model” that learns to imitate development model 16 as a “teacher model.” In this manner, for instance, the investment in learning the parameters and configurations of development model 16 can be efficiently transferred to a smaller model for more efficient inference.
- Figure 15 is a block diagram of an example training flow for training a machine-learned development model 16.
- One or more portion(s) of the example training flow can be implemented by a computing system that includes one or more computing devices such as, for example, computing systems described with reference to the other figures. Each respective portion of the example training flow can be performed by any (or any combination) of one or more computing devices.
- one or more portion(s) of the example training flow can be implemented on the hardware components of the device(s) described herein, for example, to train one or more systems or models.
- FIG. 15 depicts elements performed in a particular order for purposes of illustration and discussion.
- development model 16 can persist in an initial state as an initialized model 21.
- Development model 16 can be initialized with weight values.
- Initial weight values can be random or based on an initialization schema.
- Initial weight values can be based on prior pre-training for the same or for a different model.
- Figure 16 is a block diagram of an inference system for operating one or more machine-learned model(s) 1 to perform inference (e.g., for training, for deployment, etc.).
- a model host 31 can receive machine-learned model(s) 1.
- Model host 31 can host one or more model instance(s) 31-1, which can be one or multiple instances of one or multiple models.
- Model host 31 can host model instance(s) 31-1 using available compute resources 31-2 associated with model host 31.
- runtime data source(s) 37 can include a knowledge graph 37-1 that facilitates structured information retrieval for information associated with input request(s) 33 (e.g., a search engine service).
- Runtime data source(s) 37 can include public or private, external or local database(s) 37-2 that can store information associated with input request(s) 33 for augmenting input(s) 2.
- Runtime data source(s) 37 can include account data 37-3 which can be retrieved in association with a user account corresponding to a client 32 for customizing the behavior of model host 31 accordingly.
- Model host 31 can be implemented by one or multiple computing devices or systems.
- Client(s) 2 can be implemented by one or multiple computing devices or systems, which can include computing devices or systems shared with model host 31.
- model host 31 can operate on a same device or system as client(s) 32.
- Model host 31 can be a machine-learning service that runs on-device to provide machine-learning functionality to one or multiple applications operating on a client device, which can include an application implementing client(s) 32.
- Model host 31 can be a part of a same application as client(s) 32.
- model host 31 can be a subroutine or method implemented by one part of an application, and client(s) 32 can be another subroutine or method that engages model host 31 to perform inference functions within the application. It is to be understood that model host 31 and client(s) 32 can have various different configurations.
- Model host 31 can perform inference over batches of input requests 33 in parallel.
- 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 input(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.
- 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 input(s) 2 in parallel.
- batches of input request(s) 33 can be processed in parallel for higher throughput of output payload(s) 34.
- Online learning interface(s) 36 can facilitate reinforcement learning of machine-learned model(s) 1. Online learning interface(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.
- Model host 31 can execute machine-learned model(s) 1 to perform inference for various tasks using various types of data.
- various different input(s) 2 and output(s) 3 can be used for various different tasks.
- input(s) 2 can be or otherwise represent image data.
- Machine-learned model(s) 1 can process the image data to generate an output.
- 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.).
- 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.
- machine-learned model(s) 1 can process the image data to generate an image segmentation output.
- machine-learned model(s) 1 can process the image data to generate an image classification output.
- 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.).
- 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.).
- machine-learned model(s) 1 can process the image data to generate an upscaled image data output.
- machine-learned model(s) 1 can process the image data to generate a prediction output.
- machine-learned model(s) 1 can process the natural language data to generate a semantic intent output.
- 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.).
- 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).
- 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.
- machine- learned model(s) 1 can process the latent encoding data to generate a recognition output.
- machine-learned model(s) 1 can process the latent encoding data to generate a reconstruction output.
- machine-learned model(s) 1 can process the latent encoding data to generate a search output.
- machine- learned model(s) 1 can process the latent encoding data to generate a reclustering output.
- machine-learned model(s) 1 can process the latent encoding data to generate a prediction output.
- 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.
- machine-learned model(s) 1 can process the statistical data to generate a recognition output.
- machine-learned model(s) 1 can process the statistical data to generate a prediction output.
- machine- learned model(s) 1 can process the statistical data to generate a classification output.
- machine-learned model(s) 1 can process the statistical data to generate a segmentation output.
- machine-learned model(s) 1 can process the statistical data to generate a visualization output.
- machine-learned model(s) 1 can process the statistical data to generate a diagnostic output.
- the task is a generative task
- machine-learned model(s) 1 can be configured to output content generated in view of input(s) 2.
- input(s) 2 can be or otherwise represent data of one or more modalities that encodes context for generating additional content.
- 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.
- the task can be a question answering task.
- Machine- learned model(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 modality as input(s) 2.
- the task can be a data generation task.
- Machine- learned model(s) 1 can be configured to process input(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.
- 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).
- Figure 17 is a block diagram of an example networked computing system 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).
- 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.
- 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.
- one or more devices or systems of Figure 17 can be co-located with, contained by, or otherwise integrated into one or more other devices or systems.
- 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).
- 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.
- 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.
- 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.
- 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.
- server computing system(s) 60 can implement model host 31 on behalf of client(s) 32 on computing device 50.
- 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).
- server computing system(s) 60 can communicate with computing device 50 over a local intranet or internet connection.
- Model development platform system(s) 70 can include one or more processors 71 and a memory 72.
- Processor(s) 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 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 model development platform 12. This and other functionality can be implemented by developer tool(s) 75.
- 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.
- computing system 50 or server computing system(s) 60 can implement developer tool(s) 75 (or extensions thereof) to develop, update/train, 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/train, or refine machine-learned models based on local datasets (e.g., for model personalization/customization, as permitted by user data preference selections).
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Image Processing (AREA)
Abstract
For each of a plurality of training iterations, a computing system can generate, using a machine-learned model, one or more training outputs based on one or more training inputs; and update one or more parameters of the machine-learned model based at least in part on the one or more training outputs. In some instances, generating a training output can include scaling a plurality of respective first values, such as activation values or parameters of the machine-learned model, to generate a plurality of scaled values. Generating the training output can include perturbing the plurality of scaled values based on a second precision that is lower than a first precision associated with the respective first values. Generating the training output can include performing a denoising transformation and a first matrix multiplication to generate a denoised approximation of a second matrix multiplication comprising the plurality of respective first values.
Description
ROBUST TRAINING OF NEURAL NETWORKS AT ARBITRARY PRECISION AND
SPARSITY
RELATED APPLICATIONS
[0001] The present application is based on and claims priority to United States Provisional Application Number 63/622,963 having a filing date of January 19, 2024. Application claims priority to and the benefit of each such application and incorporates all such applications herein by reference in their entirety.
FIELD
[0002] The present disclosure relates generally to machine learning processes and machine-learned devices and systems. More particularly, the present disclosure relates to robust training of neural networks at arbitrary precision and sparsity.
BACKGROUND
[0003] A computer can receive input(s). The computer can execute instructions to process the input(s) to generate output(s) using a parameterized model. The computer can obtain feedback on its performance in generating the outputs with the model. The computer can generate feedback by evaluating its performance. The computer can receive feedback from an external source. The computer can update parameters of the model based on the feedback to improve its performance. In this manner, the computer can iteratively “learn” to generate the desired outputs. The resulting model is often referred to as a machine-learned model.
[0004] The recent surge in the size and complexity of general machine learning (ML) and artificial intelligence (Al) models has elevated computational efficiency to the forefront of Al research. Among the diverse approaches to achieving efficiency, quantization and sparsification techniques stand out as two classic and widely explored methods. Quantization and sparsity techniques can effectively reduce the size and computational requirements of sequence processing models, such as, for example, large language models (LLMs). Quantization compresses the model size by converting its weights and activations to lower- precision representations, while sparsity reduces the model size by pruning out redundant weights.
[0005] These techniques can enable LLMs to be deployed on resource-constrained devices, such as mobile phones and embedded systems, while also improving their speed and memory efficiency. This can facilitate the widespread adoption of LLMs by a broader range of individuals and businesses.
[0006] Despite their promise, quantization and sparsification techniques can introduce non-differentiable operations, such as rounding and hard thresholding, which can in some instances be incompatible with the differentiable design of backpropagation, the cornerstone of neural network training. This incompatibility has plagued training algorithms for decades, hindering progress in the field of efficient neural networks.
[0007] To tackle the discontinuity challenges inherent in training efficient neural networks, algorithms have primarily focused on adapting gradient descent algorithms to work with non-differentiable operations. Empirical techniques such as the straight-through estimator (STE) have been employed to define gradients for non-differentiable operations. However, even with the STE, the perturbation introduced by quantization has been observed to disrupt existing training recipes. Consequently, clipping is commonly applied to limit the signals within a small range to prevent divergence. Despite these techniques, training quantized networks remains restricted to specific precisions or models. When moving to low precisions, these approaches usually also make changes to model architectures and recipes, such as inserting extra normalizations, changing learning rates, replacing optimizers, keeping several layers unquantized or fine-tuning. It is unclear if these techniques are effective and flexible enough for use in certain applications, such as large general Al models.
SUMMARY
[0008] Aspects and advantages of embodiments of the present disclosure will be set forth in part in the following description, or can be learned from the description, or can be learned through practice of the embodiments.
[0009] Example aspects of the present disclosure provide an example method. In some implementations, the example method can include, for each of a plurality of iterations, providing, by a computing system comprising one or more computing devices, one or more first training inputs to a first machine-learned model. The example method can include, for each of the plurality of iterations, generating, by the computing system using the first machine-learned model based on the one or more first training inputs, one or more first training outputs. The example method can include, for each of the plurality of iterations, updating, by the computing system based at least in part on the one or more first training
outputs, one or more parameters of the first machine-learned model. In the example method, generating the one or more first training outputs can include scaling, by the computing system, a plurality of respective first values to generate a plurality of respective scaled values, wherein the plurality of respective first values comprises one or more of a plurality of respective parameters of the first machine-learned model and a plurality of respective activation values, and wherein the plurality of respective first values is characterized by a first precision. In the example method, generating the one or more first training outputs can include perturbing, by the computing system based on a second precision that is lower than the first precision, the plurality of respective scaled values to generate a plurality of respective perturbed values. In the example method, generating the one or more first training outputs can include performing, by the computing system, a denoising transformation and a first matrix multiplication based at least in part on the plurality of respective perturbed values to generate a denoised approximation of a second matrix multiplication comprising the plurality of respective first values.
[0010] In the example method, performing the denoising transformation and matrix multiplication can include performing a matrix multiplication to generate a plurality of respective products before performing a rescaling of the plurality of respective products, wherein a matrix of the matrix multiplication comprises the plurality of respective perturbed values and wherein the rescaling is configured to generate a denoised approximation of the plurality of respective first values. Additionally or alternatively, in the example method, performing the denoising transformation and matrix multiplication can include performing a rescaling of the plurality of respective perturbed values to generate a plurality of respective reconstructed values before performing a matrix multiplication, wherein the rescaling is configured to generate a denoised approximation of the plurality of respective first values and wherein a matrix of the matrix multiplication comprises the plurality of respective reconstructed values.
[0011] In the example method, the second precision can be less than or equal to four bits.
[0012] In the example method, the second precision can be less than or equal to two bits.
[0013] In the example method, the second precision can be equal to one bit.
The example method can include generating, by the one or more computing devices based on the first machine-learned model after the plurality of training iterations, a quantized machine- learned model. In the example method, one or more parameters of the quantized machine-
learned model can be characterized by a lower precision than one or more corresponding parameters of the first machine-learned model.
[0014] In the example method, the plurality of training iterations can be a plurality of first training iterations. The example method can include, for each of a plurality of second training iterations, generating, by the computing system using the first machine-learned model or a second machine-learned model based on the one or more first training inputs or one or more second training inputs, one or more second training outputs. The example method can include, for each of the plurality of second training iterations, updating, by the computing system based at least in part on the one or more second training outputs, one or more parameters of the first machine-learned model or the second machine-learned model. The example method can include, for each of the plurality of second training iterations, generating, by the computing system after the plurality of second training iterations based on the first machine-learned model or the second machine-learned model, a sparse machine- learned model comprising a plurality of shared-value weights having a shared value and a plurality of other weights having a value other than the shared value. In the example method, a number of weights of the plurality of shared-value weights can be greater than 20 percent of a total number of weights of the sparse machine-learned model. In the example method, generating the one or more second training outputs can include perturbing, by the computing system, a plurality of weights of the first machine-learned model or the second machine- learned model toward a shared value to generate a second plurality of respective perturbed values. In the example method, generating the one or more second training outputs can include performing, by the computing system, a first matrix multiplication based at least in part on the second plurality of respective perturbed values.
[0015] In the example method, the plurality of second training iterations can be performed before the plurality of first training iterations using the second machine-learned model. In the example method, the first machine-learned model can be the sparse machine- learned model.
[0016] In the example method, the respective first values can include the plurality of respective parameters of the first machine-learned model. In the example method, generating the one or more first training outputs can include scaling, by the computing system, a plurality of respective second values to generate a second plurality of respective scaled values. In the example method, the plurality of respective second values can include a plurality of respective activation values. In the example method, the plurality of respective second values can be characterized by a third precision. In the example method, generating
the one or more first training outputs can include perturbing, by the computing system based on a fourth precision that is lower than the third precision, the second plurality of respective scaled values to generate a second plurality of respective perturbed values. In the example method, the denoising transformation comprises a transformation based at least in part on a first scaling factor associated with the plurality of respective first values and a second scaling factor associated with the plurality of respective first values. In the example method, the second matrix multiplication can correspond to a multiplication of a first matrix comprising the plurality of respective first values and a second matrix comprising the plurality of respective second values.
[0017] In the example method, the first machine-learned model can correspond to a spiking neural network. In the example method, the plurality of respective first values can include the plurality of respective activation values. In the example method, the second precision can be one bit.
[0018] In the example method, scaling the plurality of respective first values can include scaling each respective first value based on a minimum value associated with the plurality of respective first values, a maximum value associated with the plurality of respective first values, and a number of bits associated with the second precision.
[0019] In the example method, the minimum value can include a blockwise minimum value associated with a subset of a plurality of parameters of a layer of the first machine- learned model. In the example method, the maximum value can include a blockwise maximum value associated with the subset of the plurality of parameters of the layer of the first machine-learned model.
[0020] In the example method, perturbing can include executing a rounding operation based on the second precision.
[0021] In the example method, the rounding operation can include rounding to a nearest whole-bit approximation of a respective scaled value in the second precision.
[0022] In the example method, performing the denoising transformation can include rescaling using ridge regression.
[0023] In the example method, performing the denoising transformation can include determining a variance associated with the plurality of respective perturbed values.
[0024] In the example method, performing the denoising transformation can include determining a covariance associated with the plurality of respective perturbed values and the plurality of respective first values. In the example method, performing the denoising
transformation can include rescaling based at least in part on the variance, the covariance, and a regularization factor.
[0025] In the example method, performing the denoising transformation can include rescaling based on a scaling factor that is smaller than an inverse of a scaling factor used in scaling the plurality of respective first values to generate the plurality of respective scaled values.
[0026] In the example method, performing the denoising transformation can include rescaling based on a first scaling factor and a first offset value having a first regularized reconstruction loss that is lower than a second regularized reconstruction loss associated with a second scaling factor and second offset value that minimize an unregularized L2 reconstruction loss, wherein the first regularized reconstruction loss and second regularized reconstruction loss are each denned as a .
[0027] The example method can include determining a first mean associated with the plurality of respective perturbed values. The example method can include determining a second mean associated with the plurality of respective first values. In the example method, performing the denoising transformation can be based at least in part on the first mean and the second mean.
[0028] Example aspects of the present disclosure provide an example computing system that includes one or more processors and one or more example non-transitory computer-readable media storing instructions that are executable by one or more processors to cause a computing system to perform example operations. In some implementations, the example operations can include In some implementations, the example operations can include, for each of a plurality of training iterations, providing one or more first training inputs to a first machine-learned model. In some implementations, the example operations can include, for each of the plurality of training iterations, generating, using the first machine-learned model based on the one or more first training inputs, one or more first training outputs. In some implementations, the example operations can include, for each of the plurality of training iterations, updating, based at least in part on the one or more first training outputs, one or more parameters of the first machine-learned model. In the example operations, generating the one or more first training outputs can include scaling a plurality of respective first values to generate a plurality of respective scaled values. In the example operations, the plurality of respective first values can include one or more of a plurality of respective parameters of the first machine-learned model and a plurality of respective
activation values. In the example operations, the plurality of respective first values can be characterized by a first precision. In the example operations, generating the one or more first training outputs can include perturbing, based on a second precision that is lower than the first precision, the plurality of respective scaled values to generate a plurality of respective perturbed values. In the example operations, generating the one or more first training outputs can include performing a denoising transformation and a first matrix multiplication based at least in part on the plurality of respective perturbed values to generate a denoised approximation of a second matrix multiplication comprising the plurality of respective first values.
[0029] Example aspects of the present disclosure provide one or more example non- transitory computer-readable media storing instructions that are executable by one or more processors to cause a computing system to perform example operations. In some implementations, the example operations can include, for each of a plurality of training iterations, providing one or more first training inputs to a first machine-learned model. The example operations can include, for each of the plurality of training iterations, generating, using the first machine-learned model based on the one or more first training inputs, one or more first training outputs. The example operations can include, for each of the plurality of training iterations, updating, based at least in part on the one or more first training outputs, one or more parameters of the first machine-learned model. In the example operations, generating the one or more first training outputs can include scaling a plurality of respective first values to generate a plurality of respective scaled values. In the example method, the plurality of respective first values can include one or more of a plurality of respective parameters of the first machine-learned model and a plurality of respective activation values. In the example method, the plurality of respective first values can be characterized by a first precision. In the example operations, generating the one or more first training outputs can include perturbing, based on a second precision that is lower than the first precision, the plurality of respective scaled values to generate a plurality of respective perturbed values. In the example operations, generating the one or more first training outputs can include performing a denoising transformation and a first matrix multiplication based at least in part on the plurality of respective perturbed values to generate a denoised approximation of a second matrix multiplication comprising the plurality of respective first values.
[0030] Other example aspects of the present disclosure are directed to other systems, methods, apparatuses, tangible non-transitory computer-readable media, and devices for performing functions described herein. These and other features, aspects, and advantages of
various implementations will become better understood with reference to the following description and appended claims. The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate implementations of the present disclosure and, together with the description, help explain the related principles.
BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure l is a block diagram of an example system for denoised quantization of numerical values according to example implementation of aspects of the present disclosure;
[0032] Figure 2 is a block diagram of an example system for denoised perturbation of numerical values according to example implementation of aspects of the present disclosure;
[0033] Figure 3 A is a block diagram of an example system for denoised matrix multiplication according to example implementation of aspects of the present disclosure;
[0034] Figure 3B is a block diagram of an example system for denoised matrix multiplication according to example implementation of aspects of the present disclosure; [0035] Figure 4A is a block diagram of an example system for quantization-aware training of a machine-learned model based on quantized weights according to example implementation of aspects of the present disclosure;
[0036] Figure 4B is a block diagram of an example system for quantization-aware training of a machine-learned model based on quantized weights according to example implementation of aspects of the present disclosure;
[0037] Figure 5 is a block diagram of an example system for quantization-aware training of a machine-learned model based on quantized activations according to example implementation of aspects of the present disclosure;
[0038] Figure 6 is a block diagram of an example system for sparsificati on-aware training of a machine-learned model according to example implementation of aspects of the present disclosure;
[0039] Figure 7 is a flow chart diagram illustrating an example method for training a quantized machine-learned model according to example implementations of aspects of the present disclosure;
[0040] Figure 8 is a flow chart diagram illustrating an example method for training a quantized machine-learned model according to example implementations of aspects of the present disclosure;
[0041] Figure 9 is a flow chart diagram illustrating an example method for training a sparse machine-learned model according to example implementations of aspects of the present disclosure;
[0042] Figure 10 is a flow chart diagram illustrating an example method for training a machine-learned model according to example implementations of aspects of the present disclosure;
[0043] Figure 11 is a block diagram of an example processing flow for using machine-learned model(s) to process input(s) to generate output(s) according to example implementations of aspects of the present disclosure;
[0044] Figure 12 is a block diagram of an example sequence processing model according to example implementations of aspects of the present disclosure;
[0045] Figure 13 is a block diagram of an example technique for populating an example input sequence for processing by a sequence processing model according to example implementations of aspects of the present disclosure;
[0046] Figure 14 is a block diagram of an example model development platform according to example implementations of aspects of the present disclosure;
[0047] Figure 15 is a block diagram of an example training workflow for training a machine-learned model according to example implementations of aspects of the present disclosure;
[0048] Figure 16 is a block diagram of an inference system for operating one or more machine-learned model(s) to perform inference according to example implementations of aspects of the present disclosure;
[0049] Figure 17 is a block diagram of an example networked computing system according to example implementations of aspects of the present disclosure;
[0050] Figure 18 is a block diagram of an example computing device according to example implementations of aspects of the present disclosure; and
[0051] Figure 19 is a block diagram of an example computing device according to example implementations of aspects of the present disclosure.
DETAILED DESCRIPTION
[0052] Generally, the present disclosure is directed to systems and methods for robust training of neural networks at arbitrary precision and sparsity. In particular, in contrast to the intricate and often empirically tuned techniques of prior methods, example implementations of the present disclosure provide another approach that formulates discontinuous operations
as the introduction of perturbations. Example implementations of the present disclosure can address this challenge directly by mitigating the effects of these perturbations, effectively denoising the signal. Examples of the proposed approach can include three fundamental steps:
[0053] 1. Affine Transform for Quantization: This initial step can apply an affine transform f to an input signal, moving the signal to the desired scale without introducing any additional perturbations or noise (e.g. clipping).
[0054] 2. Perturbation Injection: To account for the effects of quantization, example implementations of the present disclosure can inject a controlled perturbation 6 into the signal, capturing the exact change introduced by the quantization process.
[0055] 3. A Denoising Affine Transform for Reconstruction: An advantageous aspect of example implementations of the proposed approach can be the introduction of another affine transform g that effectively reconstructs the original signal while suppressing the impact of quantization noise.
[0056] Aspects of the present disclosure are directed to systems and methods for performing denoised quantized matrix multiplication, along with related systems and methods for performing differentiable training of a various model architectures such as, for example: a quantized machine-learned model; a sparse machine-learned model; and a spiking neural network.
[0057] In some implementations, quantization can include, for example, scaling one or more higher-precision numerical values to lower-precision values (e.g., from a 32-bit floating point value between 10'38 and 1038 to an 8-bit integer between 0 and 255). Quantized matrix multiplication can include quantizing the values of one or more matrices; multiplying the quantized matrices; and rescaling (which can include shifting) the multiplied values to reconstruct an approximation of an unquantized matrix multiplication result. Denoised quantized matrix multiplication can include denoised reconstruction, wherein noise introduced during the quantizing step is reduced relative to a naive reconstruction.
[0058] Denoised quantized (or pseudoquantized) matrix multiplication can be used to provide differentiable training for, among other model types, a quantized machine-learned model; a sparse machine-learned model; and a spiking neural network. A quantized machine- learned model can include, for example, a model having one or more low-precision parameters (e.g., 8-bit integer parameters; 4-bit, 2 -bit, or 1 -bit parameters; etc.) or a model configured to process one or more low-precision activations. A sparse machine-learned
model can include a model having a large percentage (e.g., 25 percent, 50 percent, 75 percent, 90 percent, 99 percent, etc.) of same-valued (e.g., mean-valued, zero-valued, etc.) parameters and only a small percentage of different-valued (e.g., non-mean-valued, non-zero- valued, etc.) parameters. Both quantization and sparsification can advantageously reduce a computational cost associated with a machine-learned model. However, a lack of differentiability can make sparsified or quantized machine-learned models difficult to optimize by preventing the straightforward application of gradient descent algorithms. Advantageously, provided systems and methods can enable the differentiable training of sparsified and quantized machine-learned models at very low precisions, sometimes using off-the-shelf training recipes associated with higher-precision models (e.g., models having 32-bit weights, etc.) and without hand-tuned empirical adjustments for lower-precision training.
[0059] A spiking neural network can include, for example, a machine-learned model having a temporal component (e.g., recurrent neural network, long short-term memory, transformer, etc.) and a plurality of one-bit quantized activation values. Spiking neural networks have attracted significant research interest because of a relationship between spiking neural networks and biological neural networks (e.g., human brains). For example, biological neural networks can primarily consist of brief electrical impulses, commonly known as spikes, in their activity patterns. Based on this insight, researchers have sought to design artificial neural networks that mimic biological neural networks using spiking neural networks. However, a lack of differentiability can make spiking neural networks difficult to optimize by preventing the straightforward application of gradient descent algorithms. Advantageously, provided systems and methods can enable the differentiable training of a spiking neural network using standard gradient descent methods, possibly opening up new avenues in the field of spiking neural networks.
[0060] In an aspect, quantized matrix multiplication can include quantizing a plurality of values contained in a first higher-precision matrix to generate a first lower-precision matrix; quantizing a plurality of values contained in a second higher-precision matrix to generate a second lower-precision matrix; and multiplying the lower-precision matrices together to generate a plurality of respective products. Quantizing a value can include, for example, scaling the value to a scale associated with a lower-precision representation; and perturbing the scaled value, such as by rounding to a nearest whole-bit (e.g., whole- numbered) value associated with the lower-precision representation. Example scaling and perturbation methods are further described in Figures 1 and 2.
[0061] Quantized matrix multiplication can also include, for example, a reconstruction (e.g., denoising reconstruction), in which the respective products can be rescaled to reconstruct an approximation (e.g., denoised approximation) of a matrix multiplication between the first higher-precision matrix and the second higher-precision matrix. Denoised quantized matrix multiplication can include a denoising rescaling, wherein noise introduced during quantization due to rounding can be reduced relative to alternative reconstruction methods.
In some instances, a denoising reconstruction can include scaling or offsetting a quantized value based on a scaling factor or offset value, such as according to x = aq + b, where v is a reconstructed value, q is a quantized value, a is a scaling factor, and b is an offset value. In some instances, a scaling factor and offset value can include a scaling factor or offset value that reduces (e.g., minimizes, reduces relative to a scaling factor that minimizes unregularized L2 reconstruction loss, etc.) a regularized reconstruction loss, such as
where is a regularization factor, such as 0.01. In some instances, determining a scaling factor or offset value can include a ridge regression. In some instances, a scaling factor for denoising reconstruction can be determined based on one or more of a variance of a plurality of quantized values; a covariance between a plurality of quantized values and a plurality of corresponding full-precision values used to generate the quantized values; a regularization parameter; or other parameters. For example, in some instances, an example scaling factor can include
[0062] In some instances, a plurality of values (e.g., weights, activations, etc.) associated with a machine-learned model can be quantized using one or more global scaling factors or offset values, or using a plurality of local, blockwise scaling factors or offset values, such as a respective scaling factor and respective offset value for each of a plurality of blocks of parameters (e.g., blocks of 32, 128, or 512 parameters per block, etc.) of the machine-learned model. For example, in some instances, using blockwise scaling factors with smaller block sizes can in some instances improve a technical performance (e.g., inference quality, etc.) of a machine-learned model, while using larger block sizes or global scaling parameters can in some instances reduce a cost (e.g., memory footprint, etc.) of storing one or more scaling factors or offset values. In some instances, a blockwise scaling factor can
include a scaling factor that reduces a regularized reconstruction loss for reconstructing a corresponding block of parameters (e.g., without regard to other, unrelated blocks or parameters thereof), such as a scaling factor determined based on a block-specific variance of a block of quantized values, a block-specific covariance between the block of quantized values and a block of full-precision values used to generate the quantized values, and a regularization parameter (e.g., global constant regularization factor, etc.).
[0063] In some instances, one or more quantized matrix multiplications can be performed, such as a quantized matrix multiplication between a first quantized matrix and a second quantized matrix, and a denoised rescaling can be performed on the matrix product. In some instances, a denoised rescaling based on a matrix product can be based on a plurality of scaling factors or a plurality of offset values. For example, in some instances, a denoising reconstruction of a higher-precision value plurality of higher-precision values can be represented by one or higher-precision product x} * x2 can be rescaled based on a lower- precision quantized product q * q2 using the formula
where a , a2, b and b2 can correspond respectively, for example, to scaling factors a and offset values b for reconstructing x and x2. Similar denoising reconstructions can be used without going outside the scope of the present disclosure. For example, in some instances, the b component of equation (10)’ s aq + b can be omitted or be equal to zero with minimal impact on a performance of a quantized machine-learned model.
[0064] In some instances, a plurality of lower-precision matrix multiplications can be performed, and a single rescaling can rescale a product of more than two lower-precision values. However, in some machine-learning operations, a non-linear operation such as a ReLU operation may be performed in between matrix multiplications. In such instances, rescaling can be performed before the non-linear operation to facilitate a straightforward linear rescaling process.
[0065] In some example embodiments according to the present disclosure, pseudoquantized matrix multiplication can be used instead of or in addition to quantized matrix multiplication. Pseudoquantized matrix multiplication can be any method that mimics an outcome of quantized matrix multiplication, without actually multiplying quantized matrix values. In some instances, pseudoquantized matrix multiplication can include, for example, scaling and rounding a plurality of higher-precision values in a manner similar to quantization but representing the scaled and rounded values using a higher-precision data
structure. In some instances, pseudoquantized matrix multiplication can include performing one or more reconstructions (e.g., denoising reconstructions) before, rather than after, a matrix multiplication. Although quantized matrix multiplication can in some instances be associated with a lower computational cost than pseudoquantized matrix multiplication, denoised pseudoquantized methods can provide similar (e.g., same) training benefits compared to denoised quantized methods. Thus, pseudoquantized methods can be substituted for quantized methods without going outside the scope of the present disclosure.
[0066] Differentiable quantization-aware training can include, for example, obtaining an untrained or pretrained machine-learned model comprising one or more matrices (e.g., one-dimensional vector matrices, two-dimensional matrices, higher-dimensional tensor matrices, etc.). Differentiable quantization-aware training can include, for example, performing a plurality of training iterations based on a plurality of training inputs. A training iteration can include, for example, generating one or more training outputs based on one or more training inputs in a forward pass. A forward pass can include, for example, performing one or more denoised quantized matrix multiplications. For example, in some instances, one or more weights of the machine-learned model can be quantized; one or more input activation values of the machine-learned model can be quantized; and the quantized weights and quantized input activations can be multiplied together and rescaled in a denoising reconstruction. Training outputs can be generated based at least in part on the rescaled values generated using the denoising reconstruction. For example, one or more layers of a machine- learned model can include one or more denoised quantized matrix multiplications, and the denoised reconstructed outputs can be input, for example, into an activation function (e.g., ReLU function, sigmoid function, softmax, etc.) to generate one or more activation values (e.g., activation values configured to act as input for a subsequent layer of the machine- learned model). Based on the training outputs and a training objective (e.g., loss function), one or more parameters of the machine-learned model can be updated in a backward pass (e.g., via gradient descent, etc.).
[0067] In some instances, differentiable quantization-aware training can include adapting an existing training recipe (e.g., a standard or off-the-shelf training recipe) for training a machine-learned model comprising one or more matrices. Adapting such a training recipe can include, for example, replacing one or more matrix multiplications of the machine- learned model’s forward pass with one or more denoised quantized matrix multiplications (e.g., as further described in the Figures). Adapting the training recipe can include, for example, keeping other elements of the training recipe unchanged, such as an architecture of
the machine-learned model; a b ackpropagation method; a loss function or objective function; any hyperparameters; etc.
[0068] In some instances, differentiable quantization-aware training can include outputting or storing a quantized machine-learned model, wherein one or more parameters of the quantized machine-learned model are stored using lower-precision quantized values (e.g.
1 -bit, 2 -bit, 4-bit, etc.). In some instances, differentiable quantization-aware training can include storing one or more rescaling values configured to enable reconstructing one or more approximated full -preci si on matrix multiplication values before performing another operation (e.g., a non-linear operation such as a ReLU operation). In some instances, differentiable quantization-aware training can include storing one or more scaling values configured to scale one or more full-precision values to quantized values. For example, in some instances, an activation function of a machine-learned model can output a full -preci si on activation value based on one or more full-precision inputs (e.g., denoised reconstructed matrix multiplication results). In such instances, one or more scaling values can be used to scale such a fullprecision activation value to a lower-precision quantized activation value for quantized matrix multiplication.
[0069] In some instances, differentiable quantization-aware training can include outputting or storing a full-precision machine-learned model. In such instances, quantized matrix multiplication can be used during inference of a full-precision model by quantizing one or more values associated with a matrix associated with the full-precision model or its inputs; performing a matrix multiplication using the quantized values; and performing a rescaling (e.g., denoised rescaling) of a result of the matrix multiplication. In some instances, such a quantized multiplication can reduce a computational cost of inference relative to using full-precision matrix multiplication. Although storing a quantized model can have additional benefits (e.g., reduced memory footprint) relative to storing a full-precision model, storing a full-precision model can be desirable in some instances, such as when a higher-precision inference is preferred for some inferences (e.g., accuracy-critical inferences) and not for others (e.g., latency-critical inferences).
[0070] Training a sparse machine-learned model can include, for example, obtaining a pretrained or untrained machine-learned model having a plurality of parameters (e.g., weights), and training the model for a plurality of training iterations. In some instances, a training iteration can include determining a mean value associated with a plurality of parameters (e.g., weights); identifying one or more parameters that are near the mean value; and perturbing the one or more parameters to the mean value. In some instances, a training
iteration for training a sparse machine-learned model can be performed without a denoising reconstruction. In other instances, a training iteration for training a sparse machine-learned model can include a denoising reconstruction step as further described in the Figures below. [0071] In some instances, sparsification can be advantageously combined with quantization. For example, a sparse machine-learned model can be trained according to provided methods. A quantized machine-learned model can be trained based on the sparse machine-learned model using provided methods for differentiable quantization-aware training (e.g., after the sparse model has been partially or fully trained).
[0072] Differentiable training of a spiking neural network can include, for example, obtaining an untrained or pretrained machine-learned model configured to include a temporal component (e.g., sequence processing model such as: recurrent neural network, long shortterm memory, transformer, structured state space model, etc.) and performing differentiable quantization-aware training (e.g., as described above) for quantizing one or more activation values to a one-bit precision.
[0073] Systems and methods of the present disclosure provide a variety of technical effects and benefits. In some instances, systems and methods of the present disclosure can achieve better technical performance (e.g., higher BLEU scores) than prior systems and methods. Additionally, systems and methods of the present disclosure can in some instances achieve similar technical performance at a reduced computational cost (e.g., reduced usage of computational components such as processors, etc., which corresponds to reduced electricity usage) compared to prior systems and methods. Furthermore, systems and methods of the present disclosure can in some instances reduce other costs (e.g., labor costs, hyperparameter and architecture tuning costs, etc.) associated with training quantized or sparsified machine- learned models, such as by enabling the use of off-the-shelf full-precision training recipes with minimal changes. Additionally, provided systems and methods for differentiable optimization may in some instances unlock new avenues of research and experimentation (e.g., using spiking neural networks) not available with prior methods.
[0074] In some example experiments according to the present disclosure, quantized machine-learned models trained according to the present disclosure were compared to fullprecision machine-learned models and further compared to quantized machine-learned models trained according to prior methods. In the example experiments, quantized models of the present disclosure achieved better technical performance (e.g., higher BLEU scores) compared to same-precision quantized models trained according to prior methods. Moreover, quantized models of the present disclosure in some instances achieved slightly better
technical performance (e.g., slightly higher BLEU scores) compared to full-precision machine-learned models (e.g., having 8 times as many bits per parameter). Because performing inference with a quantized machine-learned model using fewer bits per parameter can reduce a computational cost of inference compared to a full-precision model, these example experiments demonstrate that quantized models of the present disclosure can achieve similar technical performance compared to prior full-precision machine-learned models at a significantly reduced computational cost.
[0075] In some example experiments according to the present disclosure, sparsified and quantized machine-learned models trained according to the present disclosure were compared to sparsified full-precision models trained according to prior methods. In the example experiments, sparse full-precision models trained according to the present disclosure achieved better technical performance (e.g., better BLEU scores) compared to sparse fullprecision models trained according to prior methods. Additionally, sparse quantized models trained according to the present disclosure also achieved better technical performance than sparse full-precision models trained according to prior methods. Because performing inference with a sparsified and quantized machine-learned model using fewer bits per parameter can reduce a computational cost of inference compared to a full-precision model, these example experiments demonstrate that sparse quantized models of the present disclosure can achieve similar technical performance compared to prior full-precision sparse machine-learned models at a reduced computational cost.
[0076] In some example experiments according to the present disclosure, spiking neural networks trained according to the present disclosure were compared to prior models trained according to prior methods. In the example experiments, spiking neural networks of the present disclosure achieved much better technical performance (e.g., BLEU scores nearly 6 points higher) compared to prior models having the same precision. Thus, systems and methods of the present disclosure can in some instances provide much better technical performance at a similar (e.g., same) computational cost compared to prior systems and methods.
[0077] In some of the example experiments described above, systems and methods of the present disclosure achieved these state-of-the-art results with 1 -bit models using standard training procedures without modifying a machine-learned model architecture or training recipe.
[0078] Example implementations of the proposed approach can in some instances provide several additional technical effects and benefits:
[0079] Continuous Control over Quantization Noise: example implementations of the present disclosure can provide continuous control over one or more effects of quantization noise, potentially ensuring stable model training and preventing training divergence.
[0080] Graceful Degradation under Noise: In extreme noise conditions, example implementations of the present disclosure can seamlessly transition to a lower-resolution model, ensuring a performance lower bound even in challenging scenarios. This robustness to noise can in some instances ensure that a machine-learned model maintains acceptable performance even in the face of significant quantization artifacts.
[0081] Compatibility with Existing Architectures and Training Recipes: Example implementations of the present disclosure can remove a requirement for architectural modifications or training recipe changes, enabling utilization of current full-precision training configurations for low-precision models. This can minimize a requirement for exhaustive hyperparameter optimization.
[0082] Smooth Transition from Full-Precision to Low-Precision: Low-precision models according to aspects of the present disclosure can in some instances transition smoothly from corresponding full-precision models, in some instances simplifying a finetuning process and ensuring a smooth learning trajectory. This smoothness of transition can minimize a risk of performance degradation during a transition to low-precision models. [0083] Differentiable optimization for quantized networks, sparsified networks and spiking neural networks without significant hand tuning: Differentiable optimization can in some instances be a key advantage of many popular and useful machine-learned model architectures, such as transformers. Advantageously, systems and methods of the present disclosure can in some instances provide differentiable optimization methods for machine- learned model architectures that may be non-differentiable using some alternative methods, or may require extensive empirical hand-tuning using some alternative methods intended to compensate for non-differentiability. In some instances, systems and methods according to aspects of the present disclosure can be universally applied to a variety of model architectures, training methods (e.g., optimizers such as Adam, etc.), quantization precisions, and the like, without significant hand-tuning or empirical adjustment. In some instances, such universality may unlock new avenues of research into, for example, improved machine- learned model architectures.
[0084] In another example aspect, example implementations can provide for more energy-efficient training operations or model updates. In some scenarios, increased energy efficiency can provide for less energy to be used to perform a given number of update
iterations (e.g., less energy expended to maintain the model in memory, less energy expended to perform calculations within the model, such as computing gradients, backpropagating a loss, etc.). In some scenarios, increased energy efficiency can provide for more update iterations to be completed for a given energy budget (e.g., a larger quantity of iterations, etc.). In some scenarios, greater expressivity afforded by model architectures and training techniques of the present disclosure can provide for a given level of functionality to be obtained in fewer training iterations, thereby expending a smaller energy budget. In some scenarios, greater expressivity afforded by model architectures and training techniques of the present disclosure can provide for an extended level of functionality to be obtained in a given number of training iterations, thereby more efficiently using a given energy budget.
[0085] In this manner, for instance, the improved energy efficiency of example implementations of the present disclosure can reduce an amount of pollution or other waste associated with implementing machine-learned models and systems, thereby advancing the field of machine-learning and artificial intelligence as a whole. The amount of pollution can be reduced in toto (e.g., an absolute magnitude thereof) or on a normalized basis (e.g., energy per task, per model size, etc.). For example, an amount of CO2 released (e.g., by a power source) in association with training and execution of machine-learned models can be reduced by implementing more energy-efficient training or inference operations. An amount of heat pollution in an environment (e.g., by the processors/storage locations) can be reduced by implementing more energy-efficient training or inference operations.
[0086] Various example implementations are described herein with respect to the accompanying Figures.
[0087] Figure l is a block diagram of an example system for denoised quantization of numerical values according to example implementation of aspects of the present disclosure. A denoising quantization system 102 can obtain one or more values 104. The denoising quantization system 102 can perform a transformation 106 on the value(s) 104 to generate one or more transformed values 108. The denoising quantization system 102 can perform a perturbation 110 on the transformed value(s) to generate one or more perturbed values 112. The denoising quantization system 102 can perform a denoising transformation 114 on the perturbed value(s) 112 to generate one or more denoised values 116.
[0088] A denoising quantization system 102 can be or include one or more software, firmware, or hardware components configured to perform one or more denoising quantization operations, such as operations depicted in Figure 1. In some instances, the computing system 102 can be, comprise, be comprised by, or share one or more properties with a computing
device or system described below with respect to Figures 17-19 (e.g., computing device 50, third-party system 80, computing device 98, computing device 99, etc.).
[0089] Value(s) 104 can generally include or otherwise represent various types of data. A value 104 can include one type or many different types of data. Example data types for a value 104 can include, for example, numerical values or binary representations thereof, such as numerical values represented in a standard or nonstandard integer or floating-point binary format; numerical values represented in a scaled, quantized, normalized, or other format for mapping binary values to numerical values; or other numerical input(s). In some instances, a plurality of values 104 can include a tensor (e.g., matrix, vector, etc.) of values 104 having one or more dimensions (e.g., length, width, or height; number of rows, columns, or other subsets; dimension of a four-dimensional or higher-dimensional tensor; etc.). For example, in some instances, a plurality of values 104 can include a matrix (e.g., two- dimensional matrix, one-dimensional vector matrix, three- or more-dimensional tensor matrix, etc.) to be used in a matrix multiplication operation, such as a matrix multiplication operation associated with a machine learning operation (e.g., forward pass of a machine- learned model, etc.). Other implementations are possible.
[0090] A transformation 106 can include, for example, one or more operations, computer-executable instructions (e.g., operations or instructions to be performed by a denoising quantization system 102, etc.), or hardware, firmware, or software components configured to transform one or more values 104 into transformed values 108.
[0091] In some instances, a transformation 106 can include a scaling operation. Example scaling operations can include, for example, min-max scaling, maximum (absolute_value(x)) scaling, or other scaling operations. In some instances, a scaling operation can include multiplying a value 104 by a scaling factor; offsetting the value 104 by an offset value; or other scaling operation. In some instances, a transformation 106 (e.g., scaling operation, etc.) can include an affine transform.
[0092] In some instances, a scaling operation can include a scaling operation associated with a quantized binary format for representing a plurality of values at a lower precision than a precision at which the values 104 are represented. For example, in some instances, a scaling operation can include an operation mapping a range (e.g., subrange of a full range representable by the higher-precision binary format, etc.) of higher-precision values to be represented by a quantized binary format to a range of lower-precision values of the quantized binary format. For example, in some instances, a minimum value 104 to be represented by the quantized format can be identified (e.g., minimum value 104 of a plurality
of values 104, such as a plurality of model weights of a machine-learned model or layer thereof, etc.), and the minimum value 104 to be represented can be mapped to a minimum value (e.g., transformed value 108, perturbed value 112, etc.) associated with the quantized format. Additionally, in some instances, a maximum value 104 to be represented by the quantized format can be identified, and the maximum value 104 to be represented can be mapped to a maximum value associated with the quantized format. As a non-limiting illustrative example, a minimum value of an unsigned 4-bit quantization format can be 0000, and a maximum value of the unsigned 4-bit quantization format can be 1111, and performing a transformation 106 based on an unsigned 4-bit quantization format can include mapping 0000 to a minimum value (or near-minimum, etc.) of a range of values 104 to be represented, and mapping 1111 to a maximum (or near-maximum, etc.) values to be represented. In some instances, values 104 between the minimum and maximum values can be transformed according to a linear interpolation between minimum and maximum transformed values 108, or in another manner (e.g., logarithmic interpolation, non-uniform mapping such as mapping based on a plurality of subrange densities of a minimum-to-maximum range, etc.). An example mapping operation for mapping values 104 to an unsigned integer quantization format can correspond to
where x can be one or more values 104 to be transformed (e.g., a matrix of values 104, etc.); (x) can be a transformation 106 operation; xmin and xmax can be values (e.g., perturbed values 112, etc.) to be represented by a minimum and maximum value, respectively, of an unsigned integer quantization format; bits can be a number of bits of a precision of the unsigned integer quantization format; and e can be a small value (e.g., value significantly less than 1, such as a value near zero, 10'8, etc.). Other transformations 106 are possible (e.g., transformations 106 based on a signed binary format, transformations 106 based on a quantized floating-point format, etc.).
[0093] In some instances, a minimum and maximum value to be represented by a quantized binary format can be selected based on a plurality of values 104, such as a tensor (e.g., one-dimensional vector tensor, two-dimensional matrix tensor, etc.) of values 104 or portion thereof. In some instances, a plurality of values 104 can include a plurality of values 104 associated with a machine-learned model, such as a plurality of parameters (e.g., weights, etc.) of the machine-learned model, a plurality of activation values (e.g., input values, layer input activation values, layer output activation values, etc.) or range of activation values
associated with the machine-learned model, or other plurality of values. In some instances, a plurality of values 104 associated with a machine-learned model can include a block of values (e.g., weights, activations, etc.) associated with a portion of a layer of the machine- learned model. For example, in some instances, a layer of a large machine-learned model having a large number of parameters (e.g., billions or trillions of total parameters; thousands, tens of thousands, or more parameters per layer; etc.) can be split into a plurality of blocks, such as a plurality of blocks having 32 parameters per block; 128 parameters per block; 512 parameters per block; or other block size. In some instances, each block can be separately scaled based on values 104 (e.g., weights, activation values, etc.) associated with the block, such as blockwise minimum, maximum, mean, or median values, or other blockwise data (e.g., statistical aggregate values, etc.). In some example experiments according to aspects of the present disclosure, quantized machine-learned models that were quantized in a blockwise quantization format with small block sizes were associated with improved inference output quality (e.g., improved BiLingual Evaluation Understudy (BLEU) scores, etc.) compared to alternative implementations with larger quantization blocks (e.g., blockwise quantization with larger block sizes, layerwise quantization, etc.), at the cost of some additional memory overhead for storing a plurality of blockwise quantization and reconstruction values (e.g., scaling values, offset values, minimum or maximum values, etc.).
[0094] In some instances, a value to be mapped to a minimum quantization value (e.g., 0000 of a four-bit unsigned integer format, etc.) can be the same as or different from (e.g., greater than, etc.) a minimum value of a plurality (e.g., block, etc.) of values 104. For example, in some instances, a plurality of values 104 to be represented can be divided into bins (e.g., a number of bins equal to a number of values that can be represented in a binary format, such as 16 for a 4-bit format, etc.), such as equally spaced bins having a same numerical width; density -based bins having a same number of values 104 in each bin; or other bins. In some instances, each binary value (e.g., 0000, etc.) of a quantized binary format can be mapped to an interior value of a corresponding bin, such as a center (e.g., mean, etc.) of the corresponding bin. For example, a minimum quantized value (e.g., 0000, etc.) can be mapped to a center value of a minimum bin, which may in some instances be greater than a minimum value 104 of a plurality of values 104 to be represented in the quantized format. Other implementations are possible.
[0095] Transformed values 108 can generally include or otherwise represent various types of data, such as binary data representing one or more numerical values. In some instances, a transformed value 108 or plurality of transformed values 108 can have any data
type described herein with respect to a value 104 or plurality of values 104. In some instances, a transformed value 108 can include a numerical value represented in a binary format that is the same as or different from a binary format of a value 104 used to generate the transformed value 108. For example, transformed values 108 can include scaled values, such as values that have been scaled based on a binary quantization format or based on a number of bits of the binary quantization format. In some instances, transformed values 108 can include values that have been transformed by an affine transformation. In some instances, transformed values 108 can include values that have been scaled based on a mapping between a range (e.g., subrange, etc.) of a first binary format and a range of a second binary format, such as between a first higher-precision binary format and a second lower-precision binary format to be used for quantizing a plurality of values 104 (e.g., for use in a quantized machine-learned model, etc.).
[0096] A perturbation 110 can include, for example, one or more operations, computer-executable instructions (e.g., operations or instructions to be performed by a denoising quantization system 102, etc.), or hardware, firmware, or software components configured to transform one or more transformed values into perturbed values 112.
[0097] In some instances, a perturbation 110 can include a rounding operation to round one or more transformed values 108 toward (e.g., to, etc.) one or more perturbed values 112 of interest. For example, in some instances, a perturbation 110 can include a rounding operation associated with a binary quantization format, such as a rounding to a nearest wholebit value associated with the binary quantization format. However, other perturbations 110 are possible, such as perturbation 110 toward another value of interest, such as a central value (e.g., average, mean, median, etc.) of a range of values 104 to be represented by a binary quantization format. Further details of an example system for perturbing toward a mean value are provided below with respect to Figure 2.
[0098] In some instances, a rounding operation can include rounding a transformed value 108 toward (e.g., to) a nearest whole-bit value associated with a binary quantization format, such as a binary quantization format that was used to generate the transformed value 108 based on a value 104. In some instances, a plurality of whole-bit values can be determined based on a mapping (e.g., mapping comprising scaling such as min-max scaling, offsetting, interpolation such as linear interpolation, etc.; or other mappings, such as non- uniform mappings correlating a plurality of whole-bit values of a binary quantization format to a plurality of corresponding values of a higher-precision format, etc.) between a binary quantization format and a higher-precision binary format (e.g., format in which values 104
are represented, etc.), and a perturbation 110 can include rounding a transformed value 108 toward (e.g., to) a nearest whole-bit value of the plurality of whole-bit values. As a nonlimiting illustrative example, in instances where a transformation 106 is mapped to an unsigned integer binary format according to
a plurality of whole-bit values in the binary format can be represented as:
where i can be an integer between 0 and 2blts — 1. In some instances, a nearest whole-bit value can be determined based on an arithmetic difference between a transformed value 108 and each of the plurality of whole-bit values, wherein a whole-bit value associated with the smallest difference is considered the nearest whole-bit value. Other implementations are possible (e.g., geometric or logarithmic difference, distance metric based on subrange densities, etc.).
[0099] In some instances, a rounding operation can correspond to or be modeled as injecting a bounded perturbation: q = /(x) + 6, where
[0100] In some instances, one or more perturbations 110 can be performed on a blockwise basis, such as based on a mapping from a higher-precision binary format to a quantized binary format associated with a plurality of values 104 associated with a portion of a layer of a machine-learned model. For example, in some instances, a layer of a large machine-learned model having a large number of parameters (e.g., billions or trillions of total parameters; thousands, tens of thousands, or more parameters per layer; etc.) can be split into a plurality of blocks, such as a plurality of blocks having 32 parameters per block; 128 parameters per block; 512 parameters per block; or other block size. In some instances, each block can be separately scaled based on values 104 (e.g., weights, activation values, etc.) associated with the block, such as blockwise minimum, maximum, mean, or median values, or other blockwise data (e.g., statistical aggregate values, etc.). In some instances, each respective block can be associated with a respective scale having a respective set of whole-bit values that may be the same as or different from a set of whole-bit values of another block. In some instances, perturbing a plurality of transformed values 108 can include perturbing one
or more blocks of values on a based on one or more block-specific sets of whole-bit numerical values.
[0101] In some instances, systems and methods according to aspects of the present disclosure can be used to train a machine-learned model using standard gradient-based methods (e.g., off-the-shelf training recipes without hand-tuned or empirical adjustments to compensate for discontinuities, etc.). For example, in some instances, denoising quantization 102 operations, such as perturbations 110, can be performed without empirical operations such as clipping, which can introduce larger perturbations and degrade model performance. In some instances, systems and methods according to some aspects of the present disclosure can (e.g., by directly incorporating the quantization noise into the model, etc.) maintain signal fidelity and can achieve superior results compared to traditional clipping-based approaches. As another example, systems and methods according to aspects of the present disclosure can in some instances provide training convergence for machine-learned models quantized at arbitrarily low precision, including 1 -bit precision for representing machine-learned model weights and 1 -bit precision for representing activation values. Further details of some example machine learning training operations are provided below with respect to Figures 4A through 6.
[0102] In some instances, a combined transformation 106 and perturbation 110 operation can include operations similar to (e.g., same as, etc.) operations described or represented in the following example code or pseudocode: def quantize(x, bits, axis, eps=le-8):
# quantize to [0, 2Abits- 1 ] max value = jnp.max(x, axis=axis, keepdims=True) min value = jnp.min(x, axis=axis, keepdims=True) scaled x = (
(x - min_value) / (max_value - min_value + eps)
* (2**bits - 1)
) # scale to [0, 2Abits- 1 ] delta x = jax.lax.stop_gradient(jnp.round(scaled_x) - scaled x) q = scaled_x + delta_x # perturb to integers return q
[0103] Perturbed values 112 can generally include or otherwise represent various types of data, such as binary data representing one or more numerical values. In some instances, a perturbed value 112 or plurality of perturbed values 112 can have any data type
described herein with respect to a value 104 or plurality of values 104. In some instances, a perturbed value 112 can include a numerical value represented in a binary format that is the same as or different from a binary format of a value 104 or transformed value 108 used to generate the perturbed value 112. For example, in some instances, a perturbed value 112 can include a quantized value (e.g., value that is scaled to a quantization scale and rounded to a nearest whole bit, etc.) that is represented in a quantized format or a pseudoquantized value (e.g., value that is scaled to a quantization scale and rounded to a value corresponding to the nearest whole bit, etc.) that is represented in a higher-precision format, such as a fullprecision format that is the same as a binary format of a corresponding value 104 or transformed value 108. Other implementations are possible. In some instances, a perturbed value 112 can include a rounded value, such as a value that has been rounded toward (e.g., to) a value of interest (e.g., nearest whole-bit value of a quantization format, mean of a plurality of values as described below with respect to Figure 2, etc.).
[0104] A denoising transformation 114 can include, for example, one or more operations, computer-executable instructions (e.g., operations or instructions to be performed by a denoising quantization system 102, etc.), or hardware, firmware, or software components configured to transform one or more perturbed values 112 into denoised values 116.
[0105] In some instances, a denoising transformation 114 can include a transformation operation (e.g., reconstruction operation, etc.) that removes some perturbation noise introduced by a perturbation 110 operation. For example, in some instances, a denoising transformation 114 can receive a plurality of respective perturbed values 112 and generate, based on the plurality of respective perturbed values 112, a plurality of respective denoised reconstruction values, where each denoised reconstruction value corresponds to a denoised approximation of a respective value 104 used to generate the perturbed values 112. In some instances, a denoising transformation 114 of a plurality of perturbed values 112 can include or be based on a ridge regression operation. In some instances, a denoising transformation 114 can include scaling or offsetting a perturbed value 112, such as scaling the perturbed value 112 based on a scaling factor determined according to a ridge regression operation; offsetting the scaled perturbed value 112 based on an offset value determined according to a ridge regression operation; or the like. In some instances, a ridge regression operation can be based at least in part on a regularization factor.
[0106] In some instances, a denoising transformation 114 can include mapping a plurality of perturbed values 112 to a plurality of corresponding denoised values 116 based at
least in part on a regularized reconstruction loss (e.g., regularized L2 reconstruction loss, etc.), such as based on a mapping that reduces (e.g., minimizes, nearly minimizes, reduces compared to an inverse transformation 106 or a reconstruction that minimizes unregularized reconstruction loss, etc.) the regularized reconstruction loss. In some instances, a regularized reconstruction loss can include a loss comprising a first loss component corresponding to an unregularized reconstruction loss (e.g., standard reconstruction loss such as L2 reconstruction loss, etc.) and a second loss component corresponding to a regularization loss. In some instances, a regularization loss can include a loss function that penalizes a scaling factor associated with a denoised transformation 114 (e.g., penalizes scaling factors having a large absolute value, rewards scaling factors having a small absolute value, encourages or causes a computing system to select a scaling factor with a smaller absolute value relative to an unregularized reconstruction loss, etc.). For example, in some instances, a denoised transformation can include a mapping from perturbed values 112 to denoised values 116 based at least in part on a scaling factor, such as x' = aq + b, where q can be a plurality (e.g., vector, matrix, tensor, etc.) of perturbed values 112 (e.g., scaled and rounded quantization values, etc.); x'can be a plurality (e.g., vector, matrix, tensor, etc.) of denoised values 116 reconstructed based on the plurality of perturbed values 112; a can be a scaling factor (e.g., a constant scaling factor, etc.); and b can be an offset value (e.g., constant offset value, etc.). In some instances, a regularization loss can include a loss value that penalizes the scaling factor a such as a loss value that is higher for higher values of a. [0107] As a non-limiting illustrative example, in some instances, a denoised transformation 114 can include scaling a plurality of perturbed values 112 based on a scaling factor a and offset Z>, wherein the values of a and b are determined based at least in part on a regularized loss function such as
where N is a number of values 104 of a plurality of values 104 associated with a denoising quantization 102 operation and is a regularization parameter. Other regularized reconstruction losses are possible. In some instances, a scaling factor a that can minimize the above regularized reconstruction loss can include
where Covxq can be a covariance between x and q, and Varq can be a variance of q. In such instances, an offset value b that can minimize such a regularized reconstruction loss can include b = x — aq where x and q can be means of x and q respectively (e.g., mean values 104 and mean perturbed values 112 generated based on the values 104, etc.). Other regularized reconstruction losses and other denoising transformations 114 are possible.
[0108] In some instances, a denoising transformation 114 can include scaling a perturbed value 112 based on a first scaling factor that is smaller (e.g., has a smaller absolute value, etc.) than an inverse of a second scaling factor associated with a transformation 106. In some instances, a first scaling factor used to scale a perturbed value 112 during a denoising transformation 114 can be determined based on a regularization factor. A regularization factor can include, for example, a value (e.g., constant value, variable value, percentage value, etc.) for determining a first scaling factor that is smaller than an inverse of the second scaling factor associated with the transformation 106, such as a percentage value (e.g., value less than one) to multiply by the inverse of the second scaling factor; a denominator adjustment value to add to a denominator of a ratio for determining the first scaling factor; or other regularization factor. For example, although the above equations describe one method for determining a scaling factor by adjusting a denominator (e.g., denominator of a covariance-to-variance ratio, etc.) based on a regularization factor, other adjustments based on a regularization factor are possible (e.g., numerator adjustment, multiplying by a constant or variable multiplicative adjustment value, etc.) without deviating from the scope of the present disclosure.
[0109] In some instances, denoising transformations 114 can enhance a robustness of quantized neural networks compared to some alternative implementations, such as alternative implementations comprising reconstructions that merely perform an inverse of a first transformation (e.g., transformation 106, etc.) or implementations that minimize an unregularized reconstruction loss (e.g., L2 reconstruction loss). For example, in some instances, denoising transformations 114 according to some aspects of the present disclosure can be used in combination with standard (e.g., unmodified, etc.) machine learning training methods (e.g., gradient descent, Adam optimization, etc.) used for full-precision models, and can still effectively converge even when large perturbations 110 are present (e.g., due to low quantization precision, etc.). Counterintuitively, systems and methods according to some
aspects of the present disclosure increase an approximation error (e.g., average squared difference between value 104 and corresponding denoised value 116 generated from the value 104 according to a denoised quantization 102) associated with reconstructing a reconstructed value from a perturbed value 112 compared to some alternative implementations (e.g., implementations that minimize an unregularized L2 reconstruction error, etc.), but nevertheless improve convergence of machine learning training operations by reducing an impact of perturbation error, thereby improving the functioning of various technological fields, such as computing technology (e.g., machine learning technology, machine-learned model training technology, quantization technology, quantization-aware training technology, etc.).
[0110] In some instances, a denoised transformation 114 can be implemented using a plurality of operations that may be readily available in machine learning libraries. For example, in some instances, a denoising transformation 114 can include one or more operations comprising or corresponding to the code or pseudcode: def reconstruct^, x, axis, lmd=le-2):
# ridge regression
E_q2 = jnp.mean(q**2, axis=axis, keepdims=True) E q = jnp.mean(q, axis=axis, keepdims=True) E_qx = jnp.mean(q * x, axis=axis, keepdims=True) E x = jnp.mean(x, axis=axis, keepdims=True) Var q = E_q2 - E_q**2 Cov_qx = E_qx - E q * E x a = Cov_qx / (Var_q + Imd) # b = E_x - a * E_q return a * (q - E_q) + E_x # r = a * q + b Other implementations are possible.
[0111] In some instances, a denoising transformation 114 can include or correspond to regressing a reconstructed value toward a mean, such as a mean x of a plurality of values 104, based at least in part on a regularization parameter. In some instances, a denoising transformation 114 can include or correspond to reconstructing a denoised value 116 (e.g. reconstructing a denoised approximation of a value 104 used to generate a perturbed value 112, etc.) based on a reconstruction comprising a smooth component and a noisy component, wherein the noisy component is reduced according to a regularization parameter. In some instances, a smooth component can include a component that is unaffected by a perturbation 110, and a noisy component can include a component that is affected by a perturbation 110.
For example, in some instances, an example denoising transformation 114 operation can be written as
In some instances, x can be viewed as a smooth component of the above operation, and (q — q) can be a noisy component. In such instances, the noisy component can be reduced (e.g., compared to an unregularized reconstruction, etc.) based at least in part on a regularization parameter, such as based on the regularization parameter, a variance of a plurality of perturbed values 112, and a covariance between a plurality of values 104 and corresponding plurality of perturbed values 112 (e.g., based on a ratio of the covariance to a sum of the variance and the regularization factor, etc.). In some instances, the smooth component can be unmodified or unaffected by the regularization parameter. Other regularization parameters or regularization operations for reducing a magnitude of a noisy component of a reconstruction operation are possible.
[0112] In some instances, a regularization parameter can be adjusted (e.g., to ensure convergence of a machine learning training process, etc.). For example, in some instances, a value of a regularization parameter can act as a control knob, regulating the balance between signal and noise (e.g., balance between smooth component and noisy component, etc.) that enters the training process. In some instances, a larger regularization parameter can cause a training operation associated with a quantized model to converge, even in instances where no regularization or a smaller regularization parameter may diverge. For example, as a regularization parameter approaches infinity, a perturbation can approach complete suppression, thereby resulting in a mean value x serving as a fail-safe vector for the reconstruction of a plurality of values 104.
[0113] In some example experiments according to some aspects of the present disclosure, various regularization parameters X were tested, and small values such as 0.01 achieved good results in some instances (e.g., fast convergence, good trade-off between preserving the original signal and suppressing quantization noise, etc.).
[0114] In some instances, a value of a regularization parameter can be based in part on a precision of a binary quantization format. For example, in some instances, a maximum perturbation associated with a perturbation 110 operation can be equal to
meaning that a perturbation intensity can double with each reduction in bit precision, potentially leading to a substantially amplified impact on the training process at low precision. This heightened perturbation can in some instances disrupt a training operation (e.g., cause the training operation to diverge, etc.) at one or more lower precisions, even if the training operation succeeded at higher precision(s). Advantageously, systems and methods according to aspects of the present disclosure can adjust to any precision by adjusting a regularization factor associated with a denoising transformation 114. In some instances, a regularization factor can include a regularization factor that causes an influence of one or more perturbations 6 on a scaling factor a to be bounded. For example, in some instances, an impact of one or more perturbations 6 on a scaling factor a can be proportional to
1 K = - ,
Varn *1 + and a regularization factor A can include a regularization factor configured to establish an upper bound on K. AS another example, in some instances, a regularization factor can include a regularization factor configured to cause the equation
(Varq + A)a = Covxq to remain well-conditioned.
[0115] Denoised values 116 can generally include or otherwise represent various types of data, such as binary data representing one or more numerical values. In some instances, a denoised value 116 or plurality of denoised values 116 can have any data type described herein with respect to a value 104 or plurality of values 104. In some instances, a denoised value 116 can include a numerical value represented in a binary format that is the same as or different from a binary format of a value 104, transformed value 108, or perturbed value 112 used to generate the denoised value 116. For example, in some instances, a denoised value 116 can include a higher-precision (e.g., full-precision) denoised reconstruction of a quantization value associated with the perturbed value 112, wherein the denoised value 116 can be represented in a binary format that is the same as a binary format of a corresponding value 104 used to generate the denoised value 116, although this is not required. In some instances, a denoised value 116 can include a denoised transformed value, such as a denoised reconstructed value associated with a binary quantization format. For example, in some instances, a denoised value 116 can include a reconstructed value (e.g., rescaled value, remapped value, etc.) in a higher-precision format of a quantized or pseudoquantized value associated with a lower-precision format, wherein the reconstructed
value has been denoised (e.g., partially denoised) to remove perturbation noise associated with a perturbation 110 operation.
[0116] In some instances, one or more denoising transformations 114 can be performed on a blockwise basis, such as based on a covariance or variance associated with a plurality of values 104 and perturbed values 112 associated with a portion of a layer of a machine-learned model. For example, in some instances, a layer of a large machine-learned model having a large number of parameters (e.g., billions or trillions of total parameters; thousands, tens of thousands, or more parameters per layer; etc.) can be split into a plurality of blocks, such as a plurality of blocks having 32 parameters per block; 128 parameters per block; 512 parameters per block; or other block size. In some instances, each block of perturbed values 112 can be generated based on separate scaling factors, offset values, and the like. In some instances, a denoising transformation 114 for a block of values (e.g.,. block of weights of a machine-learned model, block of activations, etc.; block of 32, 128, 512, or another number of perturbed values 112; etc.) can be based at least in part on one or more of a block-specific mean of the block of perturbed values 112; a block-specific mean of a block of values 104 used to generate the block of perturbed values 112; a block-specific covariance between the block of perturbed values 112 and the block of values 104 used to generate the block of perturbed values 112; a block-specific variance of the block of perturbed values 112; a regularization parameter, which may be similar to (e.g., same as) or different from a regularization parameter associated with another block (e.g., a common regularization constant used for all blocks, etc.); a block-specific scaling factor determined based on one or more of the above, or based on a block-specific ridge regression operation; a block-specific offset value determined based on one or more of the above, or based on a block-specific ridge regression operation; or other block-specific value.
[0117] In some instances, a regularization parameter can include a constant value or a variable value that may be different under different circumstances. As a non-limiting illustrative example, a regularization parameter can in some instances include a timevarying value, such as a value that increases or decreases every N training iterations or N training epochs, where N can be a positive integer. As another example, a regularization parameter can in some instances be varied based on training data indicative of convergence or divergence of a machine learning training operation (e.g., increased based on data indicating divergence at a lower regularization parameter value, etc.). Other examples are possible.
[0118] In some instances, one or more operations or components of a denoising quantization 102 as depicted in Figure 1 can be adapted, rearranged, expanded, omitted, combined, or modified in various ways without deviating from the scope of the present disclosure. For example, in some instances, a transformation 106 can be omitted (e.g., in connection with a sparsification operation for training a sparse machine-learned model, etc.), and a perturbation 110 and denoising transformation 114 can be performed on one or more values 104. Other examples are possible. Further details of an example system for performing denoised perturbation without an initial transformation 106 (e.g., denoising sparsification, etc.) are provided below with respect to Figure 2.
[0119] Figure 2 is a block diagram of an example system for denoised perturbation of numerical values according to example implementation of aspects of the present disclosure. A denoising perturbation system 202 can obtain one or more values 104. The denoising perturbation system 202 can perform a perturbation 206 on the value(s) 104 to generate one or more perturbed values 208. The denoising perturbation system 202 can perform a denoising 214 operation on the perturbed value(s) 208 to generate one or more denoised values 216.
[0120] In some instances, a denoising perturbation system 202 can be, comprise, be comprised by, or otherwise share one or more properties with a denoising quantization system 102. For example, in some instances, a denoising perturbation system 202 can have any property described herein with respect to a denoising quantization system 102, and vice versa. In some instances, a denoising perturbation system 202 can be or include one or more software, firmware, or hardware components configured to perform one or more denoising perturbation operations, such as operations that may not include an initial transformation 106 (e.g., scaling, etc.).
[0121] In some instances, a perturbation 210 can be, comprise, be comprised by, or otherwise share one or more properties with a perturbation 110. For example, in some instances, a perturbation 210 can have any property described herein with respect to a perturbation 110, and vice versa.
[0122] In some instances, a perturbation 210 can include a rounding toward (e.g., to, etc.) a value of interest, such as a mean of a plurality of values 104 (e.g., block of values 104 associated with a portion of a layer of a machine-learned model, etc.). For example, in some instances, a perturbation 210 of a plurality of values 104 can include a sparsification operation in which one or more values 104 of a plurality of values 104 are rounded toward (e.g., to, etc.) a mean of the plurality of values 104 (e.g., based on one or more thresholds,
etc.). For example, in some instances, a threshold distance (e.g., global minimum distance, local or blockwise minimum distance, minimum absolute or unsigned distance, minimum positive distance or signed distance, etc.) from the mean can be identified, and values 104 having a distance from the mean that is less than the distance threshold can be perturbed toward (e.g., to, etc.) the mean. As another example, in some instances, a sparsification target can be identified (e.g., percentage sparsification target such as 25 percent sparse, 50 percent sparse, 75 percent, 90 percent sparse, 95 percent sparse, 99 percent sparse, etc.), and values 104 can be perturbed based on the sparsification target. As a non-limiting illustrative example, if a sparsification target is 90 percent, a perturbation 110 of a plurality of values 104 can include perturbing, toward (e.g., to, etc.) a mean of a plurality of values 104, the closest 90 percent of values 104 that are closest to the mean, and leaving the other 10 percent of values unchanged. Other implementations are possible. In some instances, a sparsification target can include a global or local (e.g., blockwise, etc.) sparsification target, and a closest N percent of values can include N percent of a global (e.g., across an entire machine-learned model, entire layer, etc.) or local (e.g., blockwise, etc.) plurality of values 104.
[0123] In some instances, a perturbation 210 can include a blockwise perturbation 210 of a block of values 104 associated with a portion of a layer of a machine-learned model, such as weights of a 32-parameter, 128-parameter, 512-parameter, or other-size block of weights, etc. For example, in some instances, a plurality of respective blocks of values 104 can each be associated with a respective mean of the respective block of values 104; a threshold (e.g., distance threshold, sparsification target, etc.) that is the same as or different from a threshold of one or more other respective blocks of values; or the like. In some instances, performing a blockwise perturbation 210 can include perturbing (e.g., rounding, etc.) values 104 within a block of values 104 based on a block-specific mean and one or more thresholds (e.g., block-specific thresholds, global thresholds, etc.).
[0124] In some instances, a denoising transformation 214 can be, comprise, be comprised by, or otherwise share one or more properties with a denoising transformation 114. For example, in some instances, a denoising transformation 214 can have any property described herein with respect to a denoising transformation 114, and vice versa. For example, in some instances, a denoising transformation 214 can be performed in any manner described above with respect to a denoising transformation 114, such as using ridge regression; based on one or more of a scaling factor, offset value (e.g., scaling factor or offset value determined based on one or more of ridge regression, regularization parameter, variance, covariance, regularized reconstruction loss, or the like), regularization parameter, variance, covariance,
regularized reconstruction loss, smooth and noisy reconstruction components, or the like. In some instances, a denoising transformation 214 can be performed using or based on one or more operations (e.g., computer-executable instructions, code, pseudocode, equation, etc.) that are the same as or different from an operation described with respect to a denoising transformation 114; or the like. In some instances, a denoising transformation 214 can correspond to a denoising transformation 114 performed after a transformation 106 based on a scaling factor of 1.0 and an offset value of zero (i.e., an identity transformation 106), and any reference to a transformation 106 or property thereof in relation to a denoising transformation 114 can be applied to a denoising transformation 214 accordingly. In some instances, a regularization loss associated with a regularized reconstruction loss can include a loss function configured to penalize noise introduced by perturbations 210 or otherwise reduce an amount of noise introduced by perturbations 210 when a denoising transformation 214 is performed based on the regularized reconstruction loss.
[0125] In some instances, a regularization parameter associated with a denoising transformation 214 can be the same as or different from a regularization parameter associated with a denoising transformation 114 (e.g., regularization parameter value described above with respect to Figure 1). For example, in some example experiments according to aspects of the present disclosure, example machine-learned models were sparsified according to a sparsification training process comprising denoising perturbations 202 with regularization parameters as low as zero (e.g., without regularization in some instances), and the training process in some instances converged even with a regularization parameter equal to zero. However, in instances where perturbations 210 may lead to training divergence, a nonzero regularization parameter can be used to reduce an amount of noise introduced by the perturbation 210, thereby enabling convergence of a training operation in some instances, thereby improving the functioning of a computing system or other technology (e.g., machine learning training technology, sparsification technology, etc.).
[0126] In some instances, a perturbed value 212 or denoised value 216 can be, comprise, be comprised by, or otherwise share one or more properties with a perturbed value 112 or denoised value 116 respectively. For example, in some instances, a perturbed value 212 can have any property described herein with respect to a perturbed value 112, and vice versa. As another example, in some instances, a denoised value 216 can have any property described herein with respect to a denoised value 116, and vice versa.
[0127] Figures 3A and 3B are block diagrams of two example systems for denoised matrix multiplication according to example implementation of aspects of the present
disclosure. In some instances, the respective systems of Figures 3 A and 3B can perform the same operation(s) in alternate orders, and can in some instances arrive at equivalent results. In some instances, the system of Figure 3B can be used in combination with quantized matrix multiplication (e.g., using a binary quantization format having reduced precision compared to a binary format of one or more values 104, etc.), which can in some instances reduce a computational cost (e.g., processor usage cost in instances where low-precision multiplications may require reduced processor usage compared to high-precision multiplications, etc.) of matrix multiplication. However, the systems of both Figures 3 A and 3B can lead to equivalent results, such as equivalent machine-learning training results, equivalent quantized machine-learned models, equivalent sparsified machine-learned models, equivalent inference performance (e.g., computational cost, output quality, inference accuracy, etc.) of trained machine-learned models, or other equivalent results, and either approach can be used without deviating from the scope of the present disclosure.
[0128] Figure 3A is a block diagram of an example system for denoised matrix multiplication according to example implementation of aspects of the present disclosure. A computing system comprising one or more computing devices can perform a matrix multiplication 322 on a first matrix and a second matrix, wherein one or both of the first matrix and second matrix comprises denoised values 316, thereby generating one or more denoised matrix products 326. For example, in some instances, matrix multiplication 322 can include a matrix multiplication between a first matrix comprising one or more weights of a machine-learned model (e.g., quantized weights generated according to a denoised quantization 102, full-precision weights, etc.) and a second matrix comprising one or more activations of the machine-learned model (e.g., quantized activations generated according to a denoised quantization 102, full-precision activations, etc.).
[0129] In some instances, a value 304 can be, comprise, be comprised by, or otherwise share one or more properties with a value 104. For example, in some instances, a value 304 can have any property described herein with respect to a value 104, and vice versa. In some instances, values 304 can include unmodified values associated with a machine- learned model, such as full-precision unquantized activations to be multiplied by quantized weights; full-precision unquantized weights to be multiplied by quantized activations; or other unmodified value 304.
[0130] In some instances, a denoised value 316 can be, comprise, be comprised by, or otherwise share one or more properties with a denoised value 116, 216. For example, in some instances, a denoised value 316 can have any property described herein with respect to a
denoised value 116, 216, and vice versa. In some instances, a denoised value 316 can be generated or determined according to any method or using any system described herein with respect to generating or determining a denoised value 116, 216. For example, in some instances, a plurality of denoised values 316 can include a plurality of quantized weights of a machine-learned model determined according to a denoised quantization 102; a plurality of quantized activations of a machine-learned model determined according to a denoised quantization 102; a plurality of sparsified weights of a machine-learned model determined according to a denoised perturbation 202; a plurality of weights that have been both quantized and sparsified (e.g., according to a denoised perturbation 202 followed by a denoised quantization 102, etc.); or the like. In some instances, a plurality of denoised values 316 (e.g., quantized weights, etc.) can be multiplied by a second plurality of denoised values 316 (e.g., quantized activations, etc.) or can be multiplied by a plurality of values 304 (e.g., raw fullprecision weights or activations, etc.) that may not have been determined according to a denoising transformation 114, 214.
[0131] A matrix multiplication 322 can include, for example, any matrix multiplication method for multiplying a first matrix and a second matrix (e.g., onedimensional, two-dimensional, three- or more-dimensional matrix, etc.). In some instances, a matrix multiplication 322 can be performed using blockwise quantization. For example, in some instances, sub-channel quantization can be applied to a matrix multiplication of a plurality of weights and a plurality of activation values by reshaping a last dimension of a plurality of activations X and a first dimension of a plurality of weights W, effectively splitting vectors along the contraction dimension into smaller, manageable chunks.
[0132] Quantizing each chunk independently can in some instances lead to a higher overall approximation quality than quantizing an entire vector or matrix at once. This finer- grained approach can reduce perturbation, resulting in a more stable model. In some instances, quantizing each block independently can result in a “fail-safe” backbone model (e.g., obtained as —> co), which can in some instances be visualized as a piecewise constant function, where each piece is represented by its mean value. This can be akin to lowering a granularity of the original model, effectively providing a trainable backbone with reduced complexity. This sub-channel quantization approach can in some instances permit low- precision block-wise calculation of the expensive matrix multiplication, followed by summation of partial results, and can in some instances be implemented through batch matrix multiplication, drastically reducing the overall computational burden of a matrix multiplication 322 in some instances. Although Figure 3 A and the below reference code or
pseudocode depicts performing matrix multiplication 322 on higher-precision denoised values 316 (e.g., “fake quantization” values in the reference code) for clarity, the same result can be achieved using true quantization and match matrix multiplication to achieve performance gains (e.g., as depicted in Figure 3B below, etc.).
[0133] In some instances, a matrix multiplication can be implemented using one or more machine learning libraries or other components (e.g., software, firmware, or hardware components such as application-specific integrated circuits configured to perform tensor multiplication, packages or libraries for mathematical operations, etc.) for performing efficient (e.g., fast, at low computational cost, etc.) matrix multiplication operations. For example, in some instances, a matrix multiplication 322 between a first matrix of denoised values 316 and a second matrix of denoised values 316 can be performed according to the code or pseudocode below (based on a jax.numpy library), wherein the first matrix comprises quantized activations determined according to a denoised quantization 202, and the second matrix comprises quantized weights determined according to a denoised quantization 202: def fake_quant(x, bits, axis, lambda_): q = quantize(x, bits, axis=axis) return reconstruct^, x, axis=axis, lambda_=lambda_) def quantized_matmul(x, w, bits=4, lambda_=le-2, block=128): r_x=fake_quant(x.reshape(-l, block), bits=bits, axis=l,
1 amb da_=l amb da_) . reshape(x .shape) r_w=fake_quant(w.reshape(-l, block, w.shape[-l]), bits=bits, axis=l,
1 amb da_=l amb da_) . reshape(w. shap e) return j np . dot(r_x, r_w)
[0134] In the example code or pseudocode, the terms “quantize” and “reconstruct” can refer, for example, to code or pseudocode functions described above with respect to one or more of a transformation 106, perturbation 110, and denoised transformation 114.
[0135] A denoised matrix product 326 can include, for example, a matrix multiplication result (e.g., output, etc.) corresponding to a denoised approximation of a matrix multiplication associated with one or more values 304 that have been transformed according to one or more operations (e.g., transformation 106, perturbation 110, 210, denoised transformation 114, 214, etc.) described herein. For example, in some instances, a denoised matrix product 326 can include an output of a matrix multiplication 322 wherein one or more inputs of the matrix multiplication 322 comprise denoised values 316. However, other implementations are possible. For example, Figure 3B below depicts an example
system wherein a denoised matrix product 326 can be generated by performing a matrix multiplication 322 comprising a plurality of perturbed values 312 to generate a matrix product 324, and then performing a denoising transformation 314 on the matrix product 324 to generate a denoised matrix product 326. Other examples are possible.
[0136] Figure 3B is a block diagram of an example system for denoised matrix multiplication according to example implementation of aspects of the present disclosure. A computing system comprising one or more computing devices can perform a matrix multiplication 322 on a first matrix and a second matrix to generate one or more matrix products 324, wherein one or both of the first matrix and second matrix comprises perturbed values 312. The computing system can further perform a denoising transformation 314 on the matrix product(s) 324 to generate one or more denoised matrix products 326.
[0137] Although Figure 3A and the accompanying reference code or pseudocode depicts performing matrix multiplication 322 on higher-precision denoised values 316 (e.g., “fake quantization” values in the reference code) for clarity, the same result can be achieved by performing a denoised transformation 314 on one or more matrix products 324, such as by using true quantization and match matrix multiplication, which can in some instances achieve performance gains compared to some alternative implementations.
[0138] In some instances, a perturbed value 312 can be, comprise, be comprised by, or otherwise share one or more properties with a perturbed value 112, 212. For example, in some instances, a perturbed value 312 can have any property described herein with respect to a perturbed value 112, 212, and vice versa.
[0139] In some instances, a denoising transformation 314 can be, comprise, be comprised by, or otherwise share one or more properties with a denoising transformation 114, 214. For example, in some instances, a denoising transformation 314 can have any property described herein with respect to a denoising transformation 114, 214, and vice versa.
[0140] A matrix product 324 can include, for example, one or more results of a matrix multiplication 322 comprising input value(s) 304, 312 that have not undergone a denoising transformation, such as perturbed values 112, 212, 312 that have been generated according to one or more transformation 106 or perturbation 110 operations, etc.
[0141] In some instances, matrix product(s) 324 can include a single matrix multiplication result (e.g., output matrix, etc.) or a plurality of results (e.g., intermediate products, etc.). For example, in some instances, matrix product(s) 324 can include a plurality of intermediate results (e.g., blockwise or global intermediate results, etc.) to facilitate performing a denoising transformation 314 to generate a denoised matrix product 326 based
on the results. For example, in some instances, a matrix multiplication between a first matrix W comprising quantized weight values of the form awqw + bw and a second matrix X comprising quantized activation values of the form axqx + bx can be written as
^nxo ^nxi ’ ixo
where © can refer to a Hadamard (element-wise) dot product, • can refer to a regular dot product, a can refer to one or more scaling factors (e.g., global constant scaling factor, piecewise or blockwise constant scaling factors, etc.), b can refer to one or more offset values, 1 can refer to a matrix in which every entry is one, Q can refer to a plurality of quantized weight or activation values (e.g., perturbed values 312 represented in a quantized binary format, etc.), each subscript can refer to one or more dimensions (e.g., length, width, etc.) of each matrix described, and each superscript can indicate whether the value(s) are related to quantized weights W or quantized activations X. As an illustrative example, a xl can refer to an n X 1 matrix of one or more scaling factors a (e.g., global constant scaling factor, piecewise or blockwise constant scaling factors, etc.) associated with the quantized activation values X;
can refer to an n x i matrix of quantized activation values X, and so on.
[0142] In some instances, matrix product(s) 324 can include one or more intermediate products for determining a denoised matrix product 326 based on one or more results of a quantized matrix multiplication comprising one or more perturbed values 312 (e.g., perturbed values 312 represented in a quantized binary format, etc.). For example, in some instances, matrix product(s) 324 can include one or more intermediate dot products described above, such as a dot product of a first matrix of quantized activation values (e.g., first matrix comprising quantized activation values of one block in a blockwise implementation, etc.) and a second matrix of quantized weight values (e.g., Q xi • Q o, etc.), and a denoising transformation 314 can include determining a denoised matrix product 326 based on the intermediate dot product(s) or other values (e.g., intermediate result values, perturbed values 312, values 304, etc.), such as in any manner described herein (e.g., according to the equation above, etc.).
[0143] For example, one or more intermediate products of a first block of quantized activation values and second block of quantized weight values can be determined, and the
intermediate product(s) can be scaled according to a first scaling factor associated with the quantized activation values and a second scaling factor associated with the quantized weight values (e.g., according to
etc- )- Continuing the example, one or more intermediate sums associated with a block of activation values (e.g., according to
etc.) or a block of weight values (e.g., according to
etc.) and the intermediate sum(s) can be scaled based on one or more corresponding scaling factors or offset values (e.g., according to b*xl ■ [(l xi • Q o)Oa^o] or [a^xlQ> Q^xi ■
• b xo + bnxi)- Continuing the example, one or more intermediate sums or counts can be determined (e.g., according to (l xi •
and the sum(s) or count(s) can be scaled according to a first offset value associated with the first block of quantized activation values and a second offset value associated with the second block of quantized weight values (e.g., according to
In some instances, the scaled intermediate results can then be combined (e.g., summed, etc.) to achieve one or more intermediate matrix products associated with the blocks of values, and the intermediate matrix products can be combined with intermediate matrix products from another block to generate a denoised matrix product 326. Other implementations are possible.
[0144] In some instances, performing matrix multiplications 322 using quantized values (e.g., as depicted in Figure 3B, etc.) can reduce a memory usage (e.g., memory footprint, memory bandwidth, etc.) compared to performing full-precision matrix multiplications 322. In some instances, the memory savings achieved can depend on the chosen block size B. For instance, when scaling factors and offset values a and b are stored as 16-bit floats, the storage of such values can result in an additional memory overhead of 32 bits per block. In such instances, an effective number of bits per element can be reduced to 32/B. In some instances, scaling factors and offset values can be stored at other precisions (e.g., 8-bit float, 32-bit float, etc.). For example, in some example experiments according to aspects of the present disclosure, storing scaling factors and offset values a and b as 8-bit floats delivered similar quality results compared to 16-bit floats. In some instances, a block size of 128 can be employed to maintain a storage overhead of less than one bit per quantized value, which can in some instances provide an advantageous trade-off between memory savings and model accuracy. Other block sizes can be used (e.g., larger block sizes to increase memory savings, smaller block sizes to improve model accuracy, etc.).
[0145] In some instances, quantized matrix multiplication 322 can be performed using general -purpose hardware components (e.g., central processing units, graphics
processing units, general purpose floating-point units or arithmetic units, etc.) or hardware components specially configured to perform quantized matrix multiplication. For example, in some instances, quantized matrix multiplication 322 can be performed using one or more processor devices or components thereof (e.g., matrix multiplication units, systolic arrays, etc.) configured to perform integer matrix multiplication in binary integer formats having a precision less than or equal to eight, such as int4 formats, int2 formats, or inti formats. In some instances, a precision of one or more quantized activations (e.g., 1 -bit precision, 2-bit precision, 4-bit precision, etc.) or quantized first-matrix values can be the same as or different from a precision (e.g., 1 -bit precision, 2-bit precision, 4-bit precision, etc.) of one or more quantized weights or quantized second-matrix values. In some instances, quantized matrix multiplication 322 can be performed using one or more processor devices or components thereof (e.g., matrix multiplication units, systolic arrays, etc.) configured to perform mixed- precision integer matrix multiplication of a first matrix having a first precision less than or equal to 8 bits, and a second matrix having a second precision less than or equal to 8 bits, wherein the second precision is different from the first precision.
[0146] Figure 4A is a block diagram of an example system for quantization-aware training of a machine-learned model based on quantized weights according to example implementation of aspects of the present disclosure. A quantization-aware training layer 428 comprising one or more layer weights 430 can receive one or more layer input activations 432. The quantization-aware training layer can perform a denoising quantization 402 on the layer weight(s) 430 to generate one or more denoised quantized weights 416. The quantization-aware training layer 428 can perform a matrix multiplication on the denoised quantized weight(s) 416 and the layer input activation(s) 432 to generate one or more denoised matrix products 426. The denoised matrix product(s) 426 can be processed with one or more activation functions 434 to generate one or more layer output activations 436.
[0147] In some instances, a denoising quantization 402 can be, comprise, be comprised by, or otherwise share one or more properties with a denoising quantization 102. For example, in some instances, a denoising quantization 402 can have any property described herein with respect to a denoising quantization 102, and vice versa. Although Figure 4A depicts the denoising quantization 402 as a component of the quantization-aware training layer 428, the denoising quantization 402 can in some instances be external to the quantization-aware training layer 428 without deviating from the scope of the present disclosure. As a non-limiting illustrative example, in some instances, a computing system can determine denoised quantized weights 416 or denoised quantized updates to the denoised
quantized weights 416, and the denoised quantized weights 416 can be stored as a component of the quantization-aware training layer 428 without necessarily performing a denoising quantization 402 at each forward pass. Other implementations are possible.
[0148] In some instances, a denoised quantized weight 416 can be, comprise, be comprised by, or otherwise share one or more properties with a denoised value 116. For example, in some instances, a denoised quantized weight 416 can have any property described herein with respect to a denoised value 116, and vice versa. In some instances, a denoised quantized weight 416 can include a weight 430 of a machine-learned model that has undergone a denoising quantization 102, 402 (e.g., according to methods described with respect to Figure 1, etc.). In some instances, the denoised quantized weights 416 can include values that are stored at a higher precision (e.g., 32-bit precision, 64-bit precision, 8- or 16-bit precision, etc.) than a precision associated with a binary quantization format in which the weights 416, 430 are to be quantized after a training process, such as in a full-precision binary format that is similar to (e.g., same as) a binary format used to store unquantized layer weights 430.
[0149] In some instances, denoised quantized weights 416 can include weights that have been quantized on a blockwise basis, such as weights associated with a plurality of blocks of 32 weights, 128 weights, 512 weights, or another number of weights per block. In some instances, denoised quantized weights 416 can be stored in a quantized format, such as in a binary quantization format on which a denoising quantization 402 was based or a binary quantization format to be used in a quantized machine-learned model generated according to systems and methods described herein with respect to Figures 4 A and 4B. In some instances, a plurality of scaling factors or offset values associated with the plurality of blocks can be stored (e.g., in 8-bit floating-point, 16-bit floating-point, or other binary format), and a denoising transformation 114 can be performed based on the scaling or offset values (e.g., before or after a matrix multiplication 322, etc.). Other implementations are possible.
[0150] In some instances, a denoised matrix product 426 can be, comprise, be comprised by, or otherwise share one or more properties with a denoised matrix product 326. For example, in some instances, a denoised matrix product 426 can have any property described herein with respect to a denoised matrix product 326, and vice versa. For example, in some instances, a denoised matrix product 426 can be determined in any appropriate manner, such as in any manner described above with respect to Figure 3 A or 3B. For example, although Figure 4A depicts performing matrix multiplication on denoised quantized weight(s) 416 to generate a denoised matrix product 426, other orders of operation are
possible without deviating from the scope of the present disclosure, such as performing matrix multiplication 322 (e.g., quantized matrix multiplication, etc.) on perturbed values 312 (e.g., quantized weights that have not undergone a denoising transformation 314; quantized weights stored in a quantized format having a lower precision than a binary format of the layer weights 430; etc.) to generate one or more matrix products 324, and performing a denoising transformation 314 on the matrix product(s) 324 to generate one or more denoised matrix product(s) 426 (e.g., as described above with respect to Figure 3B, etc.).
[0151] A quantization-aware training layer 428 can include, for example, a layer of a machine learning model, such as a machine learning model that is to be trained to generate a lower-precision quantized machine-learned model. For example, in some instances, a quantization-aware training layer 428 can include a plurality of denoised quantized weights 416 or quantized weights (e.g., stored as perturbed values 312, etc.) that were generated from a trained (e.g., pretrained, fine-tuned, etc.) machine-learned model having higher-precision layer weights 430 (e.g., full-precision, 32-bit floating-point, etc.) compared to a quantization binary format associated with a quantized machine learning model to be trained according to example aspects of the present disclosure. However, in some instances, weights 416, 430 can include untrained weights, such as randomly initialized starting weights or the like. Although a “layer” of a machine learning model is depicted for the purposes of illustration and discussion, other groupings of weights (e.g., blocks of weights, portions of a layer, etc.) or components of a machine-learned model (e.g., parallel “heads” of a machine learning model, etc.) can be used without deviating from the scope of the present disclosure. In some instances, a quantization-aware training layer 428 can be a layer or other portion (e.g., head, etc.) of a machine learning model described herein, such as a quantization-aware training model 438 described below with respect to Figure 4B, or one or more machine-learning models described herein with respect to Figures 11 through 16.
[0152] Layer weights 430 can include, for example, parameters (e.g., weights of a fully connected layer, weights of a self-attention layer, etc.) of the quantization-aware training layer 428, such as unquantized (e.g., unmodified, etc.) weights of a trained (e.g., pretrained, fine-tuned, etc.) higher-precision (e.g., comprising higher-precision weights; configured to generate or receive higher-precision activation values, etc.) machine-learned model that is to be quantized to generate a corresponding lower-precision (e.g., comprising lower -precision weights; configured to generate or receive lower-precision activation values, etc.) machine-learned model; untrained high-precision or full-precision (e.g., 32-bit, etc.) weights; or the like. In some instances, parameters of a quantization-aware training layer 428
can include parameters that are to be multiplied (e.g., according to a matrix multiplication 322) by layer input activation(s) 432 in a machine learning inference operation.
[0153] A layer input activation 432 can include, for example, input value(s) provided to the quantization-aware training layer 428, such as input values received from (e.g., output values generated by, etc.) one or more previous quantization-aware training layers 428 (e.g., layer output activations 436 generated by a previous layer 428 according to an activation function 434 of the previous layer, etc.); initial input values received from a user, computing system, or other input provider; processed input values generated from initial input values (e.g., by tokenizing, mapping tokens to corresponding numerical layer input activations 432, etc.); or the like.
[0154] An activation transformation 434 can include, for example, any transformation for converting a denoised matrix product 426 into a layer output activation 436. In some instances, an activation transformation 434 can include a nonlinear transformation, such as a rectified linear unit (ReLU) activation, a sigmoidal (e.g., logistic, logit, etc.) transformation, or other nonlinear transformation.
[0155] A layer output activation 436 can include, for example, output value(s) to be output by the quantization-aware training layer 428, such as output values provided to a next quantization-aware training 428 (e.g., to be used by the next layer as layer input activations 432, etc.); output values to be provided to a user, computing system, or other output destination; or output values to be provided to a system for interfacing with a user, computing system, or other counterparty (e.g., application programming interface, user interface, etc.). [0156] Figure 4B is a block diagram of an example system for quantization-aware training of a machine-learned model based on quantized weights according to example implementation of aspects of the present disclosure. A quantization-aware training model 438 comprising a plurality of layers 428 can receive one or more inputs 440, which can be provided as input activation(s) 432a to a first layer 428a of the quantization-aware training model 438. Each layer 428 of the quantization-aware training model 438 can generate one or more layer outputs 436 based on layer input(s) received by the layer 428, and the layer output(s) 434 can be provided as layer input(s) 432 to a next layer of the quantization-aware training model 438, and an output layer 428d of the quantization-aware training model 438 can generate one or more outputs 442 of the quantization-aware training model 438. The output(s) 442 can be provided to a training system 444, which can provide one or more model updates 446 to the quantization-aware training model 438 based on the output(s) 442.
[0157] A quantization-aware training model 438 can include, for example, a machine learning model for training a quantized machine-learned model. In some instances, a quantization-aware training model 438 can include or be generated based on a trained (e.g., pretrained, fine-tuned, etc.) machine-learned model, such as a higher-precision machine- learned model to be quantized, or can include a model that was untrained (e.g., having randomly initialized parameters, etc.) before the training process of Figure 4B. For example, in some instances, a quantization-aware training model 438 can include a plurality of layers 428, with each layer 428 having or being initialized with (e.g., prior to a quantization-aware training process or quantized training process, etc.) a plurality of layer weights 430 associated with a trained machine-learned model to be quantized, or a plurality of denoised quantized weights 416 generated from weights of a trained machine-learned model to be quantized. [0158] In some instances, a quantization-aware training model 438 can include various model architectures, such as various neural network model architectures. An example model architecture for a quantization-aware training model 438 can include a sequence processing model architecture (e.g., a transformer model). For example, the quantization- aware training model 438 can be configured to receive an input sequence and generate an output sequence. For instance, the quantization-aware training model 438 can be configured to generate an output sequence where elements of the output sequence are predicted based on the elements of the input sequence. In some instances, a quantization-aware training model 438 can include a model architecture having an attention mechanism (e.g., self-attention). In some instances, the quantization-aware training model 438 can be a pre-trained model (e.g., pretrained using large-scale unsupervised learning). In some instances, the machine-learned model 108 can be fine-tuned over one or more fine-tuning datasets, such as a fine-tuning dataset associated with one or more specialized generation tasks.
[0159] An input 440 can generally include or otherwise represent various types of data. An input 440 can include one type or many different types of data. Example data types for an training input 210 can include, for example, any data type described below with respect to Figures 11-12 and inputs 2, such as language data (e.g., natural language data such as text or speech data, programming language data, etc.), sequence data (e.g., language sequence, time series, etc.), image data, audio data, video data, or another data type.
[0160] In some instances, an input 440 can be, comprise, be comprised by, or otherwise share one or more properties with layer input activation(s) 432, or values 104. For example, in some instances, an input 440 can have any property described herein with respect to layer input activation(s) 432 or values 104, and vice versa. In some instances, input(s) 440
can include unprocessed input (e.g., natural language input, etc.), such as input received from a user, and one or more layer input activations 432a to a first layer 428a can be generated from the input(s) 440.
[0161] An output 442 can generally include or otherwise represent various types of data. An output 442 210 can include one type or many different types of data. An output 442 can include one or more data types that are similar to (e.g., same as) or different from one or more data types of an input 440. Example data types for an output 442 can include, for example, any data type described below with respect to Figures 11-12 and outputs 3, such as language data (e.g., natural language data such as text or speech data, programming language data, etc.), sequence data (e.g., language sequence, time series, etc.), image data, audio data, video data, or another data type.
[0162] A training system 444 can be or include one or more software, firmware, or hardware components configured to determine update(s) 446 based on output(s) 442. In some instances, the training system 444 can be, comprise, be comprised by, or share one or more properties with a computing device or system described below with respect to Figures 17-19 (e.g., computing device 50, third-party system 80, computing device 98, computing device 99, etc.).
[0163] An update 446 can include, for example, a value (e.g., numerical value, etc.) for updating one or more parameters of the quantization-aware training model 438, an action for updating the quantization-aware training model 438, or the like. For example, in some instances, an update 446 value can include a numerical adjustment value to be combined with (e.g., added to, multiplied by, etc.) a parameter of the quantization-aware training model 438 to generate an updated parameter. In some instances, an update 446 can be determined based on an evaluation of an output 442, such as evaluation using a loss function, reward function, or other objective function. For example, in some instances, an output 442 can be compared to a ground truth output according to a loss function. In some instances, a gradient of an objective function with respect to one or more training outputs (e.g., mini -batch comprising a plurality of loss values associated with a plurality of outputs 442, etc.) can be determined, and the update(s) 446 can be determined based on one or more gradients (e.g., by multiplying the gradient by a constant or adaptive learning rate parameter, etc.). Further details of some example methods for updating a machine-learned model are provided below, such as with respect to Figures 10 and 15.
[0164] In some instances, determining an update can include backpropagating based on continuous or higher-precision (e.g., compared to a precision of a binary quantization
format, etc.) weight values, such as denoised quantized weights 416 stored in a full-precision binary format (e.g., 32-bit floating point, a format that is the same as a full-precision machine-learned model to be quantized, etc.). For example, a forward pass can include determining, at each of a plurality of layers, one or more layer output activations 436 generated based on one or more denoised matrix products 426. In some instances, the forward pass can be performed using quantized matrix multiplication 322 (e.g., using a 4-bit, 2-bit, or 1 -bit integer format, etc.) or unquantized matrix multiplication 322 (e.g., using a binary format used for matrix multiplications of an unquantized machine-learned model, etc.), and a denoising transformation 214 can be performed before or after the matrix multiplication 322. After determining an output 442 in a forward pass, the output 442 can be evaluated; one or more gradient(s) associated with one or more output(s) 442 can be determined; and one or more update(s) 446 can be determined based on the gradient(s) (e.g., according to standard backpropagation, according to an adaptive optimizer such as adaptive moment estimation (Adam) or its derivatives, etc.). In some instances, one or more of the output(s) 442, gradient(s), and updates can be determined based on one or more of denoised quantized weights 416 (e.g., denoised quantized weights 416 stored in a full-precision binary format, etc.), denoised matrix product(s) 426, layer output activation(s) 436 determined from denoised quantized weights 416 or denoised matrix products 426, or the like.
[0165] In some instances, after a plurality of quantized or quantization-aware training iterations, a fully quantized machine-learned model can be generated based on the quantization-aware training model 538. For example, a quantized machine-learned model can include a plurality of quantized weights (e.g., generated based on updated weights 416, 430, etc.) stored in a binary quantization format (e.g., 4-bit, 2-bit, or 1 -bit format, etc.), along with one or more scaling factors, offset values, or the like associated with the binary quantization format. For example, in some instances, a quantized machine-learned model can include a machine-learned model having weights that are quantized according to a blockwise quantization, wherein each block of 32, 128, 512, or another number of weights per block can be quantized according to a block-specific scaling factor, block-specific offset value, or the like.
[0166] In some example experiments, quantized machine-learned models trained according to example aspects of the present disclosure were compared to other machine- learned models quantized according to alternative methods. For example, quantized transformer models using 4-bit weights and 4-bit activations trained according to aspects of the present disclosure were compared to quantized transformer models using 4-bit weights
and 4-bit activations trained according to alternative methods. In the experiments, models trained according to aspects of the present disclosure outperformed models trained according to alternative methods, achieving BLEU scores more than two points higher than other training methods tested, without requiring any gradient estimation, pretraining, fine-tuning, calibration, or clipping. Additionally, in some experiments, 4-bit weight/4-bit activation ResNet-50 models trained according to aspects of the present disclosure achieved similar (e.g., slightly higher) top-1 accuracy on an image classification task compared to alternate 4- bit weight/4-bit activation ResNet-50 models, without requiring gradient estimation, pretraining, fine-tuning, calibration, or clipping. This is in contrast to alternative training methods, which generally required clipping, gradient estimation, and one or more of pretraining, fine-tuning, and calibration. In this manner, for instance, systems and methods according to example aspects of the present disclosure can improve the functioning of a computing system by providing flexible and reliable methods for training quantized machine- learned models at arbitrarily low precision, without requiring costly (e.g., high computational cost, etc.) or labor-intensive empirical tuning operations.
[0167] Figure 5 is a block diagram of an example system for quantization-aware training of a machine-learned model based on quantized activations according to example implementation of aspects of the present disclosure. A computing system can perform a denoising quantization 502 on or more layer input activation(s) 532 to generate denoised quantized activation(s) 516. The denoised quantized activation(s) 516 can be provided to a machine-learned model layer 548 comprising one or more layer weights 530. The machine- learned model layer 548 can perform a matrix multiplication 322 on the layer weight(s) 530 and denoised quantized activation(s) 516 to generate one or more denoised matrix products 526. The denoised matrix product(s) 526 can be processed with one or more activation functions 434 to generate one or more layer output activations 536.
[0168] In some instances, a denoising quantization 502, denoised quantized activations 516, layer weights 530, denoised matrix products 526, layer input activations 532, or layer output activation(s) 536 can be, comprise, be comprised by, or otherwise share one or more properties with one or more components described herein having a similar (e.g., same, etc.) name or part number. For example, in some instances, a denoising quantization 502, denoised quantized activations 516, layer weights 530, denoised matrix products 526, layer input activations 532, or layer output activation(s) 536 can have any property described herein with respect to one or more components described herein having a similar (e.g., same, etc.) name or part number, and vice versa.
[0169] In some instances, a machine-learned model comprising a plurality of machine-learned model layers 548 can be trained according to any method described herein with respect to Figures 4B and 10 through 19. For example, a training system 444 can perform a plurality of training iterations, wherein a machine-learned model comprising a plurality of layers 548 can generate one or more outputs 442 based on one or more inputs 440 at each training iteration, and a training system 444 can provide one or more updates 446 based on the output(s) at each training iteration.
[0170] In some instances, a machine-learned model layer 548 can be the same as or different from a quantization-aware training layer 538. For example, in some instances, a machine-learned model layer 548 can include a layer 548 for training a machine-learned model configured to generate or receive quantized (e.g., 4-bit, 2-bit, 1 -bit, etc.) activation values using unquantized (e.g., 32-bit, 16-bit, etc.) weights or quantized weights (e.g., 4-bit, 2-bit, 1 -bit, etc.). In some instances, a binary format for quantizing one or more weights of a layer 528, 548 can be the same as or different from a binary format for quantizing one or more activations associated with the same layer 528, 548. In some instances, a quantized machine-learned model having quantized weights and quantized activations can be trained in one combined process (e.g., wherein each training layer 528, 548 uses both denoised quantized activations 516 and denoised quantized weights 416, etc.), or in separate processes without deviating from the scope of the present disclosure.
[0171] In some experiments according to aspects of the present disclosure, activation precisions and weight precisions between 1 bit and 4 bits inclusive were tested, including activation precisions that were the same as or different from weight precisions of a same quantized machine-learned model. In the experiments, example training processes converged even for 1 -bit activations or 1 -bit weights. In the experiments, lower-precision formats were associated with greater savings in computational cost (e.g., memory footprint, memory bandwidth, etc.), while higher-precision formats were associated with somewhat better inference quality (e.g., accuracy, etc.) compared to lower-precision formats.
[0172] Figure 6 is a block diagram of an example system for sparsificati on-aware training of a machine-learned model according to example implementations of aspects of the present disclosure. One or more layer input activations 632 can be provided to a sparsification training layer 650 comprising one or more layer weights 630. The sparsification training layer can perform a denoising sparsification 602 on the layer weight(s) to generate one or more denoised sparsified weights 616. The sparsification training layer 650 can perform a matrix multiplication 322 on the denoised sparsified weight(s) 616 and the
layer input activation(s) 632 to generate one or more denoised matrix products 626. The sparsification layer 650 can perform one or more activation function 434 operations on the denoised matrix products 626 to generate one or more layer output activations 636.
[0173] In some instances, a denoising sparsification 602 can be, comprise, be comprised by, or otherwise share one or more properties with a denoising perturbation 202. For example, in some instances, a denoising sparsification 602 can have any property described herein with respect to a denoising perturbation 202, and vice versa. In some instances, a denoising sparsification 602 can include perturbing a plurality (e.g., layer, block, etc.) of weights toward (e.g., to) a mean of the plurality of weights (e.g., based on a threshold, such as a threshold sparseness percentage or threshold distance from the mean, etc.; using one or more systems or methods described herein with respect to Figure 2; etc.).
[0174] In some instances, a denoised sparsified weight 616 can be, comprise, be comprised by, or otherwise share one or more properties with a denoised value 216. For example, in some instances, a denoised sparsified weight 616 can have any property described herein with respect to a denoising denoised value 216, and vice versa.
[0175] In some instances, denoised sparsified weights 516 can be represented or stored in a sparse description format or another data format. For example, a sparse tensor (e.g., matrix, vector, etc.) of weights can be represented in a data structure specifying a location and value of every nonzero or non-mean weight 516 of the tensor, while zero-valued or mean-valued weights 516 may not be expressly represented. Other storage formats can be used without deviating from the scope of the present disclosure. For example, in some instances, denoised sparsified weights 516 can be represented or stored in a dense format during a training or sparsification process, and can be converted to a sparse format to generate a sparse machine-learned model to complete the training or sparsification process. [0176] In some instances, a structured sparsification can be performed, and the resulting values can be stored in a structured sparse format. As an example, in some instances, sparsification can be performed such that every block of N (e.g., 4, 8, 10, 20, etc.) weights comprises M (e.g., 1, 2, 3, etc.) non-zero or non-mean weights and (A — M) meanvalued or zero-valued weights, where N and M can be positive integers. For example, the (A — M) values in each block that are closest to zero or closest to a mean (e.g., mean of the block of N values; mean of a larger block comprising the N values such as a quantization block comprising 128 values; quantization mean associated with an offset value or scaling factor, etc.) can be perturbed to the mean, and each of the remaining M values can be stored in a quantized format, a full-precision format, or the like. In some instances, a structured
sparse format can include a tensor (e.g., matrix, vector, etc.) comprising one or more data entries for each block of N values, with the one or more data entries specifying one or more of: value(s) of the M non-zero weights of the block, location(s) (e.g., location within the block, etc.) of the M non-zero weights of the block, or other data. Other storage formats are possible.
[0177] In some instances, a layer weights 630, denoised matrix products 626, layer input activations 532, or layer output activation(s) 636 can be, comprise, be comprised by, or otherwise share one or more properties with one or more components described herein having a similar (e.g., same, etc.) name or part number. For example, in some instances, layer weights 630, denoised matrix products 626, layer input activations 632, or layer output activation(s) 636 can have any property described herein with respect to one or more components described herein having a similar (e.g., same, etc.) name or part number, and vice versa.
[0178] In some instances, a machine-learned model comprising a plurality of sparsification training layers 650 can be trained according to any method described herein with respect to Figures 4B and 10 through 19. For example, a training system 444 can perform a plurality of training iterations, wherein a machine-learned model comprising a plurality of layers 650 can generate one or more outputs 442 based on one or more inputs 440 at each training iteration, and a training system 444 can provide one or more updates 446 based on the output(s) at each training iteration.
[0179] In some instances, a sparsification training layer 650 can be the same as or different from a layer 548, 528. For example, in some instances, a sparsification training layer 650 can include a layer 650 for training a machine-learned model configured to generate or process quantized (e.g., 4-bit, 2-bit, 1-bit, etc.) or unquantized activation values using unquantized (e.g., 32-bit, 16-bit, etc.) sparsified weights or quantized sparsified weights (e.g., 4-bit, 2-bit, 1-bit, etc.). In some instances, a quantized and sparsified machine-learned model having sparse weights and quantized weights or activations can be trained in separate processes (e.g., sparsification first, followed by one or more quantization operations, etc.) or in one combined process without deviating from the scope of the present disclosure. For example, in some example experiments according to aspects of the present disclosure, sparsification was performed separately prior to quantization, as quantized weights can represent fewer distinct values (e.g., 2, 4, or 16 distinct values for 1-, 2-, or 4-bit representations in some instances, etc.) compared to full-precision weights, which can in some instances limit a granularity of sparsification processes, thereby making sparsification
before quantization potentially more well-defined or more effective in some instances. However, other implementations (e.g., simultaneous quantization and sparsification, etc.) may have other benefits (e.g., fewer training iterations for simultaneous training, etc.) and may be used without deviating from the scope of the present disclosure.
[0180] In some experiments according to example aspects of the present disclosure, sparsification at sparsities of 25 percent, 50 percent, 75 percent, and 90 percent (e.g., 90 percent of weights perturbed to a mean value, with 10 percent of weights having values other than the mean), using each of 32-bit floating-point unquantized precision; 4-bit quantized weights and activations; and 4-bit quantized activations with 1 -bit quantized weights. In the example experiments, greater sparsity levels and lower-precision quantizations generally led to increased computational cost savings (e.g., memory usage, memory footprint, etc.), while lower sparsity levels and higher-precision weights and activations led in some instances to higher quality inference outputs. In the experiments, sparsification methods according to example aspects of the present disclosure achieved better results (e.g., higher BLEU scores, etc.) compared to similar sparsity levels achieved using a multiplicative mask wsparse = wQl\w\>threshoid. Additionally, in an example experiment, structured sparsification with ternary weights according to aspects of the present disclosure (e.g., using 128-parameter quantization blocks and 4-parameter structured sparsification blocks, etc.) were tested, wherein sparse non-zero or non-mean weights were quantized to —1, 1 based on their sign or the sign of their difference from a mean. In the example experiments, higher levels of sparsity achieved reduced memory cost in bits per parameter (e.g., 0.5 bits per weight, etc.) compared to lower levels of sparsity and compared to dense 1 -bit quantization (1 bit per weight), with only a small reduction in BLEU scores.
[0181] In some instances, after a plurality of quantized or quantization-aware training iterations, a sparse machine-learned model can be generated. For example, a sparse machine- learned model can include a plurality of sparse weights (e.g., generated based on updated weights 416, 430, etc.) stored in a sparse binary format (structured sparse format, unstructured sparse format, etc.). In some instances, parameters of a sparse model can include parameters stored in a full-precision or high-precision format (e.g., 32-bit floating-point format, etc.), or parameters stored in a quantized or lower-precision format (e.g., 4-bit, 2 -bit, or 1 -bit quantized format, etc.).
Example Methods
[0182] Figure 7 depicts a flowchart diagram of an example method for training a quantized machine-learned model according to example embodiments of the present disclosure. Although Figure 7 depicts steps performed in a particular order for purposes of illustration and discussion, the methods of the present disclosure are not limited to the particularly illustrated order or arrangement. The various steps of example method 700 can be omitted, rearranged, combined, and/or adapted in various ways without deviating from the scope of the present disclosure.
[0183] At 702, example method 700 can include providing, by a computing system (e.g., training system 444, etc.) comprising one or more computing devices, one or more first training inputs (e.g., inputs 440, etc.) to a first machine-learned model (e.g., quantization- aware training model 438, etc.). In some instances, example method 700 at 702 can include using one or more systems or performing one or more activities described with respect to Figure 1 or Figures 3A through 5.
[0184] At 704, example method 700 can include scaling, by the computing system, a plurality of respective first values (e.g., layer weights 430, layer input activations 432, etc.) to generate a plurality of respective scaled values (e.g., transformed values 108, etc.), wherein the plurality of respective first values comprises one or more of a plurality of respective parameters of the first machine-learned model and a plurality of respective activation values, and wherein the plurality of respective first values is characterized by a first precision. In some instances, example method 700 at 704 can include using one or more systems or performing one or more activities described with respect to Figure 1 or Figures 3 A through 5. [0185] At 706, example method 700 can include perturbing, by the computing system based on a second precision that is lower than the first precision, the plurality of respective scaled values to generate a plurality of respective perturbed values (e.g., perturbed values 112, etc.). In some instances, example method 700 at 706 can include using one or more systems or performing one or more activities described with respect to Figure 1 or Figures 3 A through 5.
[0186] At 708, example method 700 can include performing, by the computing system, a first matrix multiplication (e.g., matrix multiplication 322, etc.) based at least in part on the plurality of respective perturbed values to generate one or more matrix products (e.g., matrix products 324, etc.). In some instances, example method 700 at 708 can include using one or more systems or performing one or more activities described with respect to Figure 1 or Figures 3A through 5.
[0187] At 710, example method 700 can include performing, by the computing system, a denoising transformation (e.g., denoising transformation 314, etc.) based at least in part on the one or more matrix products to generate a denoised approximation of a second matrix multiplication comprising the plurality of respective first values (e.g., denoised matrix product 326, etc.). In some instances, example method 700 at 710 can include using one or more systems or performing one or more activities described with respect to Figure 1 or Figures 3 A through 5.
[0188] At 712, example method 700 can include generating, by the computing system based at least in part on the denoised approximation, one or more first training outputs (e.g., outputs 442, etc.). In some instances, example method 700 at 712 can include using one or more systems or performing one or more activities described with respect to Figure 1 or Figures 3 A through 5.
[0189] At 714, example method 700 can include updating (e.g., according to one or more updates 446, etc.), by the computing system based at least in part on the one or more first training outputs, one or more parameters (e.g., layer weights 430, denoised quantized weights 416, etc.) of the first machine-learned model. In some instances, example method 700 at 714 can include using one or more systems or performing one or more activities described with respect to Figure 1 or Figures 3 A through 5.
[0190] Figure 8 depicts a flowchart diagram of an example method for training a quantized machine-learned model according to example embodiments of the present disclosure. Although Figure 8 depicts steps performed in a particular order for purposes of illustration and discussion, the methods of the present disclosure are not limited to the particularly illustrated order or arrangement. The various steps of example method 800 can be omitted, rearranged, combined, and/or adapted in various ways without deviating from the scope of the present disclosure.
[0191] At 802, example method 800 can include providing, by a computing system comprising one or more computing devices, one or more first training inputs to a first machine-learned model. In some instances, example method 800 at 802 can include using one or more systems or performing one or more activities described with respect to Figure 1 or Figures 3 A through 5.
[0192] At 804, example method 800 can include scaling, by the computing system, a plurality of respective first values to generate a plurality of respective scaled values, wherein the plurality of respective first values comprises one or more of a plurality of respective parameters of the first machine-learned model and a plurality of respective activation values,
and wherein the plurality of respective first values is characterized by a first precision. In some instances, example method 800 at 804 can include using one or more systems or performing one or more activities described with respect to Figure 1 or Figures 3 A through 5. [0193] At 806, example method 800 can include perturbing, by the computing system based on a second precision that is lower than the first precision, the plurality of respective scaled values to generate a plurality of respective perturbed values. In some instances, example method 800 at 806 can include using one or more systems or performing one or more activities described with respect to Figure 1 or Figures 3 A through 5.
[0194] At 808, example method 800 can include performing, by the computing system, a denoising transformation of the plurality of respective perturbed values to generate a plurality of respective denoised values. In some instances, example method 800 at 808 can include using one or more systems or performing one or more activities described with respect to Figure 1 or Figures 3 A through 5.
[0195] At 810, example method 800 can include performing, by the computing system, a first matrix multiplication based at least in part on the plurality of respective denoised values to generate a denoised approximation of a second matrix multiplication comprising the plurality of respective first values. In some instances, example method 800 at 810 can include using one or more systems or performing one or more activities described with respect to Figure 1 or Figures 3 A through 5.
[0196] At 812, example method 800 can include generating, by the computing system based at least in part on the denoised approximation, one or more first training outputs. In some instances, example method 800 at 812 can include using one or more systems or performing one or more activities described with respect to Figure 1 or Figures 3 A through 5. [0197] At 814, example method 800 can include updating, by the computing system based at least in part on the one or more first training outputs, one or more parameters of the first machine-learned model. In some instances, example method 800 at 814 can include using one or more systems or performing one or more activities described with respect to Figure 1 or Figures 3A through 5.
[0198] Figure 9 depicts a flowchart diagram of an example method for sparsification of a machine-learned model according to example embodiments of the present disclosure. Although Figure 9 depicts steps performed in a particular order for purposes of illustration and discussion, the methods of the present disclosure are not limited to the particularly illustrated order or arrangement. The various steps of example method 900 can be omitted,
rearranged, combined, and/or adapted in various ways without deviating from the scope of the present disclosure.
[0199] At 902, example method 900 can include providing, by a computing system comprising one or more computing devices, one or more first training inputs to a first machine-learned model. In some instances, example method 900 at 902 can include using one or more systems or performing one or more activities described with respect to Figures 2 through 3B, 4B, or 6.
[0200] At 904, example method 900 can include perturbing, by the computing system, a plurality of weights of the first machine-learned model toward a shared value (e.g., mean, etc.) to generate a second plurality of respective perturbed values (e.g., perturbed values 212, etc.). In some instances, example method 900 at 904 can include using one or more systems or performing one or more activities described with respect to Figure 2.
[0201] At 906, example method 900 can include performing, by the computing system, a first matrix multiplication based at least in part on the second plurality of respective perturbed values to generate one or more matrix products (e.g., matrix products 324, etc.). In some instances, example method 900 at 906 can include using one or more systems or performing one or more activities described with respect to Figures 2 through 3B, 4B, or 6.
[0202] At 908, example method 900 can include generating, by the computing system based at least in part on the one or more matrix products, one or more first training outputs (e.g., outputs 442, etc.). In some instances, example method 900 at 908 can include using one or more systems or performing one or more activities described with respect to Figures 2 through 3B, 4B, or 6.
[0203] At 910, example method 900 can include updating, by the computing system based at least in part on the one or more first training outputs, one or more parameters of the first machine-learned model. In some instances, example method 900 at 910 can include using one or more systems or performing one or more activities described with respect to Figures 2 through 3B, 4B, or 6.
[0204] At 912, example method 900 can include generating, by the computing system after the plurality of second training iterations based on the first machine-learned model or the second machine-learned model, a sparse machine-learned model comprising a plurality of shared-value weights having a shared value and a plurality of other weights having a value other than the shared value, wherein a number of weights of the plurality of shared-value weights is greater than 20 percent of a total number of weights of the sparse machine-learned
model. In some instances, example method 900 at 912 can include using one or more systems or performing one or more activities described with respect to Figures 2 through 3B, 4B, or 6. [0205] Figure 10 depicts a flowchart of a method 1000 for training one or more machine-learned models according to aspects of the present disclosure. For instance, an example machine-learned model can include a quantization-aware training model 438. [0206] One or more portion(s) of example method 1000 can be implemented by a computing system that includes one or more computing devices such as, for example, computing systems described with reference to the other figures. Each respective portion of example method 1000 can be performed by any (or any combination) of one or more computing devices. Moreover, one or more portion(s) of example method 1000 can be implemented on the hardware components of the device(s) described herein, for example, to train one or more systems or models. Figure 10 depicts elements performed in a particular order for purposes of illustration and discussion. Those of ordinary skill in the art, using the disclosures provided herein, will understand that the elements of any of the methods discussed herein can be adapted, rearranged, expanded, omitted, combined, or modified in various ways without deviating from the scope of the present disclosure. Figure 10 is described with reference to elements/terms described with respect to other systems and figures for exemplary illustrated purposes and is not meant to be limiting. One or more portions of example method 1000 can be performed additionally, or alternatively, by other systems.
[0207] At 1002, example method 1000 can include obtaining a training instance. A set of training data can include a plurality of training instances divided between multiple datasets (e.g., a training dataset, a validation dataset, or testing dataset). A training instance can be labeled or unlabeled. Although referred to in example method 1000 as a “training” instance, it is to be understood that runtime inferences can form training instances when a model is trained using an evaluation of the model’s performance on that runtime instance (e.g., online training/learning). Example data types for the training instance and various tasks associated therewith are described throughout the present disclosure.
[0208] At 1004, example method 1000 can include processing, using one or more machine-learned models, the training instance to generate an output. The output can be directly obtained from the one or more machine-learned models or can be a downstream result of a chain of processing operations that includes an output of the one or more machine- learned models.
[0209] At 1006, example method 1000 can include receiving an evaluation signal associated with the output. The evaluation signal can be obtained using a loss function. Various determinations of loss can be used, such as mean squared error, likelihood loss, cross entropy loss, hinge loss, contrastive loss, or various other loss functions. The evaluation signal can be computed using known ground-truth labels (e.g., supervised learning), predicted or estimated labels (e.g., semi- or self-supervised learning), or without labels (e.g., unsupervised learning). The evaluation signal can be a reward (e.g., for reinforcement learning). The reward can be computed using a machine-learned reward model configured to generate rewards based on output(s) received. The reward can be computed using feedback data describing human feedback on the output(s).
[0210] At 1008, example method 1000 can include updating the machine-learned model using the evaluation signal. For example, values for parameters of the machine-learned model(s) can be learned, in some embodiments, using various training or learning techniques, such as, for example, backwards propagation. For example, the evaluation signal can be backpropagated from the output (or another source of the evaluation signal) through the machine-learned model(s) to update one or more parameters of the model(s) (e.g., based on a gradient of the evaluation signal with respect to the parameter value(s)). For example, system(s) containing one or more machine-learned models can be trained in an end-to-end manner. Gradient descent techniques can be used to iteratively update the parameters over a number of training iterations. In some implementations, performing backwards propagation of errors can include performing truncated backpropagation through time. Example method 1000 can include implementing a number of generalization techniques (e.g., weight decays, dropouts, etc.) to improve the generalization capability of the models being trained.
[0211] In some implementations, example method 1000 can be implemented for training a machine-learned model from an initialized state to a fully trained state (e.g., when the model exhibits a desired performance profile, such as based on accuracy, precision, recall, etc.).
[0212] In some implementations, example method 1000 can be implemented for particular stages of a training procedure. For instance, in some implementations, example method 1000 can be implemented for pre-training a machine-learned model. Pre-training can include, for instance, large-scale training over potentially noisy data to achieve a broad base of performance levels across a variety of tasks/data types. In some implementations, example method 1000 can be implemented for fine-tuning a machine-learned model. Fine-tuning can include, for instance, smaller-scale training on higher-quality (e.g., labeled, curated, etc.)
data. Fine-tuning can affect all or a portion of the parameters of a machine-learned model. For example, various portions of the machine-learned model can be “frozen” for certain training stages. For example, parameters associated with an embedding space can be “frozen” during fine-tuning (e.g., to retain information learned from a broader domain(s) than present in the fine-tuning dataset(s)). An example fine-tuning approach includes reinforcement learning. Reinforcement learning can be based on user feedback on model performance during use.
Example Machine-Learned Models
[0213] Figure 11 is a block diagram of an example processing flow for using machine-learned model(s) 1 to process input(s) 2 to generate output(s) 3.
[0214] Machine-learned model(s) 1 can be or include one or multiple machine- learned models or model components. Example machine-learned models can include neural networks (e.g., deep neural networks). Example machine-learned models can include nonlinear models or linear models. Example machine-learned models can use other architectures in lieu of or in addition to neural networks. Example machine-learned models can include decision tree based models, support vector machines, hidden Markov models, Bayesian networks, linear regression models, k-means clustering models, etc.
[0215] Example neural networks can include feed-forward neural networks, recurrent neural networks (RNNs), including long short-term memory (LSTM) based recurrent neural networks, convolutional neural networks (CNNs), diffusion models, generative-adversarial networks, or other forms of neural networks. Example neural networks can be deep neural networks. Some example machine-learned models can leverage an attention mechanism such as self-attention. For example, some example machine-learned models can include multiheaded self-attention models.
[0216] Machine-learned model(s) 1 can include a single or multiple instances of the same model configured to operate on data from input(s) 2. Machine-learned model(s) 1 can include an ensemble of different models that can cooperatively interact to process data from input(s) 2. For example, machine-learned model(s) 1 can employ a mixture-of-experts structure. See, e.g., Zhou et al., Mixture-of-Experts with Expert Choice Routing, ARXIV:2202.09368V2 (Oct. 14, 2022).
[0217] Input(s) 2 can generally include or otherwise represent various types of data. Input(s) 2 can include one type or many different types of data. Output(s) 3 can be data of the
same type(s) or of different types of data as compared to input(s) 2. Output(s) 3 can include one type or many different types of data.
[0218] Example data types for input(s) 2 or output(s) 3 include natural language text data, software code data (e.g., source code, object code, machine code, or any other form of computer-readable instructions or programming languages), machine code data (e.g., binary code, assembly code, or other forms of machine-readable instructions that can be executed directly by a computer's central processing unit), assembly code data (e.g., low-level programming languages that use symbolic representations of machine code instructions to program a processing unit), genetic data or other chemical or biochemical data, image data, audio data, audiovisual data, haptic data, biometric data, medical data, financial data, statistical data, geographical data, astronomical data, historical data, sensor data generally (e.g., digital or analog values, such as voltage or other absolute or relative level measurement values from a real or artificial input, such as from an audio sensor, light sensor, displacement sensor, etc.), and the like. Data can be raw or processed and can be in any format or schema. [0219] In multimodal inputs 2 or outputs 3, example combinations of data types include image data and audio data, image data and natural language data, natural language data and software code data, image data and biometric data, sensor data and medical data, etc. It is to be understood that any combination of data types in an input 2 or an output 3 can be present.
[0220] An example input 2 can include one or multiple data types, such as the example data types noted above. An example output 3 can include one or multiple data types, such as the example data types noted above. The data type(s) of input 2 can be the same as or different from the data type(s) of output 3. It is to be understood that the example data types noted above are provided for illustrative purposes only. Data types contemplated within the scope of the present disclosure are not limited to those examples noted above.
Example Machine-Learned Sequence Processing Models
[0221] Figure 12 is a block diagram of an example implementation of an example machine-learned model configured to process sequences of information. For instance, an example implementation of machine-learned model(s) 1 can include machine-learned sequence processing model(s) 4. An example system can pass input(s) 2 to sequence processing model(s) 4. Sequence processing model(s) 4 can include one or more machine- learned components. Sequence processing model(s) 4 can process the data from input(s) 2 to obtain an input sequence 5. Input sequence 5 can include one or more input elements 5-1, 5-
2, . . . , 5-A , etc. obtained from input(s) 2. Sequence processing model 4 can process input sequence 5 using prediction layer(s) 6 to generate an output sequence 7. Output sequence 7 can include one or more output elements 7-1, 7-2, . . . , 7 -A, etc. generated based on input sequence 5. The system can generate output(s) 3 based on output sequence 7.
[0222] Sequence processing model(s) 4 can include one or multiple machine-learned model components configured to ingest, generate, or otherwise reason over sequences of information. For example, some example sequence processing models in the text domain are referred to as “Large Language Models,” or LLMs. See, e.g., PaLM 2 Technical Report, GOOGLE, https://ai.google/static/documents/palm2techreport.pdf (n.d.). Other example sequence processing models can operate in other domains, such as image domains, see, e.g., Dosovitskiy et al., An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale, ARXIV:2010.11929v2 (Jun. 3, 2021), audio domains, see, e.g., Agostinelli et al., MusicLM: Generating Music From Text, ARXIV:2301.1 1325V1 (Jan. 26, 2023), biochemical domains, see, e.g., Jumper et al., Highly accurate protein structure prediction with AlphaFold, 596 Nature 583 (Aug. 26, 2021), by way of example. Sequence processing model(s) 4 can process one or multiple types of data simultaneously. Sequence processing model(s) 4 can include relatively large models (e.g., more parameters, computationally expensive, etc.), relatively small models (e.g., fewer parameters, computationally lightweight, etc.), or both. [0223] In general, sequence processing model(s) 4 can obtain input sequence 5 using data from input(s) 2. For instance, input sequence 5 can include a representation of data from input(s) 2 in a format understood by sequence processing model(s) 4. One or more machine- learned components of sequence processing model(s) 4 can ingest the data from input(s) 2, parse the data into pieces compatible with the processing architectures of sequence processing model(s) 4 (e.g., via “tokenization”), and project the pieces into an input space associated with prediction layer(s) 6 (e.g., via “embedding”).
[0224] Sequence processing model(s) 4 can ingest the data from input(s) 2 and parse the data into a sequence of elements to obtain input sequence 5. For example, a portion of input data from input(s) 2 can be broken down into pieces that collectively represent the content of the portion of the input data. The pieces can provide the elements of the sequence. [0225] Elements 5-1, 5-2, . . . , 5-M can represent, in some cases, building blocks for capturing or expressing meaningful information in a particular data domain. For instance, the elements can describe “atomic units” across one or more domains. For example, for textual input source(s), the elements can correspond to groups of one or more words or sub-word components, such as sets of one or more characters.
[0226] For example, elements 5-1, 5-2, . . . , 5-M can represent tokens obtained using a tokenizer. For instance, a tokenizer can process a given portion of an input source and output a series of tokens (e.g., corresponding to input elements 5-1, 5-2, . . . , 5-A ) that represent the portion of the input source. Various approaches to tokenization can be used. For instance, textual input source(s) can be tokenized using a byte-pair encoding (BPE) technique. See, e.g., Kudo et al., SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processing, PROCEEDINGS OF THE 2018 CONFERENCE ON EMPIRICAL METHODS IN NATURAL LANGUAGE PROCESSING (System Demonstrations), pages 66-71 (October 31-November 4, 2018), https://aclanthology.org/D18-2012.pdf. Image-based input source(s) can be tokenized by extracting and serializing patches from an image.
[0227] In general, arbitrary data types can be serialized and processed into input sequence 5. It is to be understood that element(s) 5-1, 5-2, . . . , 5-M depicted in Figure 12 can be the tokens or can be the embedded representations thereof.
[0228] Prediction layer(s) 6 can predict one or more output elements 7-1, 7-2, . . . , 7- N based on the input elements. Prediction layer(s) 6 can include one or more machine-learned model architectures, such as one or more layers of learned parameters that manipulate and transform the input(s) to extract higher-order meaning from, and relationships between, input element(s) 5-1, 5-2, . . . , 5-M. In this manner, for instance, example prediction layer(s) 6 can predict new output element(s) in view of the context provided by input sequence 5.
[0229] Prediction layer(s) 6 can evaluate associations between portions of input sequence 5 and a particular output element. These associations can inform a prediction of the likelihood that a particular output follows the input context. For example, consider the textual snippet, “The carpenter’s toolbox was small and heavy. It was full of .” Example prediction layer(s) 6 can identify that “It” refers back to “toolbox” by determining a relationship between the respective embeddings. Example prediction layer(s) 6 can also link “It” to the attributes of the toolbox, such as “small” and “heavy.” Based on these associations, prediction layer(s) 6 can, for instance, assign a higher probability to the word “nails” than to the word “sawdust.”
[0230] A transformer is an example architecture that can be used in prediction layer(s) 4. See, e.g., Vaswani et al., Attention Is All You Need, ARXIV: 1706.03762v7 (Aug. 2, 2023). A transformer is an example of a machine-learned model architecture that uses an attention mechanism to compute associations between items within a context window. The context window can include a sequence that contains input sequence 5 and potentially one or
more output element(s) 7-1, 7-2, . . . , 7-N. A transformer block can include one or more attention layer(s) and one or more post-attention layer(s) (e.g., feedforward layer(s), such as a multi-layer perceptron).
[0231] Prediction layer(s) 6 can include other machine-learned model architectures in addition to or in lieu of transformer-based architectures. For example, recurrent neural networks (RNNs) and long short-term memory (LSTM) models can also be used, as well as convolutional neural networks (CNNs). In general, prediction layer(s) 6 can leverage various kinds of artificial neural networks that can understand or generate sequences of information. [0232] Output sequence 7 can include or otherwise represent the same or different data types as input sequence 5. For instance, input sequence 5 can represent textual data, and output sequence 7 can represent textual data. Input sequence 5 can represent image, audio, or audiovisual data, and output sequence 7 can represent textual data (e.g., describing the image, audio, or audiovisual data). It is to be understood that prediction layer(s) 6, and any other interstitial model components of sequence processing model(s) 4, can be configured to receive a variety of data types in input sequence(s) 5 and output a variety of data types in output sequence(s) 7.
[0233] Output sequence 7 can have various relationships to input sequence 5. Output sequence 7 can be a continuation of input sequence 5. Output sequence 7 can be complementary to input sequence 5. Output sequence 7 can translate, transform, augment, or otherwise modify input sequence 5. Output sequence 7 can answer, evaluate, confirm, or otherwise respond to input sequence 5. Output sequence 7 can implement (or describe instructions for implementing) an instruction provided via input sequence 5.
[0234] Output sequence 7 can be generated autoregressively. For instance, for some applications, an output of one or more prediction layer(s) 6 can be passed through one or more output layers (e.g., softmax layer) to obtain a probability distribution over an output vocabulary (e.g., a textual or symbolic vocabulary) conditioned on a set of input elements in a context window. In this manner, for instance, output sequence 7 can be autoregressively generated by sampling a likely next output element, adding that element to the context window, and re-generating the probability distribution based on the updated context window, and sampling a likely next output element, and so forth.
[0235] Output sequence 7 can also be generated non-autoregressively. For instance, multiple output elements of output sequence 7 can be predicted together without explicit sequential conditioning on each other. See, e.g., Saharia et al., Non-Autoregressive Machine Translation with Latent Alignments, ARXIV:2004.07437V3 (NOV. 16, 2020).
[0236] Output sequence 7 can include one or multiple portions or elements. In an example content generation configuration, output sequence 7 can include multiple elements corresponding to multiple portions of a generated output sequence (e.g., a textual sentence, values of a discretized waveform, computer code, etc.). In an example classification configuration, output sequence 7 can include a single element associated with a classification output. For instance, an output “vocabulary” can include a set of classes into which an input sequence is to be classified. For instance, a vision transformer block can pass latent state information to a multilayer perceptron that outputs a likely class value associated with an input image.
[0237] Figure 13 is a block diagram of an example technique for populating an example input sequence 8. Input sequence 8 can include various functional elements that form part of the model infrastructure, such as an element 8-0 obtained from a task indicator 9 that signals to any model(s) that process input sequence 8 that a particular task is being performed (e.g., to help adapt a performance of the model(s) to that particular task). Input sequence 8 can include various data elements from different data modalities. For instance, an input modality 10-1 can include one modality of data. A data-to- sequence model 11-1 can process data from input modality 10-1 to project the data into a format compatible with input sequence 8 (e.g., one or more vectors dimensioned according to the dimensions of input sequence 8) to obtain elements 8-1, 8-2, 8-3. Another input modality 10-2 can include a different modality of data. A data-to-sequence model 11-2 can project data from input modality 10-2 into a format compatible with input sequence 8 to obtain elements 8-4, 8-5, 8- 6. Another input modality 10-3 can include yet another different modality of data. A data-to- sequence model 11-3 can project data from input modality 10-3 into a format compatible with input sequence 8 to obtain elements 8-7, 8-8, 8-9.
[0238] Input sequence 8 can be the same as or different from input sequence 5. Input sequence 8 can be a multimodal input sequence that contains elements that represent data from different modalities using a common dimensional representation. For instance, an embedding space can have P dimensions. Input sequence 8 can be configured to contain a plurality of elements that have /J dimensions. In this manner, for instance, example implementations can facilitate information extraction and reasoning across diverse data modalities by projecting data into elements in the same embedding space for comparison, combination, or other computations therebetween.
[0239] For example, elements 8-0, . . . , 8-9 can indicate particular locations within a multidimensional embedding space. Some elements can map to a set of discrete locations in
the embedding space. For instance, elements that correspond to discrete members of a predetermined vocabulary of tokens can map to discrete locations in the embedding space that are associated with those tokens. Other elements can be continuously distributed across the embedding space. For instance, some data types can be broken down into continuously defined portions (e.g., image patches) that can be described using continuously distributed locations within the embedding space.
[0240] In some implementations, the expressive power of the embedding space may not be limited to meanings associated with any particular set of tokens or other building blocks. For example, a continuous embedding space can encode a spectrum of high-order information. An individual piece of information (e.g., a token) can map to a particular point in that space: for instance, a token for the word “dog” can be projected to an embedded value that points to a particular location in the embedding space associated with canine-related information. Similarly, an image patch of an image of a dog on grass can also be projected into the embedding space. In some implementations, the projection of the image of the dog can be similar to the projection of the word “dog” while also having similarity to a projection of the word “grass,” while potentially being different from both. In some implementations, the projection of the image patch may not exactly align with any single projection of a single word. In some implementations, the projection of the image patch can align with a combination of the projections of the words “dog” and “grass.” In this manner, for instance, a high-order embedding space can encode information that can be independent of data modalities in which the information is expressed.
[0241] Task indicator 9 can include a model or model component configured to identify a task being performed and inject, into input sequence 8, an input value represented by element 8-0 that signals which task is being performed. For instance, the input value can be provided as a data type associated with an input modality and projected along with that input modality (e.g., the input value can be a textual task label that is embedded along with other textual data in the input; the input value can be a pixel-based representation of a task that is embedded along with other image data in the input; etc.). The input value can be provided as a data type that differs from or is at least independent from other input(s). For instance, the input value represented by element 8-0 can be learned within a continuous embedding space.
[0242] Input modalities 10-1, 10-2, and 10-3 can be associated with various different data types (e.g., as described above with respect to input(s) 2 and output(s) 3).
[0243] Data-to-sequence models 11-1, 11-2, and 11-3 can be the same or different from each other. Data-to-sequence models 11-1, 11-2, and 11-3 can be adapted to each respective input modality 10-1, 10-2, and 10-3. For example, a textual data-to-sequence model can subdivide a portion of input text and project the subdivisions into element(s) in input sequence 8 (e.g., elements 8-1, 8-2, 8-3, etc.). An image data-to-sequence model can subdivide an input image and project the subdivisions into element(s) in input sequence 8 (e.g., elements 8-4, 8-5, 8-6, etc.). An arbitrary datatype data-to-sequence model can subdivide an input of that arbitrary datatype and project the subdivisions into element(s) in input sequence 8 (e.g., elements 8-7, 8-8, 8-9, etc.).
[0244] Data-to-sequence models 11-1, 11-2, and 11-3 can form part of machine- learned sequence processing model(s) 4. Data-to-sequence models 11-1, 11-2, and 11-3 can be jointly trained with or trained independently from machine-learned sequence processing model(s) 4. Data-to-sequence models 11-1, 11-2, and 11-3 can be trained end-to-end with machine-learned sequence processing model(s) 4.
Example Machine-Learned Model Development Platform
[0245] Figure 14 is a block diagram of an example model development platform 12 that can facilitate creation, adaptation, and refinement of example machine-learned models (e.g., machine-learned model(s) 1, sequence processing model(s) 4, etc.). Model development platform 12 can provide a number of different toolkits that developer systems can employ in the development of new or adapted machine-learned models.
[0246] Model development platform 12 can provide one or more model libraries 13 containing building blocks for new models. Model libraries 13 can include one or more pretrained foundational models 13-1, which can provide a backbone of processing power across various tasks. Model libraries 13 can include one or more pre-trained expert models 13-2, which can be focused on performance in particular domains of expertise. Model libraries 13 can include various model primitives 13-3, which can provide low-level architectures or components (optionally pre-trained), which can be assembled in various arrangements as desired.
[0247] Model development platform 12 can receive selections of various model components 14. Model development platform 12 can pass selected model components 14 to a workbench 15 that combines selected model components 14 into a development model 16. [0248] Workbench 15 can facilitate further refinement and adaptation of development model 16 by leveraging a number of different toolkits integrated with model development
platform 12. For example, workbench 15 can facilitate alignment of the development model 16 with a desired performance profile on various tasks using a model alignment toolkit 17. [0249] Model alignment toolkit 17 can provide a number of tools for causing development model 16 to generate outputs aligned with desired behavioral characteristics. Alignment can include increasing an accuracy, precision, recall, etc. of model outputs.
Alignment can include enforcing output styles, schema, or other preferential characteristics of model outputs. Alignment can be general or domain-specific. For instance, a pre-trained foundational model 13-1 can begin with an initial level of performance across multiple domains. Alignment of the pre-trained foundational model 13-1 can include improving a performance in a particular domain of information or tasks (e.g., even at the expense of performance in another domain of information or tasks).
[0250] Model alignment toolkit 17 can integrate one or more dataset(s) 17-1 for aligning development model 16. Curated dataset(s) 17-1 can include labeled or unlabeled training data. Dataset(s) 17-1 can be obtained from public domain datasets. Dataset(s) 17-1 can be obtained from private datasets associated with one or more developer system(s) for the alignment of bespoke machine-learned model(s) customized for private use-cases.
[0251] Pre-training pipelines 17-2 can include a machine-learned model training workflow configured to update development model 16 over large-scale, potentially noisy datasets. For example, pre-training can leverage unsupervised learning techniques (e.g., denoising, etc.) to process large numbers of training instances to update model parameters from an initialized state and achieve a desired baseline performance. Pre-training pipelines 17-2 can leverage unlabeled datasets in dataset(s) 17-1 to perform pre-training. Workbench 15 can implement a pre-training pipeline 17-2 to pre-train development model 16.
[0252] Fine-tuning pipelines 17-3 can include a machine-learned model training workflow configured to refine the model parameters of development model 16 with higher- quality data. Fine-tuning pipelines 17-3 can update development model 16 by conducting supervised training with labeled dataset(s) in dataset(s) 17-1. Fine-tuning pipelines 17-3 can update development model 16 by conducting reinforcement learning using reward signals from user feedback signals. Workbench 15 can implement a fine-tuning pipeline 17-3 to finetune development model 16.
[0253] Prompt libraries 17-4 can include sets of inputs configured to induce behavior aligned with desired performance criteria. Prompt libraries 17-4 can include few-shot prompts (e.g., inputs providing examples of desired model outputs for prepending to a desired
runtime query), chain-of-thought prompts (e.g., inputs providing step-by-step reasoning within the exemplars to facilitate thorough reasoning by the model), and the like.
[0254] Example prompts can be retrieved from an available repository of prompt libraries 17-4. Example prompts can be contributed by one or more developer systems using workbench 15.
[0255] In some implementations, pre-trained or fine-tuned models can achieve satisfactory performance without exemplars in the inputs. For instance, zero-shot prompts can include inputs that lack exemplars. Zero-shot prompts can be within a domain within a training dataset or outside of the training domain(s).
[0256] Prompt libraries 17-4 can include one or more prompt engineering tools.
Prompt engineering tools can provide workflows for retrieving or learning optimized prompt values. Prompt engineering tools can facilitate directly learning prompt values (e.g., input element values) based on one or more training iterations. Workbench 15 can implement prompt engineering tools in development model 16.
[0257] Prompt libraries 17-4 can include pipelines for prompt generation. For example, inputs can be generated using development model 16 itself or other machine- learned models. In this manner, for instance, a first model can process information about a task and output a input for a second model to process in order to perform a step of the task. The second model can be the same as or different from the first model. Workbench 15 can implement prompt generation pipelines in development model 16.
[0258] Prompt libraries 17-4 can include pipelines for context injection. For instance, a performance of development model 16 on a particular task can improve if provided with additional context for performing the task. Prompt libraries 17-4 can include software components configured to identify desired context, retrieve the context from an external source (e.g., a database, a sensor, etc.), and add the context to the input prompt. Workbench 15 can implement context injection pipelines in development model 16.
[0259] Although various training examples described herein with respect to model development platform 12 refer to “pre-training” and “fine-tuning,” it is to be understood that model alignment toolkit 17 can generally support a wide variety of training techniques adapted for training a wide variety of machine-learned models. Example training techniques can correspond to the example training method 1000 described above.
[0260] Model development platform 12 can include a model plugin toolkit 18. Model plugin toolkit 18 can include a variety of tools configured for augmenting the functionality of a machine-learned model by integrating the machine-learned model with other systems,
devices, and software components. For instance, a machine-learned model can use tools to increase performance quality where appropriate. For instance, deterministic tasks can be offloaded to dedicated tools in lieu of probabilistically performing the task with an increased risk of error. For instance, instead of autoregressively predicting the solution to a system of equations, a machine-learned model can recognize a tool to call for obtaining the solution and pass the system of equations to the appropriate tool. The tool can be a traditional system of equations solver that can operate deterministically to resolve the system of equations. The output of the tool can be returned in response to the original query. In this manner, tool use can allow some example models to focus on the strengths of machine-learned models — e.g., understanding an intent in an unstructured request for a task — while augmenting the performance of the model by offloading certain tasks to a more focused tool for rote application of deterministic algorithms to a well-defined problem.
[0261] Model plugin toolkit 18 can include validation tools 18-1. Validation tools 18- 1 can include tools that can parse and confirm output(s) of a machine-learned model.
Validation tools 18-1 can include engineered heuristics that establish certain thresholds applied to model outputs. For example, validation tools 18-1 can ground the outputs of machine-learned models to structured data sources (e.g., to mitigate “hallucinations”). [0262] Model plugin toolkit 18 can include tooling packages 18-2 for implementing one or more tools that can include scripts or other executable code that can be executed alongside development model 16. Tooling packages 18-2 can include one or more inputs configured to cause machine-learned model(s) to implement the tools (e.g., few-shot prompts that induce a model to output tool calls in the proper syntax, etc.). Tooling packages 18-2 can include, for instance, fine-tuning training data for training a model to use a tool.
[0263] Model plugin toolkit 18 can include interfaces for calling external application programming interfaces (APIs) 18-3. For instance, in addition to or in lieu of implementing tool calls or tool code directly with development model 16, development model 16 can be aligned to output instructions that initiate API calls to send or obtain data via external systems.
[0264] Model plugin toolkit 18 can integrate with prompt libraries 17-4 to build a catalog of available tools for use with development model 16. For instance, a model can receive, in an input, a catalog of available tools, and the model can generate an output that selects a tool from the available tools and initiates a tool call for using the tool.
[0265] Model development platform 12 can include a computational optimization toolkit 19 for optimizing a computational performance of development model 16. For
instance, tools for model compression 19-1 can allow development model 16 to be reduced in size while maintaining a desired level of performance. For instance, model compression 19-1 can include quantization workflows, weight pruning and sparsification techniques, etc. Tools for hardware acceleration 19-2 can facilitate the configuration of the model storage and execution formats to operate optimally on different hardware resources. For instance, hardware acceleration 19-2 can include tools for optimally sharding models for distributed processing over multiple processing units for increased bandwidth, lower unified memory requirements, etc. Tools for distillation 19-3 can provide for the training of lighter-weight models based on the knowledge encoded in development model 16. For instance, development model 16 can be a highly performant, large machine-learned model optimized using model development platform 12. To obtain a lightweight model for running in resource-constrained environments, a smaller model can be a “student model” that learns to imitate development model 16 as a “teacher model.” In this manner, for instance, the investment in learning the parameters and configurations of development model 16 can be efficiently transferred to a smaller model for more efficient inference.
[0266] Workbench 15 can implement one, multiple, or none of the toolkits implemented in model development platform 12. Workbench 15 can output an output model 20 based on development model 16. Output model 20 can be a deployment version of development model 16. Output model 20 can be a development or training checkpoint of development model 16. Output model 20 can be a distilled, compressed, or otherwise optimized version of development model 16.
[0267] Figure 15 is a block diagram of an example training flow for training a machine-learned development model 16. One or more portion(s) of the example training flow can be implemented by a computing system that includes one or more computing devices such as, for example, computing systems described with reference to the other figures. Each respective portion of the example training flow can be performed by any (or any combination) of one or more computing devices. Moreover, one or more portion(s) of the example training flow can be implemented on the hardware components of the device(s) described herein, for example, to train one or more systems or models. FIG. 15 depicts elements performed in a particular order for purposes of illustration and discussion. Those of ordinary skill in the art, using the disclosures provided herein, will understand that the elements of any of the methods discussed herein can be adapted, rearranged, expanded, omitted, combined, or modified in various ways without deviating from the scope of the present disclosure. FIG. 15 is described with reference to elements/terms described with
respect to other systems and figures for exemplary illustrated purposes and is not meant to be limiting. One or more portions of the example training flow can be performed additionally, or alternatively, by other systems.
[0268] Initially, development model 16 can persist in an initial state as an initialized model 21. Development model 16 can be initialized with weight values. Initial weight values can be random or based on an initialization schema. Initial weight values can be based on prior pre-training for the same or for a different model.
[0269] Initialized model 21 can undergo pre-training in a pre-training stage 22. Pretraining stage 22 can be implemented using one or more pre-training pipelines 17-2 over data from dataset(s) 17-1. Pre-training can be omitted, for example, if initialized model 21 is already pre-trained (e.g., development model 16 contains, is, or is based on a pre-trained foundational model or an expert model).
[0270] Pre-trained model 23 can then be a new version of development model 16, which can persist as development model 16 or as a new development model. Pre-trained model 23 can be the initial state if development model 16 was already pre-trained. Pre-trained model 23 can undergo fine-tuning in a fine-tuning stage 24. Fine-tuning stage 24 can be implemented using one or more fine-tuning pipelines 17-3 over data from dataset(s) 17-1. Fine-tuning can be omitted, for example, if a pre-trained model has satisfactory performance, if the model was already fine-tuned, or if other tuning approaches are preferred.
[0271] Fine-tuned model 25 can then be a new version of development model 16, which can persist as development model 16 or as a new development model. Fine-tuned model 25 can be the initial state if development model 16 was already fine-tuned. Fine-tuned model 25 can undergo refinement with user feedback 26. For instance, refinement with user feedback 26 can include reinforcement learning, optionally based on human feedback from human users of fine-tuned model 25. As reinforcement learning can be a form of fine-tuning, it is to be understood that fine-tuning stage 24 can subsume the stage for refining with user feedback 26. Refinement with user feedback 26 can produce a refined model 27. Refined model 27 can be output to downstream system(s) 28 for deployment or further development. [0272] In some implementations, computational optimization operations can be applied before, during, or after each stage. For instance, initialized model 21 can undergo computational optimization 29-1 (e.g., using computational optimization toolkit 19) before pre-training stage 22. Pre-trained model 23 can undergo computational optimization 29-2 (e.g., using computational optimization toolkit 19) before fine-tuning stage 24. Fine-tuned model 25 can undergo computational optimization 29-3 (e.g., using computational
optimization toolkit 19) before refinement with user feedback 26. Refined model 27 can undergo computational optimization 29-4 (e.g., using computational optimization toolkit 19) before output to downstream system(s) 28. Computational optimization(s) 29-1, . . . , 29-4 can all be the same, all be different, or include at least some different optimization techniques.
Example Machine-Learned Model Inference System
[0273] Figure 16 is a block diagram of an inference system for operating one or more machine-learned model(s) 1 to perform inference (e.g., for training, for deployment, etc.). A model host 31 can receive machine-learned model(s) 1. Model host 31 can host one or more model instance(s) 31-1, which can be one or multiple instances of one or multiple models. Model host 31 can host model instance(s) 31-1 using available compute resources 31-2 associated with model host 31.
[0274] Model host 31 can perform inference on behalf of one or more client(s) 32. Client(s) 32 can transmit an input request 33 to model host 31. Using input request 33, model host 31 can obtain input(s) 2 for input to machine-learned model(s) 1. Machine-learned model(s) 1 can process input(s) 2 to generate output(s) 3. Using output(s) 3, model host 31 can return an output payload 34 for responding to input request 33 from client(s) 32. Output payload 34 can include or be based on output(s) 3.
[0275] Model host 31 can leverage various other resources and tools to augment the inference task. For instance, model host 31 can communicate with tool interfaces 35 to facilitate tool use by model instance(s) 31-1. Tool interfaces 35 can include local or remote APIs. Tool interfaces 35 can include integrated scripts or other software functionality. Model host 31 can engage online learning interface(s) 36 to facilitate ongoing improvements to machine-learned model(s) 1. For instance, online learning interface(s) 36 can be used within reinforcement learning loops to retrieve user feedback on inferences served by model host 31. Model host 31 can access runtime data source(s) 37 for augmenting input(s) 2 with additional contextual information. For instance, runtime data source(s) 37 can include a knowledge graph 37-1 that facilitates structured information retrieval for information associated with input request(s) 33 (e.g., a search engine service). Runtime data source(s) 37 can include public or private, external or local database(s) 37-2 that can store information associated with input request(s) 33 for augmenting input(s) 2. Runtime data source(s) 37 can include account data 37-3 which can be retrieved in association with a user account corresponding to a client 32 for customizing the behavior of model host 31 accordingly.
[0276] Model host 31 can be implemented by one or multiple computing devices or systems. Client(s) 2 can be implemented by one or multiple computing devices or systems, which can include computing devices or systems shared with model host 31.
[0277] For example, model host 31 can operate on a server system that provides a machine-learning service to client device(s) that operate client(s) 32 (e.g., over a local or wide-area network). Client device(s) can be end-user devices used by individuals. Client device(s) can be server systems that operate client(s) 32 to provide various functionality as a service to downstream end-user devices.
[0278] In some implementations, model host 31 can operate on a same device or system as client(s) 32. Model host 31 can be a machine-learning service that runs on-device to provide machine-learning functionality to one or multiple applications operating on a client device, which can include an application implementing client(s) 32. Model host 31 can be a part of a same application as client(s) 32. For instance, model host 31 can be a subroutine or method implemented by one part of an application, and client(s) 32 can be another subroutine or method that engages model host 31 to perform inference functions within the application. It is to be understood that model host 31 and client(s) 32 can have various different configurations.
[0279] Model instance(s) 31-1 can include one or more machine-learned models that are available for performing inference. Model instance(s) 31-1 can include weights or other model components that are stored in persistent storage, temporarily cached, or loaded into high-speed memory. Model instance(s) 31-1 can include multiple instance(s) of the same model (e.g., for parallel execution of more requests on the same model). Model instance(s) 31-1 can include instance(s) of different model(s). Model instance(s) 31-1 can include cached intermediate states of active or inactive model(s) used to accelerate inference of those models. For instance, an inference session with a particular model may generate significant amounts of computational results that can be re-used for future inference runs (e.g., using a KV cache for transformer-based models). These computational results can be saved in association with that inference session so that session can be executed more efficiently when resumed.
[0280] 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 shard 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.
[0281] Input request 33 can include data for input(s) 2. Model host 31 can process input request 33 to obtain input(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.
[0282] 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 input(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 input(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.
[0283] 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 payload 34. Output payload 34 can be transmitted to client(s) 32 via an API.
[0284] Online learning interface(s) 36 can facilitate reinforcement learning of machine-learned model(s) 1. Online learning interface(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.
[0285] 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.
[0286] 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.
[0287] 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 model(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).
[0288] 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.
[0289] 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.
[0290] 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 model(s) 1 can process the statistical data to generate a visualization output. As another example, machine-learned model(s) 1 can process the statistical data to generate a diagnostic output.
[0291] In some implementations, input(s) 2 can be or otherwise represent sensor data. Machine-learned model(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 model(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.
[0292] In some implementations, machine-learned model(s) 1 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 comprise 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.
[0293] 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.
[0294] 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.
[0295] 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 input(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 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.). 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.
[0296] In some implementations, the task can be a question answering task. Machine- learned model(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 modality as input(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 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.). 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 question (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 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.
[0297] In some implementations, the task can be an image generation task. Machine- learned model(s) 1 can be configured to process input(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) 1 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).
[0298] 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).
[0299] In some implementations, the task can be a data generation task. Machine- learned model(s) 1 can be configured to process input(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
[0300] Figure 17 is a block diagram of an example networked computing system 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.).
[0301] 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 17
can be co-located with, contained by, or otherwise integrated into one or more other devices or systems.
[0302] 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).
[0303] 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.
[0304] 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.
[0305] 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.
[0306] 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.
[0307] 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.
[0308] 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 instance(s) 31-1. Machine-learned model(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.
[0309] 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 interoperatively with machine- learned models 55 on computing device 50 to perform various tasks.
[0310] Model development platform system(s) 70 can include one or more processors 71 and a memory 72. Processor(s) 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 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 model development platform 12. This and other functionality can be implemented by developer tool(s) 75.
[0311] 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).
[0312] Figure 17 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/train, 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/train, or refine machine-learned models based on local datasets (e.g., for model personalization/customization, as permitted by user data preference selections).
[0313] Figure 18 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 18, 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.
[0314] Figure 19 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).
[0315] The central intelligence layer can include a number of machine-learned models. For example, as illustrated in Figure 19, 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.
[0316] 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 19, 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).
Additional Disclosure
[0317] 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.
[0318] 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 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.
[0319] Aspects of the disclosure have been described in terms of illustrative embodiments thereof. Any and all features in the following claims can be combined or rearranged in any way possible, including combinations of claims not explicitly enumerated in combination together, as the example claim dependencies listed herein should not be read as limiting the scope of possible combinations of features disclosed herein. Accordingly, the scope of the present disclosure is by way of example rather than by way of limitation, and the subject disclosure does not preclude inclusion of such modifications, variations or additions to the present subject matter as would be readily apparent to one of ordinary skill in the art. Moreover, terms are described herein using lists of example elements joined by conjunctions such as “and,” “or,” “but,” etc. It should be understood that such conjunctions are provided for explanatory purposes only. Clauses and other sequences of items joined by a particular conjunction such as “or,” for example, can refer to “and/or,” “at least one of’, “any combination of’ example elements listed therein, etc. Terms such as “based on” should be understood as “based at least in part on.”
[0320] The term “can” should be understood as referring to a possibility of a feature in various implementations and not as prescribing an ability that is necessarily present in every implementation. For example, the phrase “X can perform Y” should be understood as indicating that, in various implementations, X has the potential to be configured to perform Y, and not as indicating that in every instance X must always be able to perform Y. It should be understood that, in various implementations, X might be unable to perform Y and remain within the scope of the present disclosure.
[0321] The term “may” should be understood as referring to a possibility of a feature in various implementations and not as prescribing an ability that is necessarily present in every implementation. For example, the phrase “X may perform Y” should be understood as indicating that, in various implementations, X has the potential to be configured to perform Y, and not as indicating that in every instance X must always be able to perform Y. It should be understood that, in various implementations, X might be unable to perform Y and remain within the scope of the present disclosure.
Claims
1. A computer-implemented method for training a machine-learned model, comprising: for each of a plurality of training iterations: providing, by a computing system comprising one or more computing devices, one or more first training inputs to a first machine-learned model; generating, by the computing system using the first machine-learned model based on the one or more first training inputs, one or more first training outputs; and updating, by the computing system based at least in part on the one or more first training outputs, one or more parameters of the first machine-learned model; wherein generating the one or more first training outputs comprises: scaling, by the computing system, a plurality of respective first values to generate a plurality of respective scaled values, wherein the plurality of respective first values comprises one or more of a plurality of respective parameters of the first machine-learned model and a plurality of respective activation values, and wherein the plurality of respective first values is characterized by a first precision; perturbing, by the computing system based on a second precision that is lower than the first precision, the plurality of respective scaled values to generate a plurality of respective perturbed values; and performing, by the computing system, a denoising transformation and a first matrix multiplication based at least in part on the plurality of respective perturbed values to generate a denoised approximation of a second matrix multiplication comprising the plurality of respective first values.
2. The method of claim 1, wherein performing the denoising transformation and matrix multiplication comprises at least one of: performing a matrix multiplication to generate a plurality of respective products before performing a rescaling of the plurality of respective products, wherein a matrix of the matrix multiplication comprises the plurality of respective perturbed values and wherein the rescaling is configured to generate a denoised approximation of the plurality of respective first values; and performing a rescaling of the plurality of respective perturbed values to generate a plurality of respective reconstructed values before performing a matrix multiplication, wherein the rescaling is configured to generate a denoised approximation of the plurality of
respective first values and wherein a matrix of the matrix multiplication comprises the plurality of respective reconstructed values.
3. The computer-implemented method of claim 1, wherein the second precision is less than or equal to four bits.
4. The computer-implemented method of claim 3, wherein the second precision is less than or equal to two bits.
5. The computer-implemented method of claim 1, further comprising generating, by the one or more computing devices based on the first machine-learned model after the plurality of training iterations, a quantized machine-learned model, wherein one or more parameters of the quantized machine-learned model are characterized by a lower precision than one or more corresponding parameters of the first machine-learned model.
6. The computer-implemented method of claim 1, wherein the plurality of training iterations is a plurality of first training iterations, and further comprising: for each of a plurality of second training iterations: generating, by the computing system using the first machine-learned model or a second machine-learned model based on the one or more first training inputs or one or more second training inputs, one or more second training outputs; and updating, by the computing system based at least in part on the one or more second training outputs, one or more parameters of the first machine-learned model or the second machine-learned model; and generating, by the computing system after the plurality of second training iterations based on the first machine-learned model or the second machine-learned model, a sparse machine-learned model comprising a plurality of shared-value weights having a shared value and a plurality of other weights having a value other than the shared value, wherein a number of weights of the plurality of shared-value weights is greater than 20 percent of a total number of weights of the sparse machine-learned model; wherein generating the one or more second training outputs comprises: perturbing, by the computing system, a plurality of weights of the first machine-learned model or the second machine-learned model toward a shared value to generate a second plurality of respective perturbed values; and
performing, by the computing system, a first matrix multiplication based at least in part on the second plurality of respective perturbed values.
7. The method of claim 6, wherein: the plurality of second training iterations is performed before the plurality of first training iterations using the second machine-learned model; and the first machine-learned model is the sparse machine-learned model.
8. The method of claim 1, wherein the respective first values comprise the plurality of respective parameters of the first machine-learned model, and wherein generating the one or more first training outputs comprises: scaling, by the computing system, a plurality of respective second values to generate a second plurality of respective scaled values, wherein the plurality of respective second values comprises a plurality of respective activation values, and wherein the plurality of respective second values is characterized by a third precision; and perturbing, by the computing system based on a fourth precision that is lower than the third precision, the second plurality of respective scaled values to generate a second plurality of respective perturbed values; wherein the denoising transformation comprises a transformation based at least in part on a first scaling factor associated with the plurality of respective first values and a second scaling factor associated with the plurality of respective first values, and wherein the second matrix multiplication corresponds to a multiplication of a first matrix comprising the plurality of respective first values and a second matrix comprising the plurality of respective second values.
9. The method of claim 1, wherein: the first machine-learned model corresponds to a spiking neural network; the plurality of respective first values comprises the plurality of respective activation values; and the second precision is one bit.
10. The method of claim 1, wherein scaling the plurality of respective first values comprises scaling each respective first value based on a minimum value associated with the
plurality of respective first values, a maximum value associated with the plurality of respective first values, and a number of bits associated with the second precision.
11. The method of claim 10, wherein the minimum value comprises a blockwise minimum value associated with a subset of a plurality of parameters of a layer of the first machine-learned model, and wherein the maximum value comprises a blockwise maximum value associated with the subset of the plurality of parameters of the layer of the first machine-learned model.
12. The method of claim 1, wherein perturbing comprises executing a rounding operation based on the second precision.
13. The method of claim 12, wherein the rounding operation comprises rounding to a nearest whole-bit approximation of a respective scaled value in the second precision.
14. The method of claim 1, wherein performing the denoising transformation comprises rescaling using ridge regression.
15. The method of claim 1, wherein performing the denoising transformation comprises: determining a variance associated with the plurality of respective perturbed values; determining a covariance associated with the plurality of respective perturbed values and the plurality of respective first values; and rescaling based at least in part on the variance, the covariance, and a regularization factor.
16. The method of claim 1, wherein performing the denoising transformation comprises rescaling based on a scaling factor that is smaller than an inverse of a scaling factor used in scaling the plurality of respective first values to generate the plurality of respective scaled values.
17. The method of claim 1, wherein performing the denoising transformation comprises rescaling based on a first scaling factor and a first offset value having a first regularized reconstruction loss that is lower than a second regularized reconstruction loss associated with a second scaling factor and second offset value that minimize an unregularized L2
reconstruction loss, wherein the first regularized reconstruction loss and second regularized 1 001 reconstruction loss are each defined as — Ila • q + b — xll2 + - — a2.
18. The method of claim 1, further comprising: determining a first mean associated with the plurality of respective perturbed values; and determining a second mean associated with the plurality of respective first values; wherein performing the denoising transformation is based at least in part on the first mean and the second mean.
19. A computing system comprising one or more processors and one or more non- transitory computer-readable media storing instructions that are executable by one or more processors to cause the computing system to perform operations, the operations comprising: for each of a plurality of training iterations: providing one or more first training inputs to a first machine-learned model; generating, using the first machine-learned model based on the one or more first training inputs, one or more first training outputs; and updating, based at least in part on the one or more first training outputs, one or more parameters of the first machine-learned model; wherein generating the one or more first training outputs comprises: scaling a plurality of respective first values to generate a plurality of respective scaled values, wherein the plurality of respective first values comprises one or more of a plurality of respective parameters of the first machine-learned model and a plurality of respective activation values, and wherein the plurality of respective first values is characterized by a first precision; perturbing, based on a second precision that is lower than the first precision, the plurality of respective scaled values to generate a plurality of respective perturbed values; and performing a denoising transformation and a first matrix multiplication based at least in part on the plurality of respective perturbed values to generate a denoised approximation of a second matrix multiplication comprising the plurality of respective first values.
20. One or more non-transitory computer-readable media storing instructions that are executable by one or more processors to perform operations, the operations comprising: for each of a plurality of training iterations: providing one or more first training inputs to a first machine-learned model; generating, using the first machine-learned model based on the one or more first training inputs, one or more first training outputs; and updating, based at least in part on the one or more first training outputs, one or more parameters of the first machine-learned model; wherein generating the one or more first training outputs comprises: scaling a plurality of respective first values to generate a plurality of respective scaled values, wherein the plurality of respective first values comprises one or more of a plurality of respective parameters of the first machine-learned model and a plurality of respective activation values, and wherein the plurality of respective first values is characterized by a first precision; perturbing, based on a second precision that is lower than the first precision, the plurality of respective scaled values to generate a plurality of respective perturbed values; and performing a denoising transformation and a first matrix multiplication based at least in part on the plurality of respective perturbed values to generate a denoised approximation of a second matrix multiplication comprising the plurality of respective first values.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US202463622963P | 2024-01-19 | 2024-01-19 | |
| US63/622,963 | 2024-01-19 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025155705A1 true WO2025155705A1 (en) | 2025-07-24 |
Family
ID=94480895
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/US2025/011848 Pending WO2025155705A1 (en) | 2024-01-19 | 2025-01-16 | Robust training of neural networks at arbitrary precision and sparsity |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2025155705A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN121418289A (en) * | 2025-12-26 | 2026-01-27 | 天维讯达(四川)科技有限公司 | A method and system for intelligent analysis of the operating status of communication equipment |
-
2025
- 2025-01-16 WO PCT/US2025/011848 patent/WO2025155705A1/en active Pending
Non-Patent Citations (7)
| Title |
|---|
| AGOSTINELLI ET AL.: "MusicIM. Generating Music From Text", ARXIV:2301.11325V1, 26 January 2023 (2023-01-26) |
| ALEXANDRE D�FOSSEZ ET AL: "Differentiable Model Compression via Pseudo Quantization Noise", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, 17 October 2022 (2022-10-17), XP091344359 * |
| DOSOVITSKIY ET AL.: "An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale", ARXIV:2010.11929V2, 3 June 2021 (2021-06-03) |
| JUMPER ET AL.: "Highly accurate protein structure prediction with AlphaFold", NATURE, vol. 583, 26 August 2021 (2021-08-26) |
| SAHARIA ET AL.: "Non-Autoregressive Machine Translation with Latent Alignments", ARXIV:2004.07437V3, 16 November 2020 (2020-11-16) |
| VASWANI ET AL.: "Attention Is All You Need,", ARMV: 1706.03762V7, 2 August 2023 (2023-08-02) |
| ZHOU ET AL.: "Mixture-of Experts with Expert Choice Routing", ARXIV:2202.09368V2, 14 October 2022 (2022-10-14) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN121418289A (en) * | 2025-12-26 | 2026-01-27 | 天维讯达(四川)科技有限公司 | A method and system for intelligent analysis of the operating status of communication equipment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2024073087A1 (en) | Revision of and attribution for output of text generation models | |
| US20250124256A1 (en) | Efficient Knowledge Distillation Framework for Training Machine-Learned Models | |
| US20250131321A1 (en) | Efficient Training Mixture Calibration for Training Machine-Learned Models | |
| WO2024112887A1 (en) | Forward-forward training for machine learning | |
| US20180129938A1 (en) | Dynamic coattention network for question answering | |
| US20250117893A1 (en) | Self Supervised Training of Machine-Learned Image Processing Models for Histopathology | |
| WO2025095958A1 (en) | Downstream adaptations of sequence processing models | |
| US20250356223A1 (en) | Machine-Learning Systems and Methods for Conversational Recommendations | |
| US20250315428A1 (en) | Machine-Learning Collaboration System | |
| WO2025171219A9 (en) | Inverted bottleneck architecture search and efficient attention mechanism for machine-learned models | |
| US20250371413A1 (en) | Tied Preference Optimization for Sequence Processing Models | |
| WO2025072932A1 (en) | Multimodal autoregressive model for time-aligned and contextual modalities | |
| WO2025101175A1 (en) | Llm-centric agile image classification | |
| US20250307552A1 (en) | Cross-Modal Adapters for Machine-Learned Sequence Processing Models | |
| US20250217938A1 (en) | Weighting Functions and Adaptive Noise Schedule for Training Noise-Based Machine-Learned Models | |
| US20250265087A1 (en) | Machine-Learned Model Alignment With Synthetic Data | |
| WO2025221495A1 (en) | Distillation of multi-sample preference sampling processes for sequence processing models | |
| WO2025102041A1 (en) | User embedding models for personalization of sequence processing models | |
| WO2025165844A1 (en) | Generative model integration with code editing | |
| US20250209308A1 (en) | Risk Analysis and Visualization for Sequence Processing Models | |
| WO2025144398A1 (en) | Semantic clustering for unlimited context window sizes for sequence processing models | |
| WO2024207009A1 (en) | Efficient use of tools by language models | |
| US20250131280A1 (en) | Meta-Reinforcement Learning Hypertransformers | |
| US20260037593A1 (en) | Machine Learning Using Four-Bit Binary Data Formats | |
| US20250124067A1 (en) | Method for Text Ranking with Pairwise Ranking Prompting |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 25703738 Country of ref document: EP Kind code of ref document: A1 |