Elamur Research

SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models

Paper · 2022 · Guangxuan Xiao, Ji Lin, Mickael Seznec et al.

Summary

The numbers that are hardest to store compactly in a large language network often appear while it is running. The learned parameters, called weights, can ordinarily be rounded to a lower-precision format with relatively little effect. The intermediate values, called activations, can be much harder to round. In the networks studied in SmoothQuant, unusually large activations tend to recur in the same feature positions across tokens. When all those positions share a rounding scale, the spacing needed to accommodate the extreme values is too wide to distinguish many of the smaller ones. That makes the activations a bottleneck for faster arithmetic in large language models.

SmoothQuant prepares the network for rounding by changing where those disparities in magnitude appear. The authors measure activation ranges on sample text and compute a rescaling factor for each input feature. They shrink a feature where necessary and enlarge the corresponding weights by the same factor. In the unrounded matrix product, these changes cancel. When the operands are rounded, the activation side has less variation in scale, and the weight side takes on a share of it. A parameter called migration strength controls that share. The authors perform the conversion after training and can typically incorporate the rescaling into existing layer parameters ahead of inference.

The resulting scheme uses signed 8-bit integers for both weights and activations in the main matrix products, a configuration known as W8A8. The authors compare settings that choose how finely to scale the integers and whether to calculate the scales during inference. OPT-175B retains comparable benchmark performance to the FP16 floating-point reference even with the fastest setting. BLOOM-176B and GLM-130B come closest to their references under finer settings. MT-NLG 530B also shows negligible benchmark loss. Tests on the Llama families and on Falcon, Mistral and Mixtral report small changes in WikiText-2 perplexity, a measure of how well a network predicts the text it is evaluated on.

The implementation measurements distinguish prompt processing from token-by-token generation. In the single-GPU PyTorch prompt-processing tests, SmoothQuant reaches a speedup of 1.51× and a peak GPU memory saving of up to 1.96× relative to FP16. The FasterTransformer prompt-processing experiments reach a speedup of 1.56× and report a memory footprint close to half of FP16. In that backend, OPT-175B runs on 4 GPUs compared with 8 for the floating-point deployment, with similar or better prompt-processing latency. MT-NLG 530B runs at similar latency on 8 GPUs compared with 16 in FP16, bringing it within the capacity of one node. Those device counts show how a change in numerical precision can determine where an inference workload fits.

Deep dive: SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models

SmoothQuant rescales a trained network so its main matrix operations can use 8-bit integers, reducing inference time and GPU memory use. · about 36 minutes to read

The problem and its context

The cost of running a trained network

Inference begins once a trained network has been given a request. Its learned parameters have to fit in available memory and be read when the network processes the input. The intermediate results consume memory as well, and the operations that produce them have to finish quickly enough for the application. When the network is distributed across accelerators, communication becomes part of the work. The authors illustrate the scale of the capacity problem with GPT-3. They estimate that storing and running its 175B parameters in FP16, their reference floating-point format, takes at least 350GB of memory. A representation that reduces the storage per parameter can change the number of devices needed for inference. That makes precision a practical concern in efficient models & compression.

Much of the computation the paper targets consists of matrix multiplications. In a linear layer, the input to a multiplication is a collection of token representations. A token is a unit into which the input text is divided. Its representation at a given layer is a vector of numerical features, and each feature has a position called a channel. The layer applies the same learned weight matrix to the vectors for different tokens. Attention also uses batches of matrix products, where several products are computed as a group. Together, these operations supply the main opportunities for using lower-precision arithmetic in the architecture described in Attention Is All You Need. Transformer and attention

Quantization replaces the original values with approximations chosen from a finite set. Storing the weights in INT8 reduces the volume of data needed to represent them. If activations can also be supplied in INT8, the main multiplication can use an integer kernel, the accelerator routine that carries out the operation. The paper calls the general matrix multiplication routine GEMM and the batched operation BMM. The distinction between the representation of a stored weight and the arithmetic used to apply it matters. A compact weight can save memory even when the multiplication still requires it to be expanded to floating point. With integer operands on both sides, the implementation can use the integer multiplication path in GPU & parallel computing.

The authors therefore give hardware efficiency a specific meaning. They want the costly products to fit the arithmetic pattern that already runs efficiently on accelerators. A rounding rule can be attractive when judged by how faithfully it represents individual values and still require expensive operations inside the product. Conversely, a fast kernel has limited value if its inputs have been rounded so coarsely that benchmark performance collapses. SmoothQuant addresses the point where these criteria meet. It prepares the operands so that a scale the kernel can handle also gives enough resolution for the values it needs to represent.

The shape of the activation problem

A uniform quantizer uses evenly spaced representable values. The spacing must account for the range of the group being quantized. If the largest value in magnitude is far larger than most entries, including it in the range spreads the available levels farther apart. The quantizer assigns a distinct code to the extreme value and has relatively few codes left for the interval occupied by ordinary values. The trouble comes from the ratio of magnitudes within the group. A small value can be comfortably within the supported range and still be represented poorly because its nearest level is far away relative to its own size. The paper uses the symmetric form of the approach cited in Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference.

The authors point to earlier evidence of systematic activation outliers as language networks scale beyond 6.7B parameters. Their own illustration examines a linear layer with substantial quantization error in OPT-13B. The weights have a relatively even spread, while membership in a particular activation channel makes a large difference to the magnitudes a token can produce. Several of the activation channels in the illustration have magnitudes greater than 70. The paper describes outliers as reaching roughly 100× the size of most activation entries. At that level of disparity, the much smaller values may be forced onto just 2-3 effective quantization levels under a common scale. OPT

The position of an outlier matters as much as its size. A scale chosen independently for each token would help if the main variation were between tokens, with some token vectors uniformly larger than others. In the authors’ analysis, much of the disparity is within the token vector. Large magnitudes recur at particular feature positions. A scale computed afresh for the next token can thus face much the same range problem as the one computed for the previous token. It still has to accommodate ordinary values and extreme ones together.

Separate scales for activation channels would fit that pattern more directly. Each channel could use levels spaced according to its own range. The obstacle is the role of that channel in a matrix product. An output value is the result of adding contributions across input channels. Different scales on those contributions would affect the terms before they can be added correctly. The fast integer kernel is organized around doing that sum in a regular sequence. The authors argue that inserting conversions or floating-point operations into the sequence compromises the throughput the integer kernel is meant to provide. A scale associated with the whole token, by comparison, can be applied after the sum because it is shared by all the terms contributing to that token’s output.

What earlier schemes offered

The paper situates the problem in a line of work that had already found quantization effective for convolutional networks and smaller Transformers. Some earlier techniques reduce the numerical disparities in the weights themselves. Weight equalization and outlier channel splitting are examples the authors discuss. SmoothQuant faces a different starting distribution, with weights that are usually easier to represent than the activations entering the same products. The question is how to use that difference to prepare both operands.

ZeroQuant computes activation scales dynamically for individual tokens and gives groups of weights their own quantization steps. The paper describes it as effective for GPT-3-350M and GPT-J-6B. It also discusses nuQmm in connection with grouped and per-token quantization and specialized CUDA kernels. Finer grouping gives these schemes more control over rounding. Giving a whole token its own scale, however, does little to resolve large disparities between that token’s channels. Moving to larger networks made that distinction consequential for accuracy.

LLM.int8() isolates the outlier contribution in a floating-point computation and uses integer arithmetic for the rest. This mixed-precision decomposition protects the difficult values while still computing much of the product in INT8. Its implementation has to handle both paths. The paper identifies that extra work as a source of latency. Outlier Suppression addresses the activation distribution with token-wise clipping and a version of LayerNorm that removes its scaling operation. The authors describe success on smaller networks including BERT and BART.

The appendix discusses another approach in which the stored weights are quantized and are converted as needed for floating-point multiplication. Reading fewer bytes can pay off when weight loading dominates execution, particularly when generating with very few tokens being processed at once. The representative method is GPTQ. SmoothQuant pursues the use of integer arithmetic on the products themselves. For that purpose, the critical question is how much of an activation’s channel-specific variation can be handled in advance, while the multiplication still has the same meaning.

The method, step by step

Rescale a feature and compensate in the weights

Imagine reading across the activation vector for a token. Some coordinates are much larger in magnitude than their neighbors. In another token, the actual entries change, but many of the same coordinates are the large ones. SmoothQuant treats each of those positions as a candidate for an adjustment that can be decided in advance. It divides every activation in a channel by a factor specific to that channel. In matrix terms, this changes a column of the activation matrix. The corresponding row of the weight matrix is multiplied by the factor.

That row supplies the weights through which the feature contributes to every output channel. Each individual contribution therefore contains two compensating changes. A smaller feature is paired with proportionately larger coefficients. The terms being summed have the same values in exact arithmetic as before the transformation. The factor can be fixed for all inputs because the cancellation depends only on the way the operands are paired. The calibration text is there to find factors that produce useful ranges, and the algebra holds for later text as well.

The method then quantizes the transformed operands. The scales used for rounding can be shared across many features because the activation channels have already been brought closer in magnitude. Smoothing is the change to the operands that leaves their product algebraically invariant. Quantization is the approximation to those operands that makes the integer computation possible. The authors arrange the operations in that order so that the rounding error depends on the new distribution.

Preparing and executing a SmoothQuant layer

The steps in order.

Preparing and executing a SmoothQuant layerStep 1: Collect activation maxima from calibration text1. Collect activation maxima from calibration textStep 2: Read corresponding maxima from the weight rows2. Read corresponding maxima from the weight rowsStep 3: Choose the migration strength3. Choose the migration strengthStep 4: Calculate a rescaling factor for each channel4. Calculate a rescaling factor for each channelStep 5: Adjust the producer and the consuming weights5. Adjust the producer and the consuming weightsStep 6: Quantize operands at the chosen granularity6. Quantize operands at the chosen granularityStep 7: Multiply with integer kernels7. Multiply with integer kernels

Define the rounding step

The authors use the symmetric form of uniform integer quantization. Symmetry here means the representable range is centered at zero. Within a group that shares a scale, the quantizer first chooses its step size.

Δ = max(|X|) / (2^(N − 1) − 1)

In this expression, X is the floating-point array being quantized, or the part of the array assigned to the current group. The bars indicate entrywise absolute magnitude, and max takes the largest of those magnitudes. Δ is the spacing, in the original numerical units, between adjacent levels. N is the number of bits, which is 8 for the INT8 format used here. The caret indicates exponentiation. The exponent N − 1 accounts for signed representation, and the subtraction outside the power gives the upper positive integer used by this symmetric rule.

With the spacing established, each entry is mapped to its integer code.

X̄ᴵᴺᵀ⁸ = round(Xᶠᴾ¹⁶ / Δ)

Here Xᶠᴾ¹⁶ is the input array in floating point and X̄ᴵᴺᵀ⁸ is the corresponding array of integer codes. The raised format labels specify the precision of the operands. Δ is the step for the group to which the entries belong. The division is entrywise, and round selects the nearest integer. The magnitude represented by that integer is obtained by interpreting the code in units of the step. The authors also mention the asymmetric case, in which a zero-point shifts the correspondence between the integer codes and the original values.

For activations, the statistic that determines Δ can come from calibration or from the current input. In static quantization, the prepared step is reused during inference. In dynamic quantization, the implementation looks at the activations it is about to quantize and calculates the step then. A dynamic step can follow changes in the input range. Its computation also adds work before those activations can enter the product. This decision applies to the quantizer. SmoothQuant's earlier rescaling uses fixed factors under either choice.

Another decision determines which entries share a step. Per-tensor quantization treats the entire array as a group. Per-token activation quantization groups the features for a particular token. On the weight side, per-output-channel quantization gives each output column its own step. The paper also discusses group-wise quantization, in which sets of channels share steps. These terms describe the grouping for quantization and give meaning to the accuracy and latency comparisons among schemes. They also explain why an activation that is easy to represent under a fine-grained quantizer can remain difficult under a coarser one.

The authors express the loss of resolution for a small channel under shared INT8 scaling in terms of effective levels.

Lᵢ = 2^8 · mᵢ / m

Lᵢ denotes the effective number of levels available to input channel i in the paper’s range argument. The subscript i identifies that channel. The quantity mᵢ is its maximum magnitude, and m is the maximum magnitude of the entire activation matrix. The caret indicates exponentiation with the INT8 bit width, 8, and the centered dot is scalar multiplication. The expression relates the channel’s share of the full numerical range to its share of the levels. A channel with a small mᵢ can use few of the codes even when the quantizer has enough range to preserve the large entries elsewhere.

See which scales the integer product can use

The basic operation in a linear layer is a matrix product.

Y = X · W

Here X is the input activation matrix, W is the weight matrix, and Y is the output. The centered dot denotes matrix multiplication. With the batch dimension omitted, X has T rows for tokens and Cᵢ columns for input channels. W has Cᵢ rows for those same input channels and Cₒ columns for output channels. The output Y therefore has T rows and Cₒ columns. The subscripts i and o on C distinguish input from output.

Consider the output corresponding to a particular token and a particular output channel. The matrix product pairs entries from the token’s row of X with entries from the output channel’s column of W and adds the products. If each token row has its own step on the activation side and each output column has its own step on the weight side, the two steps apply to every term in the sum for that output. The implementation can do the integer sum first. The authors describe the arrangement as follows.

Y = diag(ΔX) · (X̄ · W̄) · diag(ΔW)

Y here denotes the reconstructed output of the quantized product. X̄ and W̄ denote the INT8 activation and weight matrices. ΔX is the vector of FP16 activation steps indexed by token, and ΔW is the vector of FP16 weight steps indexed by output channel. The labels X and W in those step names identify the operand. The diag function arranges a vector on the diagonal of a square matrix, with zeros off the diagonal. Putting one diagonal matrix to the left scales the output rows. Putting the other to the right scales the output columns. The dots indicate matrix multiplication, and the parentheses delimit the product carried out on the integer operands.

The axes used by these scales survive in the output. The input-channel axis disappears when the product sums along it. If each input channel has a different activation quantization step, then different terms in that sum need different corrections. At the end of the sum, their separate contributions are no longer available for applying those corrections. This is why a per-input-channel quantizer, which is attractive numerically, is a poor fit for the fast GEMM path in the paper. The authors describe integer kernels designed to sustain a high-throughput sequence of matrix instructions. The additional work of applying scales within that sequence would interfere with it.

SmoothQuant can still act separately on input channels because the operation it performs there is a paired rescaling of the original operands. It does not ask the integer kernel to reconstruct activations by applying each channel’s smoothing factor. The reciprocal effect has already been included in the weights. The kernel’s remaining scales concern the quantization of the transformed operands, and they can follow the dimensions of the output.

Express the compensation as a matrix identity

Putting all the channel transformations together gives the following identity in exact arithmetic.

Y = (X · diag(s)⁻¹) · (diag(s) · W) = X̂ · Ŵ

Here X and W are the original activation and weight matrices, and Y is their original product. The vector s contains one smoothing factor for each of the Cᵢ input channels. The function diag places those factors on a diagonal, and the inverse marked with ⁻¹ replaces the factors by their reciprocals. The dots denote matrix multiplication. X̂ is the activation after division by the channel factors. Ŵ is the weight matrix after multiplication by the matching factors. The parentheses identify the transformed operands.

The placement of the diagonal matrices implements the row and column pairing. Right multiplication of X by the inverse diagonal matrix divides a column of X by its factor. Left multiplication of W by the diagonal matrix multiplies the corresponding row of W. Every product of an activation entry and a weight entry along that channel is unchanged in the unrounded computation. This remains true even if a calibration factor turns out to be a poor estimate for the range observed during inference. A poor estimate can make rounded values less faithful, which is a different question from whether the transformation preserves the underlying product.

The rule for selecting s has to consider both operands. Taking the activation maximum of a channel as its factor would bring that channel’s calibrated maximum to the same level as the others. All the original differences between those maxima would be transferred to the weight rows. The paper reports that such a choice can create large weight quantization errors. Taking the reciprocal of the corresponding weight maximum would instead align the maxima of the weight rows, at the expense of leaving the activations hard to round. The authors use these cases to motivate a factor that depends on the range on each side.

sⱼ = max(|Xⱼ|)^α / max(|Wⱼ|)^(1 − α)

Here j indexes the input channel and sⱼ is the factor applied to that channel. Xⱼ is the set of activation entries in the channel observed with calibration inputs. Wⱼ consists of the weight entries in the corresponding input row. The bars denote magnitudes, max takes the largest magnitude in each set, and the carets indicate exponentiation. The parameter α is the migration strength, and 1 − α is its complementary exponent. The slash denotes division of the powered activation maximum by the powered weight maximum.

Increasing α puts more of the burden on the weights and smooths the observed activations more strongly. At α = 0.5, the matching activation and weight maxima after rescaling are equal for the values used to compute the factors. The original weight maximum helps decide how much that row can be enlarged, and the original activation maximum indicates how much smoothing the channel needs. Equal maxima for the calibrated operands give a balance in range. This rule uses the extreme magnitudes as its statistics, so the balance describes the range and leaves open how the entries are distributed within it. Benchmark performance after quantization is the way the paper checks the choice.

Estimate the factors and incorporate them into the network

The procedure begins with a trained network and text on which the authors can observe its activations. They use a subset of the Pile validation set to search for a suitable α over candidate values. They find 0.5 generally suitable for the tested OPT and BLOOM families. GLM-130B has more difficult activation outliers in the authors’ analysis, and they use 0.75 to transfer more of the disparity to the weights. The choice concerns preparation of a particular network. The running system uses the factors determined from calibration.

The authors use 512 randomly selected sentences from the Pile, which the paper describes as a pretraining dataset, to calibrate smoothing and static quantization. A forward pass produces the activation observations needed for the channel statistics. The weights are already available, so the corresponding weight maxima can be read from them. The static rounding steps also require activation statistics during preparation. Once the quantized network is ready, the authors reuse it on the downstream evaluations. That design tests whether a common calibration suffices across tasks. For GLM-130B, they also clip the top 2% of tokens when calibrating the static quantization steps, following Outlier Suppression. This concerns the static rounding range, a separate choice from the formula for migration strength.

A factor applied separately to every activation channel might seem to require its own operation during inference. In many places, however, the producer of those activations already has parameters that control its output. If the input to the target multiplication comes from a linear operation or a LayerNorm, the authors describe folding the division into the parameters of that preceding operation. LayerNorm is the normalization operation in the block. Its output scaling can be adjusted so that the consuming layer directly receives the rescaled values. The matching weight multiplication is done offline as well. This avoids launching another kernel solely to apply the factors in those cases. Where an activation comes from a residual addition, the paper describes adding a scale on the residual branch.

The important dependency is between the producer and the consumer of the activation. A transformation on the producer changes the values downstream, and the consumer’s adjusted weights supply the corresponding compensation. This is what turns the algebraic observation into a way of organizing the implemented network. The method adjusts parameters to realize the identity, with calibration determining their scales. It requires no optimization of the network on task labels and no new training stage.

Assign precisions to the operations in a block

The authors smooth inputs to the self-attention and feed-forward parts of the Transformer block by default and quantize the linear layers with W8A8. They also use INT8 operands for the batched matrix products in attention. These products are computational targets in their own right. The presence of INT8 batched multiplication in the implementation describes the precision of those operators. The smoothing identity describes the paired adjustment where an activation is consumed by a learned weight matrix.

Lighter operations such as ReLU, Softmax and LayerNorm use FP16 activations. ReLU is an elementwise activation function, Softmax maps scores to normalized values in attention, and LayerNorm normalizes the layer’s features. The precision boundary follows the work the authors aim to accelerate. The heavy products can use integer arithmetic and the surrounding operations can keep floating-point values. Thus W8A8 describes the operands of the quantized products instead of a uniform format for every value everywhere in the block.

The paper uses the labels O1, O2 and O3 for progressively more efficient quantization settings. O1 uses dynamic per-token activation steps. O2 uses a dynamic per-tensor step, which shares the current range across the activation tensor. O3 uses a static per-tensor step, which takes that range from calibration. The progression changes how much information the activation quantizer uses at inference time. A token-specific step can respond to the actual range of each row. A tensor-wide step can be simpler to apply. A prepared step saves the work of measuring the runtime range in the first place. The same smoothing principle makes all of these choices available.

The authors implement INT8 linear layers and batched multiplication for PyTorch with Hugging Face and for FasterTransformer. Both implementations use CUTLASS INT8 GEMM kernels. They replace the floating-point modules for those products with integer-capable implementations and retain the precision choices for the rest of the block. The paper makes the implementation available under mit-han-lab/smoothquant. Using existing integer kernels is central to the experiment. The purpose of the numerical transformation is to make the operands suit those routines while preserving the performance of the trained network on the tasks being measured.

Experiments and results

The accuracy comparisons and what they measure

The experiments ask how well a quantized network retains the performance it had in FP16. Task accuracy measures how often it answers correctly on the evaluated examples. The language modeling experiments use perplexity, where lower values indicate that the network assigns greater probability to the observed text. These metrics respond to different consequences of rounding. A change in a prediction’s confidence can affect perplexity, whereas an accuracy score changes when the selected answer changes. The authors compare each network to its own floating-point reference, a design suited to measuring the effect of conversion in evaluation & benchmarks.

For OPT and BLOOM, the broad zero-shot evaluation consists of LAMBADA, OpenBookQA, HellaSwag and PIQA, together with RTE, COPA and WinoGrande. The zero-shot setup uses the trained network on the tasks without adapting its parameters to them. WikiText supplies a separate language modeling evaluation. The authors run these tests with lm-eval-harness. Their broad OPT-175B comparison reports average task accuracy and language modeling perplexity, allowing the reader to track performance on both kinds of metric. LAMBADA PIQA WinoGrande WikiText

The large-family comparison reports a narrower task average for OPT-175B and BLOOM-176B. It uses HellaSwag, LAMBADA, WinoGrande and PIQA. The GLM-130B average uses QNLI, LAMBADA, MMLU and MNLI. The authors choose a different set because some benchmarks used for OPT and BLOOM occur in GLM-130B’s training data. They use the official GLM-130B implementation for its evaluation. The metric labeled average accuracy therefore refers to the particular tasks in the relevant comparison. A change relative to FP16 is interpretable for each network even though the GLM-130B aggregate measures performance over different examples. GLM-130B MMLU MNLI GLUE

The INT8 comparison covers naive W8A8, ZeroQuant, LLM.int8() and Outlier Suppression. They give the study several ways to attribute success or failure. The naive baseline shows what the conversion does with ordinary scaling alone. ZeroQuant represents a more finely grouped scheme. LLM.int8() gives difficult values a floating-point path and tests whether an accuracy-preserving quantized system can also be fast. Outlier Suppression represents a different way to intervene in the distribution. Each method is compared in a post-training setting. The FP16 result provides the reference needed to assess how much task performance each conversion retains.

The large-family results

On OPT-175B the paper reports performance comparable to FP16 for all the tested SmoothQuant settings. This includes O3, the version that fixes the activation quantization step ahead of time and shares it across the tensor. LLM.int8() also retains floating-point accuracy in the comparison. The numerical results for those methods lead to a meaningful systems comparison because both can handle the activation outliers without the severe accuracy loss observed with the other baselines. The authors describe the results for naive W8A8, ZeroQuant and Outlier Suppression on OPT-175B as close to random performance.

The authors try a variant of ZeroQuant that preserves FP16 for the input to self-attention while quantizing the remaining parts. This is an arrangement the ZeroQuant work had used for GPT-NeoX-20B. It fails to restore the OPT-175B result. The variant matters because it tests a targeted change in precision at a place where the activations are especially relevant to the problem. The SmoothQuant result comes from transforming the operands for the integer path more broadly across the block.

BLOOM-176B withstands direct quantization better. The authors report a 4% average accuracy drop for naive dynamic per-tensor W8A8 on the family comparison tasks. O1 and O2 preserve the floating-point accuracy in that comparison, and O3 gives a 0.8% drop. The authors ascribe the O3 change to a mismatch between the activation statistics measured for the fixed scales and those encountered during evaluation. In this case, the results show an advantage for smoothing even when its quantizer uses a coarser treatment of the ranges than the naive dynamic baseline. BLOOM

Reported average accuracy drop from FP16 for BLOOM-176B on HellaSwag, LAMBADA, WinoGrande and PIQA

Static SmoothQuant retains more of the reference accuracy than ordinary dynamic W8A8.

Reported average accuracy drop from FP16 for BLOOM-176B on HellaSwag, LAMBADA, WinoGrande and PIQANaive dynamic per-tensor W8A8: 4Naive dynamic per-tensor W8A84SmoothQuant O3 (this paper): 0.8SmoothQuant O3 (this paper)0.8
The numbers
System or settingaverage accuracy drop %
Naive dynamic per-tensor W8A84
SmoothQuant O3 (this paper)0.8

GLM-130B presents the more difficult quantization case in the authors’ comparison. With its stronger migration and its static calibration adjustment, SmoothQuant O1 attains accuracy comparable to FP16 on QNLI, LAMBADA, MMLU and MNLI. O3 reduces the average by 1% and still gives better performance than the quantization baselines. The GLM-130B result and the BLOOM-176B result put the choice of activation quantizer in context. Smoothing makes coarse quantization viable, while using current input statistics can still matter for retaining the last part of the reference performance.

The scale comparison within OPT shows that this result is not confined to the very large example used for the broad accuracy study. The authors report that O3 retains FP16-level accuracy across the tested OPT sizes. That comparison holds the family constant and changes the network scale. Alongside the large-family results, it supports both an application within one series across sizes and an application across families with different settings. The authors emphasize within-network retention because the starting task performance is a property of the underlying trained network.

Instruction tuning and other architectures

The paper also evaluates an instruction-tuned variant, OPT-IML-30B, on WikiText-2 and LAMBADA. It reports that SmoothQuant preserves performance with W8A8 while the tested baselines deteriorate. The authors motivate this extension by pointing to the shared architecture and similar pretraining of instruction-tuned and ordinary language networks. The experiment tests whether smoothing remains effective after that kind of adaptation. Its measured outcomes concern language modeling and LAMBADA performance for that particular network. Fine-tuning

The initial LLaMA results use WikiText-2 perplexity at a sequence length of 512. SmoothQuant uses per-token activation quantization and α = 0.8 in these tests. The authors observe less severe activation outliers in their initial LLaMA experiments than in the OPT and BLOOM cases they discuss. They report negligible performance degradation from W8A8 conversion. This extension demonstrates that the transformation can be useful under a different combination of characteristic activation ranges and chosen quantization settings. LLaMA

A further set of experiments covers Llama-2, Falcon, Mixtral and Mistral. The authors report WikiText-2 perplexity using a sequence length of 2048, per-token activation steps and per-channel weight steps. They describe the loss in performance as minimal. Mixtral extends the evidence to a mixture-of-experts architecture, which uses expert components within the network. The comparison in this group uses the same perplexity setup across the listed families. The earlier LLaMA evaluation uses a different sequence length, so each group is most directly read as a comparison of its quantized networks with their corresponding FP16 references. Llama 2

Prompt processing on one GPU

For the systems experiments, the paper focuses on SmoothQuant O3, including in PyTorch and FasterTransformer. The measurements use NVIDIA A100 80GB GPU servers. The context stage means processing the supplied text before the system generates subsequent tokens. The authors time a complete pass that produces hidden states, the network’s intermediate representations, for a batch of 4 sentences. They also record aggregate peak GPU memory for the run. Timing the complete pass includes work around the integer products. That is important because a faster product delivers an end-to-end improvement only to the extent that the rest of the implementation lets that improvement carry through.

The PyTorch implementation is evaluated on a single GPU because the Hugging Face setup used for these tests lacks model-parallel support. The authors test OPT-13B, OPT-6.7B and OPT-30B. SmoothQuant is faster than FP16 across the reported context-stage comparisons. It reaches a speedup of 1.51× for OPT-30B with a sequence length of 256. The authors also observe more significant acceleration with increasing network size in these tests. The best peak GPU memory saving reported for the PyTorch context benchmark is 1.96×.

LLM.int8() is the quantized timing comparator because it retains accuracy across the scales considered in the comparison. In these PyTorch experiments it saves memory, to a degree close to SmoothQuant, but usually takes longer than FP16. The paper attributes its latency to the handling of outliers with mixed-precision arithmetic. SmoothQuant saves slightly more memory, which the authors associate with using wholly integer operands for GEMM. This comparison illustrates why the paper times a complete run. The storage of the operands and the work required to execute their product show up in different measurements.

FasterTransformer is already more than 3× faster than the PyTorch implementation for OPT-30B in the authors’ comparison. The FasterTransformer FP16 baseline therefore supplies a demanding reference for a further improvement. For the single-GPU context runs with OPT-13B and OPT-30B, SmoothQuant delivers a maximum speedup of 1.56× relative to that backend’s own FP16 implementation. That maximum belongs to the context-stage comparison on the smaller networks. The PyTorch and FasterTransformer speedups each refer to a different implementation of the reference computation.

Changing the device allocation

FasterTransformer lets the authors test larger networks using tensor parallelism. Tensor parallelism distributes pieces of the matrix operations across GPUs. The context experiments in this backend include OPT-66B and OPT-175B as well as the smaller networks. At these larger sizes the practical question is what happens to latency if a smaller allocation becomes possible after quantization. Changing the device count tests a different benefit of W8A8 from the same-device comparisons. Megatron-LM

In the FasterTransformer runs, OPT-66B uses 1 GPU with SmoothQuant where FP16 uses 2. OPT-175B uses 4 where FP16 uses 8. The authors report similar or better context latency for the quantized deployments and a memory footprint close to half of the FP16 footprint. The comparison thus includes the effects of both the faster integer execution and running the work on fewer devices. Holding the network fixed allows the authors to ask whether the reduced allocation still handles the tested workload in comparable time.

The largest test applies SmoothQuant to MT-NLG 530B. The authors report negligible accuracy loss after W8A8 conversion and similar serving latency with the quantized configuration. The device count moves from 16 GPUs for FP16 to 8 after quantization. The W8A8 deployment then fits on one node equipped with A100 80GB GPUs. For a network of this size, that is a change in the boundary of feasible deployment. The paper pairs it with the quality and latency results to show what was retained when the allocation changed. MT-NLG 530B

Accelerators used for MT-NLG 530B serving on A100 80GB hardware

The SmoothQuant deployment fits on a single node at similar measured latency.

Accelerators used for MT-NLG 530B serving on A100 80GB hardwareFloating-point deployment: 16Floating-point deployment16SmoothQuant deployment (this paper): 8SmoothQuant deployment (this paper)8
The numbers
System or settingGPUs
Floating-point deployment16
SmoothQuant deployment (this paper)8

Generating tokens after the prompt

The decoding stage adds new tokens successively, with later computation depending on the sequence produced so far. This stage has its own latency measure, the time per generated token. The paper reports lower per-token latency with SmoothQuant than with FP16, with a maximum speedup of 1.42x in the decoding experiments. It also reports a reduction of roughly half in the inference memory footprint. Here the timing answers how quickly a deployed network can take its next step after processing the input, one of the costs of text generation.

Prompt-processing latency and per-token decoding latency describe distinct portions of the request. A long input gives substantial work to the context stage. Generating a longer response increases the importance of per-token decoding time. The reported acceleration figures apply to the respective measurements, and the end-to-end effect for a request would depend on how much of each kind of work it contains. The change in device count is a capacity result reported alongside latency. Together these measurements connect the same numerical conversion to how long different operations take and how much accelerator memory is needed to perform them.

What the ablations show

Why the amount of smoothing matters

The authors vary migration strength on OPT-175B and test the resulting quantized network on LAMBADA. Every value of α uses the same form of compensating transformation. Changing α alters the relative magnitudes presented to the activation and weight quantizers, while the exact-product identity still holds. The experiment therefore tests whether the way the variation is distributed matters to performance after rounding.

The authors report that below 0.4 the activations are still difficult to quantize. The large channels retain enough of their original advantage in magnitude to limit resolution for the smaller ones. Above 0.6, the weight operand becomes difficult to quantize. Its adjusted rows now differ enough in scale that weight rounding causes a larger problem. LAMBADA performance is maintained in the reported 0.4-0.6 region, where the authors find small quantization errors on both sides. This is the empirical case for choosing an intermediate strength. A smoother activation on its own can coincide with worse performance if the compensation makes the weights harder to represent.

The successful interval describes the OPT-175B LAMBADA experiment. The GLM-130B setting uses a stronger migration because the authors identify a more extensive activation outlier problem. In their method discussion they describe roughly 30% outliers for GLM-130B. The comparison shows why a method that controls both ranges can be shared across families while its settings differ. The ablation supplies direct evidence for the balance in one particular setting, and the family experiments show the balance being applied under other conditions.

Which dimension needs a finer scale

The paper also simulates activation quantization at different granularities and compares average accuracy on HellaSwag, PIQA, LAMBADA and WinoGrande. A scale for every input channel recovers performance close to the FP16 reference. Per-token scaling makes little improvement over a shared per-tensor scale in this diagnostic. That pattern supports the claim that magnitudes vary in the dimension where each token has several features, rather than mainly from one token to the next. Assigning a step to the whole row still makes the large and small features in that row compete for resolution.

The simulation is informative precisely because it can give the quantizer a set of scales that would be awkward for the efficient integer kernel. It checks the numerical consequence of giving each channel its own rounding grid. The subsequent SmoothQuant experiments check a different mechanism. They reorganize the values in those channels before quantization, so the running kernel can use steps shared over a larger group. The similarity to the floating-point benchmark in the two cases supports the explanation that the arrangement of magnitudes across channels is central to the original degradation.

A visualization of the OPT-13B layer gives a view of that mechanism before and after the transformation. In the original activations, some channels stand out across the tokens plotted, while the original weights are comparatively even. In the transformed operands the activation extremes are much less pronounced. The weight distribution takes on some of the disparity and remains relatively smooth in the illustration. This visual check explains the direction of the change. The migration-strength experiment adds a task-level check of how much change the system can tolerate after it quantizes the operands.

What makes the cheaper quantizers faster

The quantization-scheme comparison measures GPU latency in PyTorch at batch size 4. The paper reports lower latency as it moves from O1 through O3. Sharing a step across the tensor simplifies quantization relative to giving each token a separate one. Fixing the step during calibration also removes the runtime calculation of that step. The latency comparison finds that each tested SmoothQuant setting is faster than FP16 in this setup, whereas LLM.int8() is usually slower. Both the granularity of the steps and when they are computed contribute to the operating points the authors compare.

The accuracy results explain the condition the authors place on preferring a cheaper scheme. On OPT-175B the fastest setting retains performance comparable to FP16, so the runtime savings are available with little measured cost in accuracy. On BLOOM-176B and GLM-130B the static setting gives a reported decline on the respective task averages. A dynamic or finer scheme can conserve more of the reference performance by using scales better matched to the current input. The experiments show where that flexibility is valuable and where preparation already does enough to make a fixed scale work.

Taken together, these analyses test distinct parts of the proposed explanation. The visualization shows the recurring channel pattern, the simulated quantizer tests the effect of matching the scales to it, and the α sweep tests the need to balance errors in both operands. The latency comparison then tests the practical value of the shared scales the transformation enables. A purely numerical result would leave the speed question open, and a timing result alone would give little basis for understanding why the rounded network remains accurate.

Limitations

Limits the authors identify

The authors explicitly note that activation ranges vary with the inputs. A fixed step estimated from calibration captures the distribution the authors observed in preparing the network. The O3 loss on BLOOM-176B is the case they attribute to a difference between those observations and the statistics of the evaluation inputs. The mathematical cancellation between the operands is still valid for different text. The quality of the ensuing approximation depends on the spread of the new values relative to the calibrated scales. This distinguishes the general algebraic property from the empirical success of static rounding.

The paper also recognizes differences in quantization difficulty across families. GLM-130B needs a stronger migration setting in the authors’ procedure, and it receives additional clipping during static calibration. The authors leave the role of different architectures and training choices as a question for further investigation. The reported calibration findings support adapting the method to the distribution seen in the network under study. They give an empirical basis for the settings in the experiments, with the behavior of another architecture depending on its own activation and weight statistics.

The appendix explains why there is no direct GPTQ speed comparison. The low-bit GPTQ kernel that the authors considered supports generation with batch size 1 and is optimized for OPT-175B. SmoothQuant is also evaluated on context processing and batched execution and uses FasterTransformer for large deployments. Software capabilities and optimization would affect the comparison. The authors acknowledge that weight-only quantization can be attractive when there are very few input tokens and moving the weights accounts for much of the work. As a consequence, their tests address the benefit of W8A8 for the included implementations and workloads.

The appendix also identifies memory for the key-value cache as a separate concern. The cache retains information used by attention in subsequent decoding steps. Its footprint grows important for long inputs and large batches. To illustrate the scale, the paper cites a case where the cache totals 3TB at batch size 512 and context length 2048, or 3× the size of the weights in that example. The authors discuss activation quantization as a way to address such storage costs. They also raise the possibility of combining their approach with GPTQ’s weight treatment to pursue W4A4. The paper’s experiments establish W8A8 results, while this more aggressive combination is left as future work.

Limits visible in the experimental design

An accurate quantized network in these experiments is one that scores close to its FP16 reference on the chosen benchmarks. Matching accuracy can occur despite differences on individual examples. Perplexity similarly summarizes predictive behavior over the text it measures and leaves the distribution of changes across examples open. The exactness of the rescaling formula applies before rounding. The later experiments on Mixtral and the other architectures demonstrate close WikiText-2 perplexity at the chosen lengths and quantization settings. Claims about individual continuations or other uses would require measurements directed at those outcomes.

The evaluation evidence has different breadth across families. OPT is studied across sizes and on a broad benchmark suite. The instruction-tuned result covers OPT-IML-30B on WikiText-2 and LAMBADA. GLM-130B uses a task set chosen to address overlap with its training data, and the further architecture comparisons center on perplexity. These designs allow effective comparisons with the relevant FP16 references. They leave a less controlled basis for comparing the intrinsic quantization difficulty of all the families, because their scores, evaluation inputs and some conversion settings differ.

The calibration procedure is also specific. The authors report reusing the prepared network across downstream tasks after collecting statistics from the Pile. This demonstrates transfer from that calibration procedure to the included benchmarks. The experiments give less information about how results vary across alternative calibration corpora or distributions deliberately chosen to stress the scales. The max-based rule is motivated by the observed persistence of outlier channels. Its effectiveness depends on how well that observation and the measured ranges describe the traffic the quantized network later receives. Static calibration makes that dependence particularly visible.

The timing results reflect the software and hardware the authors measured. The paper’s use of standard INT8 kernels explains how it obtains a high-throughput path. The amount of end-to-end acceleration depends on how much execution time those products occupy, what work the implementation performs around them and how the FP16 path is optimized. Prompt length, batching and the work of decoding are part of the benchmark conditions. The multi-GPU comparisons further change the allocation alongside the precision. They demonstrate the latency and memory of the tested deployments, while same-device speedups come from the experiments designed to hold that part of the setup fixed.

What came after

Calibration, outliers and lower precision

The later citation record includes several papers that make calibration or numerical representation their main subject. OmniQuant presents quantization organized around omnidirectional calibration. Its focus continues a question central to SmoothQuant. The choices made while preparing a network determine which values it can represent accurately during inference. SmoothQuant gives a specific answer based on channel maxima and a migration parameter. OmniQuant’s stated contribution places calibration itself at the center of the approach. The citation connects the two lines of work, with the title establishing the scope of the later method.

QuaRot pursues outlier-free 4-bit inference in a rotated representation. Its connection to SmoothQuant is the idea that the numerical coordinates used for inference affect how hard the values are to round. SmoothQuant changes the sizes assigned to existing feature axes while compensating in the next operand. QuaRot’s stated operation changes the representation through rotation. Its precision target also addresses the move to narrower formats raised in the SmoothQuant appendix, through a transformation described in different terms.

OWQ makes outlier awareness part of weight quantization for efficient fine-tuning and inference. This directs attention to the operand that receives some of the variation in SmoothQuant. Both approaches treat the distribution of unusually large values as a design concern. The stated application to fine-tuning also widens the context in which quantized weights matter. LLM-QAT addresses quantization through data-free quantization-aware training. Its scope distinguishes the roles of learning and calibration in this research area. SmoothQuant prepares an already trained network using observations on sample sentences, while the later work puts quantization into its stated training procedure.

Atom pursues low-bit quantization for serving with accuracy and efficiency as joint objectives. That pairing continues SmoothQuant’s systems question. A representation has to preserve enough task performance and deliver a benefit when the serving implementation executes it. The connection is at the level of the objective furnished by the citing work’s title. An ordering of the methods by speed or accuracy would need measurements under comparable serving conditions.

Cache memory and the rest of the workload

KVQuant pursues long-context inference through quantization of the key-value cache. KIVI also targets that cache, with an asymmetric, tuning-free 2bit scheme. These citations develop a memory problem the SmoothQuant appendix points out. The matrices used for computation and the attention state kept for later decoding occupy different parts of inference memory. Quantizing stored state makes the latter a direct object of study. The caching papers’ stated scope describes that shift of attention without requiring that they use SmoothQuant’s rescaling rule.

FlexGen takes single-GPU generative inference and high throughput as its target. That shares the concern with limited device capacity demonstrated by the SmoothQuant deployments. The emphasis on throughput highlights a question distinct from how soon a particular request completes. SARATHI approaches serving through the scheduling of decoding alongside chunks of prompt processing. Sarathi-Serve puts the trade between throughput and latency in the foreground. These works connect to the distinction SmoothQuant measures between processing the input and producing new tokens. Their stated contributions focus on arranging the work of requests as a serving problem.

LLMLingua targets inference speed through prompt compression. It acts on the amount of input for the network to process, the workload whose execution SmoothQuant times in its context experiments. Medusa targets acceleration through multiple decoding heads, connecting to the part of the request for which SmoothQuant reports time per generated token. These citing directions show how changes to the input and to decoding can address the same practical latency goals as a change to the arithmetic.

The compression literature around SmoothQuant also includes SparseGPT, which studies accurate one-shot pruning at large scale. Pruning changes which parameters contribute to the computation. SmoothQuant changes the precision of the values taking part in it. Both address the resources required to run an existing trained network. That larger field of methods is the subject of A Survey on Model Compression for Large Language Models. The later citations place SmoothQuant among work on calibrated representations, on the cost of storing attention state and on the efficiency of serving complete requests. Their stated contributions establish those connections. Claims of direct reuse of its formula would require details of the respective methods beyond the citation relationship.

Cite

Cite as Guangxuan Xiao, Ji Lin, Mickael Seznec, Hao Wu, Julien Demouth and Song Han. 2022. SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models. arXiv:2211.10438.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2211.10438 · arXiv 2211.10438

@misc{xiao2022smoothquant,
  title = {{SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models}},
  author = {Guangxuan Xiao, Ji Lin, Mickael Seznec, Hao Wu, Julien Demouth and Song Han},
  year = {2022},
  doi = {10.48550/arxiv.2211.10438},
  eprint = {2211.10438},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2211.10438}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/xiao-2022-smoothquant-accurate-efficient-post-training/

References

47 references, from the paper's own bibliography.

  1. Almazrouei, E., Alobeidli, H., Alshamsi, A., Cappelli, A., Cojocaru, R., Debbah, M., Étienne Goffinet, Hesslow, D., Launay, J., Malartic, Q., Mazzotta, D., Noune, B., Pannier, B., and Penedo, G. The falcon series of open language models, 2023. our card
  2. Bisk, Y., Zellers, R., Bras, R. L., Gao, J., and Choi, Y. Piqa: Reasoning about physical commonsense in natural language. In Thirty-Fourth AAAI Conference on Artificial Intelligence, 2020. our card
  3. Bondarenko, Y., Nagel, M., and Blankevoort, T. Understanding and overcoming the challenges of efficient transformer quantization. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pp. 7947–7969, Online and Punta Cana, Dominican Republic, November 2021. Association for Computational Linguistics. URL https://aclanthology.org/2021.emnlp-main.627. our card
  4. Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D., Wu, J., Winter, C., Hesse, C., Chen, M., Sigler, E., Litwin, M., Gray, S., Chess, B., Clark, J., Berner, C., McCandlish, S., Radford, A., Sutskever, I., and Amodei, D. Language models are few-shot learners. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H. (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 1877–1901. Curran Associates, Inc., 2020a. URL https://proceedings.neurips.cc/paper/2020/file/1457c0d6bfcb4967418bfb8ac142f64a-Paper.pdf. our card
  5. Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. Language models are few-shot learners. Advances in neural information processing systems, 33:0 1877–1901, 2020b. our card
  6. Chowdhery, A., Narang, S., Devlin, J., Bosma, M., Mishra, G., Roberts, A., Barham, P., Chung, H. W., Sutton, C., Gehrmann, S., et al. Palm: Scaling language modeling with pathways. arXiv preprint arXiv:2204.02311, 2022. our card
  7. Dettmers, T., Lewis, M., Belkada, Y., and Zettlemoyer, L. Llm.int8(): 8-bit matrix multiplication for transformers at scale. arXiv preprint arXiv:2208.07339, 2022. our card
  8. Devlin, J., Chang, M., Lee, K., and Toutanova, K. BERT: pre-training of deep bidirectional transformers for language understanding. In NAACL-HLT 2019, pp. 4171–4186. Association for Computational Linguistics, 2019. our card
  9. Du, N., Huang, Y., Dai, A. M., Tong, S., Lepikhin, D., Xu, Y., Krikun, M., Zhou, Y., Yu, A. W., Firat, O., et al. Glam: Efficient scaling of language models with mixture-of-experts. In International Conference on Machine Learning, pp. 5547–5569. PMLR, 2022. our card
  10. Frantar, E., Ashkboos, S., Hoefler, T., and Alistarh, D. Gptq: Accurate post-training quantization for generative pre-trained transformers. arXiv preprint arXiv:2210.17323, 2022. our card
  11. Gao, L., Biderman, S., Black, S., Golding, L., Hoppe, T., Foster, C., Phang, J., He, H., Thite, A., Nabeshima, N., et al. The pile: An 800gb dataset of diverse text for language modeling. arXiv preprint arXiv:2101.00027, 2020. our card
  12. Han, S., Mao, H., and Dally, W. J. Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Coding. In ICLR, 2016. OpenAlex ↗ · Scholar ↗
  13. Hendrycks, D., Burns, C., Basart, S., Zou, A., Mazeika, M., Song, D., and Steinhardt, J. Measuring massive multitask language understanding. CoRR, abs/2009.03300, 2020. URL https://arxiv.org/abs/2009.03300. our card
  14. Jacob, B., Kligys, S., Chen, B., Zhu, M., Tang, M., Howard, A., Adam, H., and Kalenichenko, D. Quantization and training of neural networks for efficient integer-arithmetic-only inference. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2704–2713, 2018. our card
  15. Jiang, A. Q., Sablayrolles, A., Mensch, A., Bamford, C., Chaplot, D. S., de las Casas, D., Bressand, F., Lengyel, G., Lample, G., Saulnier, L., Lavaud, L. R., Lachaux, M.-A., Stock, P., Scao, T. L., Lavril, T., Wang, T., Lacroix, T., and Sayed, W. E. Mistral 7b, 2023. OpenAlex ↗ · Scholar ↗
  16. Jiang, A. Q., Sablayrolles, A., Roux, A., Mensch, A., Savary, B., Bamford, C., Chaplot, D. S., de las Casas, D., Hanna, E. B., Bressand, F., Lengyel, G., Bour, G., Lample, G., Lavaud, L. R., Saulnier, L., Lachaux, M.-A., Stock, P., Subramanian, S., Yang, S., Antoniak, S., Scao, T. L., Gervet, T., Lavril, T., Wang, T., Lacroix, T., and Sayed, W. E. Mixtral of experts, 2024. OpenAlex ↗ · Scholar ↗
  17. Kim, S., Gholami, A., Yao, Z., Mahoney, M. W., and Keutzer, K. I-bert: Integer-only bert quantization. In International conference on machine learning, pp. 5506–5518. PMLR, 2021. our card
  18. Lewis, M., Liu, Y., Goyal, N., Ghazvininejad, M., Mohamed, A., Levy, O., Stoyanov, V., and Zettlemoyer, L. Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. arXiv preprint arXiv:1910.13461, 2019. our card
  19. Lin, J., Chen, W.-M., Lin, Y., Gan, C., Han, S., et al. Mcunet: Tiny deep learning on iot devices. Advances in Neural Information Processing Systems, 33:0 11711–11722, 2020. OpenAlex ↗ · Scholar ↗
  20. Liu, Z., Wang, Y., Han, K., Zhang, W., Ma, S., and Gao, W. Post-training quantization for vision transformer. Advances in Neural Information Processing Systems, 34:0 28092–28103, 2021. OpenAlex ↗ · Scholar ↗
  21. Merity, S., Xiong, C., Bradbury, J., and Socher, R. Pointer sentinel mixture models, 2016. our card
  22. Mihaylov, T., Clark, P., Khot, T., and Sabharwal, A. Can a suit of armor conduct electricity? a new dataset for open book question answering. In EMNLP, 2018. OpenAlex ↗ · Scholar ↗
  23. Nagel, M., Baalen, M. v., Blankevoort, T., and Welling, M. Data-free quantization through weight equalization and bias correction. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 1325–1334, 2019. OpenAlex ↗ · Scholar ↗
  24. Paperno, D., Kruszewski, G., Lazaridou, A., Pham, N. Q., Bernardi, R., Pezzelle, S., Baroni, M., Boleda, G., and Fernández, R. The LAMBADA dataset: Word prediction requiring a broad discourse context. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1525–1534, Berlin, Germany, August 2016. Association for Computational Linguistics. . URL https://aclanthology.org/P16-1144. our card
  25. Park, G., Park, B., Kwon, S. J., Kim, B., Lee, Y., and Lee, D. nuqmm: Quantized matmul for efficient inference of large-scale generative language models. arXiv preprint arXiv:2206.09557, 2022. OpenAlex ↗ · Scholar ↗
  26. Pope, R., Douglas, S., Chowdhery, A., Devlin, J., Bradbury, J., Levskaya, A., Heek, J., Xiao, K., Agrawal, S., and Dean, J. Efficiently scaling transformer inference. arXiv preprint arXiv:2211.05102, 2022. our card
  27. Rae, J. W., Borgeaud, S., Cai, T., Millican, K., Hoffmann, J., Song, F., Aslanides, J., Henderson, S., Ring, R., Young, S., et al. Scaling language models: Methods, analysis & insights from training gopher. arXiv preprint arXiv:2112.11446, 2021. our card
  28. Roemmele, M., Bejan, C. A., and Gordon, A. S. Choice of plausible alternatives: An evaluation of commonsense causal reasoning. In Logical Formalizations of Commonsense Reasoning, Papers from the 2011 AAAI Spring Symposium, Technical Report SS-11-06, Stanford, California, USA, March 21-23, 2011. AAAI, 2011. URL http://www.aaai.org/ocs/index.php/SSS/SSS11/paper/view/2418. OpenAlex ↗ · Scholar ↗
  29. Sakaguchi, K., Bras, R. L., Bhagavatula, C., and Choi, Y. Winogrande: An adversarial winograd schema challenge at scale. arXiv preprint arXiv:1907.10641, 2019. our card
  30. Scao, T. L., Fan, A., Akiki, C., Pavlick, E., Ilić, S., Hesslow, D., Castagné, R., Luccioni, A. S., Yvon, F., Gallé, M., et al. Bloom: A 176b-parameter open-access multilingual language model. arXiv preprint arXiv:2211.05100, 2022. our card
  31. Shen, S., Dong, Z., Ye, J., Ma, L., Yao, Z., Gholami, A., Mahoney, M. W., and Keutzer, K. Q-bert: Hessian based ultra low precision quantization of bert. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pp. 8815–8821, 2020. OpenAlex ↗ · Scholar ↗
  32. Shoeybi, M., Patwary, M., Puri, R., LeGresley, P., Casper, J., and Catanzaro, B. Megatron-lm: Training multi-billion parameter language models using model parallelism. CoRR, abs/1909.08053, 2019. URL http://arxiv.org/abs/1909.08053. our card
  33. Smith, S., Patwary, M., Norick, B., LeGresley, P., Rajbhandari, S., Casper, J., Liu, Z., Prabhumoye, S., Zerveas, G., Korthikanti, V., et al. Using deepspeed and megatron to train megatron-turing nlg 530b, a large-scale generative language model. arXiv preprint arXiv:2201.11990, 2022. our card
  34. Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M.-A., Lacroix, T., Rozière, B., Goyal, N., Hambro, E., Azhar, F., et al. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971, 2023a. our card
  35. Touvron, H., Martin, L., Stone, K., Albert, P., Almahairi, A., Babaei, Y., Bashlykov, N., Batra, S., Bhargava, P., Bhosale, S., Bikel, D., Blecher, L., Ferrer, C. C., Chen, M., Cucurull, G., Esiobu, D., Fernandes, J., Fu, J., Fu, W., Fuller, B., Gao, C., Goswami, V., Goyal, N., Hartshorn, A., Hosseini, S., Hou, R., Inan, H., Kardas, M., Kerkez, V., Khabsa, M., Kloumann, I., Korenev, A., Koura, P. S., Lachaux, M.-A., Lavril, T., Lee, J., Liskovich, D., Lu, Y., Mao, Y., Martinet, X., Mihaylov, T., Mishra, P., Molybog, I., Nie, Y., Poulton, A., Reizenstein, J., Rungta, R., Saladi, K., Schelten, A., Silva, R., Smith, E. M., Subramanian, R., Tan, X. E., Tang, B., Taylor, R., Williams, A., Kuan, J. X., Xu, P., Yan, Z., Zarov, I., Zhang, Y., Fan, A., Kambadur, M., Narang, S., Rodriguez, A., Stojnic, R., Edunov, S., and Scialom, T. Llama 2: Open foundation and fine-tuned chat models, 2023b. our card
  36. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I. Attention is all you need. Advances in neural information processing systems, 30, 2017. our card
  37. Wang, A., Singh, A., Michael, J., Hill, F., Levy, O., and Bowman, S. R. GLUE: A multi-task benchmark and analysis platform for natural language understanding. CoRR, abs/1804.07461, 2018. URL http://arxiv.org/abs/1804.07461. our card
  38. Wang, H., Zhang, Z., and Han, S. Spatten: Efficient sparse attention architecture with cascade token and head pruning. CoRR, abs/2012.09852, 2020. URL https://arxiv.org/abs/2012.09852. our card
  39. Wang, K., Liu, Z., Lin, Y., Lin, J., and Han, S. HAQ: Hardware-Aware Automated Quantization with Mixed Precision. In CVPR, 2019. OpenAlex ↗ · Scholar ↗
  40. Wei, X., Zhang, Y., Zhang, X., Gong, R., Zhang, S., Zhang, Q., Yu, F., and Liu, X. Outlier suppression: Pushing the limit of low-bit transformer language models, 2022. URL https://arxiv.org/abs/2209.13325. OpenAlex ↗ · Scholar ↗
  41. Williams, A., Nangia, N., and Bowman, S. A broad-coverage challenge corpus for sentence understanding through inference. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 1112–1122. Association for Computational Linguistics, 2018. URL http://aclweb.org/anthology/N18-1101. our card
  42. Yao, Z., Aminabadi, R. Y., Zhang, M., Wu, X., Li, C., and He, Y. Zeroquant: Efficient and affordable post-training quantization for large-scale transformers, 2022. URL https://arxiv.org/abs/2206.01861. our card
  43. Yu, G.-I., Jeong, J. S., Kim, G.-W., Kim, S., and Chun, B.-G. Orca: A distributed serving system for $\{$Transformer-Based$\}$ generative models. In 16th USENIX Symposium on Operating Systems Design and Implementation (OSDI 22), pp. 521–538, 2022. our card
  44. Zellers, R., Holtzman, A., Bisk, Y., Farhadi, A., and Choi, Y. Hellaswag: Can a machine really finish your sentence? CoRR, abs/1905.07830, 2019. URL http://arxiv.org/abs/1905.07830. OpenAlex ↗ · Scholar ↗
  45. Zeng, A., Liu, X., Du, Z., Wang, Z., Lai, H., Ding, M., Yang, Z., Xu, Y., Zheng, W., Xia, X., et al. Glm-130b: An open bilingual pre-trained model. arXiv preprint arXiv:2210.02414, 2022. our card
  46. Zhang, S., Roller, S., Goyal, N., Artetxe, M., Chen, M., Chen, S., Dewan, C., Diab, M., Li, X., Lin, X. V., Mihaylov, T., Ott, M., Shleifer, S., Shuster, K., Simig, D., Koura, P. S., Sridhar, A., Wang, T., and Zettlemoyer, L. Opt: Open pre-trained transformer language models, 2022. URL https://arxiv.org/abs/2205.01068. our card
  47. Zhao, R., Hu, Y., Dotzel, J., De Sa, C., and Zhang, Z. Improving neural network quantization without retraining using outlier channel splitting. In International conference on machine learning, pp. 7543–7552. PMLR, 2019. OpenAlex ↗ · Scholar ↗