SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shot
Paper · 2023 · Elias Frantar and Dan Alistarh
Summary
A pretrained language model still needs somewhere to keep its weights and a way to use them every time it generates text. The larger the network, the more those requirements constrain where it can run. SparseGPT asks how many connections in a pretrained GPT network can be removed while keeping its predictions close to those of the original. The authors call the procedure one-shot because it produces a sparse network without a recovery phase of retraining or fine-tuning.
SparseGPT uses a sample of ordinary web text to observe the inputs to each layer. It then turns selected weights into zeros and changes other weights to offset the effects of those removals. To see why compensation is possible, consider two input features that tend to vary together. If a layer loses a connection from one feature, adjusting its connection from the other can recover some of the original response. The challenge is to make those adjustments across enormous weight matrices. SparseGPT works through their columns in a common order, letting output rows share the expensive calculations while choosing their own connections to keep. Its updates depend on local layer behavior and require no gradient from a loss over the full network.
The largest tests use OPT-175B and BLOOM-176B. The paper reports 50-60% unstructured sparsity with small changes in perplexity, its main measure of text prediction, and a pruning time of under 4.5 hours on a single GPU. The sparsity a network can tolerate depends on how the weights are chosen. On OPT-175B, removing the smallest weights by magnitude begins to cause substantial damage beyond 10% sparsity. SparseGPT reaches 60% with a comparable change in perplexity. In the OPT series, the larger variants generally give up less predictive quality at the same SparseGPT setting. The authors suggest that the largest networks may have more parameters than they need for the measured behavior and leave that explanation open.
SparseGPT can also place zeros in regular 2:4 and 4:8 patterns. These give the pruning procedure less freedom, with a generally higher accuracy cost, and offer a layout that compatible computation can exploit. Another option is to round the surviving weights to lower precision during the same pass. In the raw-WikiText2 test for OPT-175B, joint 50% pruning and 4-bit quantization gives perplexity of 8.29, compared with 8.68 for a GPTQ 3-bit representation matched for weight storage. The prediction results cover more settings than the timing studies. The latter establish gains for particular CPU and GPU workloads and leave the speed of full-scale generation open.
Deep dive: SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shot
SparseGPT removes weights from large GPT systems without retraining and tests how much pruning preserves text prediction and task accuracy. · about 39 minutes to read
The problem and its context
Why the cost continues after training
Training produces a collection of learned numerical values. Using the resulting network requires access to those values whenever the relevant computations run. The authors illustrate the storage problem with a GPT network of 175 billion parameters. They put the weight requirement at at least 320GB in half precision, using multiples of 1024 in that estimate. Their example of inference hardware calls for at least five A100 GPUs, each with 80GB of memory. That example motivates work on compression even when the cost of pretraining has already been paid.
Quantization reduces the precision used to represent values. A weight that could originally take many possible values is stored as one of a smaller set. Pruning changes which learned connections participate in the computation. It can remove individual weights, yielding unstructured sparsity, or remove larger units, such as matrix rows or columns. A semi-structured pattern lies between these possibilities. It retains a choice among individual coefficients within a group and imposes a rule on how many may be removed from that group. In each case, the compression decision changes the numerical operation that the network will carry out.
These approaches address related costs. Lower precision reduces the space needed for each stored coefficient. A sparse representation can omit zero-valued coefficients and record where the surviving ones belong. With suitable execution support, it can also avoid arithmetic associated with the zeros. The authors use this distinction to motivate studying pruning beside quantization and eventually combining the two. For post-training pruning to be practically useful, though, the effort of finding a good sparse network also has to fit within the resources that made compression attractive in the first place.
Why earlier pruning methods were hard to scale
Work on pruning predates the GPT networks examined here. The paper describes successful applications in vision and at smaller language-network scales, as well as a practical difficulty with the most accurate approaches. Removing weights can damage the learned behavior enough that a further period of training is needed to recover it. At GPT scale, that recovery carries substantial computation and tuning costs. The authors therefore ask what can be done when the starting point is an already optimized network and the available data consist of a modest calibration sample.
Earlier post-training methods had already made the problem more tractable by breaking the network into layers. They evaluated a proposed change by giving an original layer and its reconstructed version the same inputs and measuring their disagreement. That goal calls for a choice of which connections survive and a choice of what values they take. Combining the choices directly produces a difficult search. Once the surviving connections have been specified, their values can be fitted through a local squared-error problem. The prior work therefore offered a way to preserve behavior with much smaller optimization problems, while leaving considerable room for different ways of solving them.
A natural way to choose connections is to order weights by absolute value and prune the smallest. Magnitude pruning is easy to apply because every candidate already has a score, its stored coefficient. AdaPrune used magnitude to choose weights and then applied stochastic gradient descent to fit the survivors to the layer’s original behavior. Iterative AdaPrune divided removal into stages and fitted the remaining weights again between stages. Optimal Brain Compression, or OBC, took this interleaving further. Its greedy procedure removed an individual weight and used a formula to refit the row before proceeding. The paper also traces a much earlier use of repeated linear regression to pruning in small networks.
Each approach spends effort at a different point. Magnitude can rank a matrix without examining how its inputs behave. A reconstruction step uses those inputs to repair some of the effects of the selected zeros. Repeating the reconstruction as removals proceed lets future choices benefit from the new weight values. But the method must pay for those updates, and exact updates tailored to a large number of different sparsity patterns are expensive. The authors project that scaling AdaPrune’s cost linearly to a 175B transformer would put the job in the range of several hundred hours. They describe stronger reconstruction approaches as more expensive or as having less favorable scaling. The distinction between a projection and a measured pruning time matters in assessing the size of this obstacle.
What quantization had already established
The paper places SparseGPT in a period when most compression work on very large GPT networks had taken the quantization route. Research including ZeroQuant and LLM.int8() investigated rounding at billion-parameter scales. As the authors describe it, rounding weights to 8-bit representations was feasible, while rounding the activations passed between layers was harder because some input features took unusually large values. That distinction made weights and activations separate targets for compression even when both appeared in the same matrix computation. ZeroQuant · LLM.int8()
GPTQ provides a closer algorithmic predecessor. In the paper’s account, GPTQ uses information about the curvature of a layer’s reconstruction error to compensate for rounding the weights. It demonstrated low-precision weight quantization on very large networks and supplied a column-by-column framework for committing weights to new values. SmoothQuant addressed a different part of the problem by making joint activation and weight quantization easier through a smoothing procedure, with GPU kernels to execute the resulting operations. The authors discuss both because a technique for removing weights can coexist with techniques that alter their precision, and because the unusually large features encountered in quantization can also matter for pruning. GPTQ · SmoothQuant
SparseGPT takes the earlier objective of preserving a layer’s responses and asks how much of the calculation can be shared. Every output row of a linear transformation receives the same input features. This common input seems to offer an opportunity for reuse. Yet the rows can rely on different features, so they may need different sets of surviving connections. The scale problem is to exploit the common input without forcing all rows to remove the same features. The paper’s answer is a common schedule for adjusting the weights, with the removal decisions left free to vary across rows.
The method, step by step
Use the existing network to set the reconstruction target
A linear transformation in a transformer takes an input vector and forms weighted sums of its features. The weight matrix has a column for each input feature and a row for each output coordinate. A particular weight controls how an input feature contributes to that output coordinate. Removing it suppresses that contribution wherever the feature is active. Calibration text lets the authors observe the size of the resulting changes and see which other features might offset them.
For each transformation being compressed, the input vectors observed on calibration text are collected into a matrix. Multiplying the original weights by those inputs gives the outputs that the reconstructed layer should approximate. The text supplies inputs and the pretrained weights supply the targets. The procedure therefore has no need for task answers or for a loss differentiated backward through the network. It makes changes to the learned weights, but each change is chosen to repair a local transformation after compression.
A mask records the connections chosen for retention. An entry of zero in the mask forces the corresponding weight to zero, and an entry of one permits the reconstructed value to pass through. A sparsity target specifies the fraction of entries to remove in the relevant part of the matrix. At a given target, many masks are possible. SparseGPT uses the response of the layer to distinguish masks that are likely to be easy to compensate for from ones that are likely to cause larger errors.
The SparseGPT pruning pass
The steps in order.
Express the problem as least squares
The layer objective considers the mask and the reconstructed weights together. The comparison uses the same input on both sides so that the measured error comes from changing the weight matrix.
argmin_{Mₗ, Ŵₗ} ‖WₗXₗ − (Mₗ ⊙ Ŵₗ)Xₗ‖₂²
The subscript ₗ denotes the layer. Wₗ is the original weight matrix, Xₗ is the matrix of calibration inputs, and WₗXₗ is the array of original outputs. Ŵₗ is the array of reconstructed weights. Mₗ is its binary mask, constrained to the prescribed density, and ⊙ multiplies matching entries of the two arrays. Juxtaposition with Xₗ denotes matrix multiplication. The minus sign takes the output residual. The squared norm ‖·‖₂² measures the sum of squared residual entries. The argmin asks for the choices of Mₗ and Ŵₗ with the smallest error.
The paper identifies the joint problem as NP-hard. A proposed mask fixes some coefficients at zero, however, and then fitting the remainder is a linear least-squares problem. Each output row can be reconstructed separately because its output depends on its own coefficients. Suppose a row has already been assigned its retained features. The fitting problem is to reproduce that row’s full original output using just the retained features as predictors. Any resemblance between the discarded features and the retained ones can help the fit.
There is a notation issue in the paper’s displayed row solution. The product in its last factor restricts both the original coefficients and their inputs to the kept indices. Read literally, that product already leaves out the contributions that reconstruction is meant to recover. The full layer objective instead specifies the output before the restriction. Written with that output named explicitly, the least-squares solution for an invertible retained-feature system is as follows.
ŵᵢ = (X_{Mᵢ} X_{Mᵢ}ᵀ)⁻¹ X_{Mᵢ} yᵢᵀ
The index i selects an output row. Mᵢ is the set of features retained in that row, and X_{Mᵢ} is the original input array restricted to those features. The row vector yᵢ contains the output of row i before pruning on all calibration inputs. The fitted coefficients on the retained features form the column vector ŵᵢ. The superscript ᵀ transposes an array and ⁻¹ denotes matrix inversion. Adjacent arrays are multiplied. The inverted product summarizes the relationships among the retained features, and the remaining factors relate those features to the target.
The paper uses a matrix formed from the layer inputs as its Hessian quantity. A Hessian describes the curvature of an objective as its variables change. Here that curvature is determined by the calibration input products because the error is quadratic in a row’s weights.
H = XXᵀ
H denotes the full Hessian quantity under the paper’s convention. X is the calibration input matrix for the current layer, with features as rows, and Xᵀ is its transpose. The matrix product has one row and one column per input feature. Its entries aggregate products of feature values across inputs. A feature’s diagonal entry reflects its squared values, while the off-diagonal entries bring pairs of features into the calculation.
Find the calculation that the rows can share
If a mask removes a feature from a row, that row’s least-squares system uses the submatrix for its retained features. All rows start with the same H, but their masks can select different submatrices. Inverting the shared full matrix and then restricting the result is generally a different operation from inverting the restricted matrix.
(H_{Mᵢ})⁻¹ ≠ (H⁻¹)_{Mᵢ}
Mᵢ denotes the kept feature indices in output row i, and a subscript Mᵢ selects the corresponding rows and columns of a square matrix. H is the full input-based Hessian quantity and ⁻¹ is inversion. The inequality sign expresses the difference between restricting before inversion on the left and restricting after inversion on the right. The two sides can differ because the full inverse incorporates relationships with features that the row-specific problem has excluded.
An independent inverse for each output row thus duplicates expensive work. The paper gives the all-row bound for this approach as follows.
O(d_row · d_col³)
Here d_row counts output rows and d_col counts input columns. O describes an asymptotic upper bound and · denotes multiplication. The exponent ³ reflects the cubic cost of a dense inverse in the input width. The factor d_row accounts for repeating the calculation across rows. In the transformer dimensions under discussion, the resulting cost grows with the fourth power of hidden width because the row and column dimensions scale together.
Forcing all rows to keep the same features would give them a single retained-feature system. In terms of the weight matrix, this would force decisions about whole columns. Each such decision would suppress the same input feature in every output row. The authors point to earlier experience with structured pruning as a reason to avoid that restriction when the goal is accurate high sparsity. They instead make every row agree on when it stops updating a column. A common update schedule is enough to reuse inverses, even if one row keeps the weight in a column that its neighbor drops.
View removal as a change that other weights can absorb
The authors build from the Optimal Brain Surgeon update, abbreviated OBS. Start with the current coefficients of a row at an optimum of its quadratic reconstruction problem. Force a particular coefficient to zero, and ask which changes to the available coefficients produce the smallest increase in error. The inverse Hessian tells the procedure which directions in weight space can accommodate that forced change.
δₘ = −(wₘ / [H⁻¹]ₘₘ) · H⁻¹[:, m]
The index m selects the coefficient being removed and wₘ is its current value. H⁻¹ is the inverse Hessian for the currently adjustable coefficients. The notation [H⁻¹]ₘₘ selects its diagonal entry at m, and H⁻¹[:, m] selects the entire column m, with the colon standing for all rows. The slash denotes division and the centered dot means that a scalar multiplies the column. The resulting vector δₘ contains the changes to make to the weights. At the selected position, its value cancels wₘ. At other positions, the entries determine the compensating changes.
The corresponding change in the reconstruction objective gives a score for the removal.
εₘ = wₘ² / [H⁻¹]ₘₘ
The symbol εₘ denotes the error increase under the paper’s quadratic convention. The weight index m, its value wₘ, and the inverse entry [H⁻¹]ₘₘ are the same as in the adjustment. The exponent ² squares the coefficient. The slash divides that square by the indicated diagonal entry. The score therefore depends on how large the coefficient currently is and on the opportunities the available features provide for compensating for it.
OBS often starts from a quadratic approximation to a loss. For this row reconstruction problem, the squared output residual is a quadratic function of the weights. Given a fixed final mask, repeated exact OBS steps can therefore arrive at the same fit as solving the full least-squares problem for that mask. After each removal, the reconstructed weights form an optimum over the remaining coordinates. The next step imposes a further zero and again fits the survivors. The eventual fit is determined by the set that survives. This observation concerns reconstruction for a specified mask. The procedure for deciding which mask to use remains a separate search.
Make the adjustable set common to every row
SparseGPT restricts the OBS update to a subset of coefficients. The subset includes the coefficient being removed and the other positions that are allowed to change. Using the Hessian appropriate to that subset gives an exact repair given those restrictions. The final reconstruction can be worse than the unrestricted fit because some coefficients that could have helped have already been fixed. The authors use that narrower optimization problem to make computation shareable.
To choose the subset, the algorithm takes the columns in their given order. At the beginning, any column can change. Each time it processes a column, it removes that column from the set of positions available for future repairs. It fixes both pruned and retained weights in the processed column. Thus every row has exactly the same adjustable feature positions at a given step, regardless of the locations selected for zeros.
U₁ = {1, …, d_col}
U₁ is the initial set of adjustable feature indices. The braces enclose a set, and the ellipsis represents the indices in order from 1 through d_col, the number of input columns.
Uⱼ₊₁ = Uⱼ ∖ {j}
The subscript j denotes the current column. Uⱼ is its adjustable set and Uⱼ₊₁ is the adjustable set at the following column. The set-difference sign ∖ removes the single index j. Later columns can therefore absorb a change introduced now, including positions that may themselves be selected for pruning when their turn comes. Positions already processed are fixed.
Restricting repairs in this order leaves the same Hessian subproblem for every output row at column j. The inverse changes with j and can be calculated once for all rows using it. Any row that loses the weight at j uses that inverse to calculate a repair, scaled by its own current weight. A retained weight is kept at its current value in pure pruning, so its row introduces no new residual at that step. A previous step may already have changed the retained value. The relevant value is the one the algorithm reaches when it processes the column.
Derive each smaller inverse from the preceding one
The shared schedule gives a sequence of nested input subsets. Inverting each subset independently would still waste computation. As the paper explains using Gaussian elimination, the inverse for the next subset can be obtained by a correction to the current inverse followed by deleting a row and a column.
(H_{Uⱼ₊₁})⁻¹ = (B − B[:, 1] B[1, :] / [B]₁₁)[2:, 2:]
H_{Uⱼ₊₁} is the Hessian submatrix for the feature indices that will still be adjustable after processing j. B denotes (H_{Uⱼ})⁻¹, the inverse for the current feature set, whose first coordinate is j in the original column order. B[:, 1] selects the first column, B[1, :] selects the first row, and their product is an outer product. The scalar [B]₁₁ is the first diagonal entry. Dividing the outer product by it gives the correction subtracted from B. The slice [2:, 2:] keeps the rows and columns starting at position 2. The sequence starts from the inverse for U₁, the complete set, which is H⁻¹ before taking account of the implementation’s dampening convention.
The correction matters for the same reason that masking and inversion cannot generally be exchanged. The entries in the inverse before the step reflect the feature scheduled to become fixed. Subtracting the outer product accounts for the elimination of that feature. The remaining inverse is then appropriate to a problem in which that feature is outside the adjustable set. Successive elimination also avoids the need to repeat the matrix inversion from scratch at the next column.
Θ(n · d_col²)
This is the paper’s cost for forming the initial Hessian quantity. The symbol n counts the input samples used in that calculation, d_col is the feature width, and · denotes multiplication. The exponent ² accounts for the feature pairs in the matrix. Θ gives the growth order of this calculation. The authors treat the amount of usable calibration input as a small multiple of feature width when describing the total scaling.
O(d_col³ + d_row · d_col²)
This is the resulting upper bound reported for the layer at that calibration scaling. The inverse sequence accounts for the cubic term in d_col, the number of columns. The second term bounds the updates across d_row rows, with a potentially long correction to the right of each processed column. The plus sign joins the contributions and · denotes multiplication. O again specifies the asymptotic bound. In the relevant transformer dimensions, the paper describes the result as cubic in hidden width. Removing an entire width factor from the reconstruction cost is what makes the proposed local solver practical at the target scale.
Choose the mask with the updated weights in view
The inverse sequence determines how to compensate for a removal. SparseGPT still needs to decide where to remove weights. A mask chosen at the start of the entire layer would use values that earlier repairs might subsequently change. For instance, a coefficient that starts out cheap to drop could become important to the reconstructed row after it has absorbed a prior correction. The authors want the mask to reflect these changes while preserving discretion about where the zeros go.
Selecting a fresh mask independently for each column would follow the corrected weights closely. But if each column had to supply the target fraction of removals, every feature would have the same pruning quota. The diagonal term in the OBS score is shared by rows for a given column, so a ranking within that column would simply follow weight magnitudes. A feature that is expensive to prune in many rows would still have to meet the quota, even when other columns offer cheaper removals.
SparseGPT assigns the target to a block of columns. For unstructured pruning, it scores the weights currently in the next Bₛ columns using the diagonal values for their positions in the inverse sequence. Bₛ is the number of columns included in a mask decision, with 128 as the default. The desired proportion of zeros comes from the lowest-scoring weights in that block. This leaves room for an expensive column to contribute fewer removals and a cheap one to contribute more. Once the block mask is decided, the procedure works through its columns, performing the repairs implied by that mask. At the next block boundary, it scores the next set of weights in the state left by the preceding updates.
This design uses current values at the time of block selection. A decision made for a block may still be based on a value that changes before its column is reached. A wider block allows a greater redistribution of zeros and lengthens that interval. A narrower block refreshes choices sooner and limits where the same number of zeros can go. The authors later vary this width to see whether either extreme works as well as intermediate windows.
Prepare the inverse and organize the updates
The implementation dampens the initial Hessian quantity. Adding to its diagonal improves the numerical conditions for computing an inverse when some feature directions are weakly supported by the calibration inputs.
H⁻¹ = (XXᵀ + λI)⁻¹
In this expression, H⁻¹ denotes the damped inverse passed to the algorithm. X contains the layer inputs and ᵀ denotes transposition. The product XXᵀ is the input-based matrix before dampening. I is an identity matrix of the same size and λ is the dampening amount. Adding λI adds that amount to each diagonal entry. The exponent ⁻¹ on the parenthesized sum denotes inversion. The authors scale the dampening amount using the average diagonal of the input matrix and use a multiplier of 0.01.
The paper borrows two implementation choices from GPTQ. A Cholesky decomposition, which represents a positive definite matrix through triangular factors, provides the information from the inverse sequence in a numerically robust form. Lazy batched updates organize part of the weight correction as a matrix operation. The computation still respects column order within the working block. Corrections destined for columns farther away can be collected and applied together before those weights are needed. This improves the balance between arithmetic and movement of weight data.
The batching width B controls the grouping of those arithmetic updates. The mask selection width Bₛ controls the interval between decisions about which weights to remove. The defaults share a value, which simplifies implementation. The reason for introducing each width remains distinct. The mathematics requires updated values at the points where they affect choices and repairs, and the implementation can group operations that do not need to be applied individually to distant columns in the meantime.
Change the allowed pattern or the value assigned at freezing
The simplest freezing rule sets a pruned coefficient to zero and leaves a retained one at the reconstructed value it has when its column is processed. Once assigned, either value is final for this pass.
compress(wʲ)ᵢ = 0 if j ∉ Mᵢ, and wʲᵢ otherwise
The function compress assigns final values to the current column wʲ. The superscript j is the column index, not a power, and i is the output row. Mᵢ is the set of retained feature indices for that row. The symbol ∉ means that j is outside the retained set. The output is zero for an excluded coefficient. Otherwise it is wʲᵢ, the current coefficient at row i and column j.
For semi-structured n:m sparsity, the mask has to place n zeros in each consecutive group of m weights along a row. The algorithm makes the selection window the group width m and chooses the n removals with the smallest OBS errors for that row and group. The restriction applies independently to each group. A low-cost removal in one group cannot take the place of a high-cost removal required in another. A layout such as 2:4 trades some freedom in reconstructing the weights for a pattern that supported hardware can exploit. Accelerating Sparse Deep Neural Networks
Weight quantization changes the value assigned to a retained coefficient. The algorithm rounds it to the nearest value on its quantization grid when it freezes the column. A coefficient chosen for removal still becomes zero. Either kind of commitment can leave a residual between the current value and the assigned value. The subsequent correction uses that residual, which lets pruning and quantization use the same pass over the layer.
E[:, j − i] ← (W[:, j] − M[:, j] · quant(W[:, j])) / [H⁻¹]ⱼⱼ
E is the array of normalized residuals for the batched update. In this expression i is the starting column of the working batch, j is the column being processed, and j − i locates its residual inside the batch. The colon selects all output rows. W[:, j] is the current column of weights and M[:, j] is the column of mask entries. The function quant rounds each supplied weight to the closest value on the chosen grid. The dot in the numerator multiplies matching entries, making the target zero for a removed weight and the rounded value for a retained one. Subtraction forms the residual, and the slash normalizes it by the diagonal term written [H⁻¹]ⱼⱼ in the paper’s update notation. The arrow assigns the result to E.
This joint calculation lets compensation for earlier rounding alter the weights considered for subsequent removals. Compensation for earlier pruning can likewise affect subsequent rounding. An earlier joint technique discussed by the authors first selected and reconstructed the sparse layer, then rounded its retained weights. SparseGPT’s freezing schedule lets the two sources of error influence the same sequence of reconstruction decisions, while reusing its matrix preparation and updates.
Carry the procedure through the network
For calibration, the authors randomly select 128 segments of 2048 tokens from the first shard of C4. The segments are generic web text. The pruning stage sees no examples tailored to the downstream accuracy tests. The original network processes the text to expose the feature inputs that the layer solver needs. The authors then proceed through the transformer layers in sequence, reducing the amount of working data needed simultaneously. In the principal uniform comparisons, the linear layers receive the stipulated sparsity treatment, with embeddings and the output head left outside it.
The official SparseGPT implementation uses PyTorch and handles checkpoints and datasets through HuggingFace Transformers. All of the reported pruning experiments use the post-training procedure, with no subsequent fine-tuning. Layer reconstruction is the recovery mechanism in those experiments. The question for evaluation is how well the full network holds up when all of those local changes are put together. PyTorch · HuggingFace Transformers
Experiments and results
Test predictive quality against each dense starting point
The OPT family supplies the size comparison, with multiple pretrained variants evaluated under a common set of pruning conditions. BLOOM-176B supplies a separate large-network test. Each sparse configuration is compared with the dense checkpoint from which it was made. The comparison asks how much quality that particular checkpoint gives up when compressed. This makes the change from the dense reference more meaningful for the paper’s scaling question than the absolute difference in quality between two differently sized checkpoints. OPT · BLOOM
Perplexity is the exponential of the average prediction loss on an evaluation sequence. The loss reflects the probabilities the network assigns to the tokens it is asked to predict. Better predictions give lower perplexity. The paper emphasizes this metric because it responds to changes in token probabilities that may leave the answer to a discrete test question unchanged. It complements it with task accuracy, which describes whether a prediction satisfies the evaluation criterion for an item.
The perplexity evaluations use the raw-WikiText2 test set, the PTB test set, and part of the C4 validation set. For each corpus, the authors concatenate the text samples and encode the result with the checkpoint’s tokenizer. They divided the token stream into consecutive, disjoint blocks of 2048 tokens, the longest history the evaluated systems could use. Raw-WikiText2 uses blank lines between text samples. PTB uses the text-only version and joins its samples directly. For C4, the authors take the first 256 segments of 2048 encoded tokens from the beginning of the first concatenated validation shard to limit evaluation cost. This is the validation measurement, separate from the random C4 sample used during compression. Penn Treebank
The task tests include LAMBADA, both the Easy and Challenge settings of ARC, PIQA, and StoryCloze. The authors use GPTQ’s zero-shot evaluation implementation, based on the EleutherAI evaluation harness. The dense and sparse versions go through the same evaluation code. The paper cautions that preprocessing can move absolute scores, so its primary claims concern the relative behavior of the compressed versions and their matched dense references. LAMBADA
Compare with magnitude pruning and AdaPrune
The baseline applicable across the full size range is layer-wise magnitude pruning. It uses the size of the weight itself to decide which entries to zero. The comparison measures how much accuracy SparseGPT gains over an inexpensive pruning rule at the same scale. Because SparseGPT changes both the removal criterion and the reconstruction, the comparison encompasses both changes.
The authors also compare with AdaPrune at smaller sizes. They use a memory-optimized implementation and tune its settings, obtaining an approximately 3× speedup for the cases of interest while preserving the quality of its solutions. AdaPrune improves substantially on magnitude pruning in the reported comparison, and SparseGPT yields better predictive quality. AdaPrune’s runtime is approximately 1.3 hours at 350M parameters and roughly 4.3 hours at 1.3B. The authors say that SparseGPT can process the 66B and 175B variants in approximately the same span on the same A100. These measurements concern the cost of carrying out the compression.
The pruning runs use an NVIDIA A100 with 80GB of memory. The paper describes the time for the largest jobs as roughly 4 hours in its experimental setup and gives under 4.5 hours as its headline bound for OPT-175B and BLOOM-176B. Sequential layer processing is part of how the experiment fits that device. The comparison with the multi-GPU dense deployment example in the introduction concerns different workloads: one is a sequential offline change to the weights, and the other concerns running dense inference.
Vary the amount and arrangement of sparsity
To compare across the OPT family, the authors uniformly prune the eligible linear layers to 50% unstructured sparsity, full 4:8 sparsity, or full 2:4 sparsity. The raw-WikiText2 test gives the main size comparison, with PTB test and C4 validation results reported as checks on the trend. Magnitude pruning deteriorates badly at 50% sparsity throughout the size series. Its larger OPT variants generally suffer sharper degradation. A poor result from magnitude pruning at large size therefore gives an incomplete picture of how much weight removal the starting checkpoint can tolerate.
With SparseGPT, the 50% unstructured comparison generally improves as the starting OPT checkpoint gets larger. At 2.7B parameters, the paper puts the raw-WikiText2 perplexity penalty at approximately 1 point. At 66B it describes the penalty as essentially absent. The largest OPT variant shows a small favorable movement on raw-WikiText2. The PTB and C4 evaluations show similar overall size trends and lack that small favorable movement. The cross-corpus result supports the claim about retaining quality at scale, while the favorable raw-WikiText2 change is specific to that evaluation.
The semi-structured patterns show a similar size trend with generally higher costs. Even with the same overall proportion of zeros, a tighter group rule may force removal of a connection that a more flexible mask could protect. On the raw-WikiText2 test at the largest OPT size, the reported increases in perplexity are 0.11 with 4:8 and 0.39 with 2:4. Both values measure the change from the dense counterpart. The comparison shows that the distribution of removed weights matters alongside their number.
The authors also vary the sparsity target on OPT-175B and BLOOM-176B rather than fixing it throughout the study. For OPT-175B, the reported threshold before major damage from magnitude pruning is 10%, while SparseGPT reaches 60% at a similar perplexity cost. BLOOM-176B tolerates up to 30% magnitude pruning without major loss, and SparseGPT reaches 50% at a similar degradation level. Thus the performance of the cheap baseline varies between the largest checkpoints, while the reconstruction-based method yields a higher usable sparsity setting in each comparison.
At 80% sparsity the authors still describe the SparseGPT predictions as having reasonable perplexity. That description concerns a more aggressive regime than the headline result about little change at 50-60%. Magnitude pruning exceeds 100 perplexity at 40% sparsity for OPT and 60% for BLOOM in the largest-checkpoint sweeps. The authors describe their low-impact settings as eliminating around 100 billion weights. The underlying evidence is the joint report of how much was removed and how the resulting network predicted, with a different operating point possible when greater error is acceptable.
Compare joint compression at matched weight storage
The joint experiment asks how best to spend a given budget for representing weights. One option uses few bits per weight and retains a dense set of connections. The other drops connections and spends more bits on the values that remain. Positions have a cost in the sparse representation. The authors assume that the non-zero values are stored together with a bitmask indicating their locations. Under that assumption, the paper equates the storage of 50% sparsity with 4-bit retained weights to the storage of dense 3-bit quantization.
OPT-175B raw-WikiText2 test perplexity at matched weight storage
The joint pruning and quantization result has lower perplexity at the stated storage budget.
The numbers
| System or setting | perplexity |
|---|---|
| GPTQ with 3-bit weights | 8.68 |
| SparseGPT with 50% sparsity and 4-bit retained weights (this paper) | 8.29 |
The main comparison favors the joint setting across the reported OPT range from 2.7B parameters upward. Its advantage is measured within this particular comparison of compressed weight representations. The experiment gives a practical reason to consider removal and rounding together when fitting a storage budget: a sparse mask can free up room to represent retained connections more precisely, and the shared reconstruction can respond to errors from both operations.
The appendix tests the same idea at a smaller storage budget. It relates 50% sparsity with 3-bit retained weights to the weight storage of the GPTQ 2.5-bit setting. This adds an example of the tradeoff beyond the main 4-bit experiment.
OPT-175B raw-WikiText2 test perplexity at the smaller matched weight budget
Joint compression gives lower perplexity in the more aggressive storage comparison as well.
The numbers
| System or setting | perplexity |
|---|---|
| GPTQ at 2.5-bit | 8.94 |
| SparseGPT with 50% sparsity and 3-bit retained weights (this paper) | 8.60 |
The paper also gives 8.93 perplexity on raw-WikiText2 for OPT-175B when 4:8 pruning is combined with 3-bit weights. The main text reports a pair of perplexities, 8.55 and 8.85, for the OPT-175B tests combining 4-bit weights with the semi-structured patterns. The authors characterize the extra perplexity cost of 4-bit rounding on top of semi-structured pruning as roughly 0.1. The matched-storage charts address predictive accuracy and weight representation. They do not measure the speed of executing the joint format.
Check whether the task results tell a similar story
The zero-shot evaluations broadly support the perplexity results. Magnitude-pruned versions approach random performance on the tasks, while the SparseGPT versions tend to stay nearer their dense counterparts. The task tests therefore give evidence in terms of the predictions a reader might recognize as correct or incorrect. Perplexity gives a complementary view because probability changes contribute even if they never change which answer is selected.
The authors also report an apparently better LAMBADA accuracy under 2:4 pruning than with the dense starting point. They present this in the context of noisy individual task results. With discrete accuracy, changes in a subset of predictions can move a score in either direction, and the ordering observed on one task may differ from that seen across the collection. The authors interpret the aggregate trend as evidence that SparseGPT preserves much of the tested performance. The individual favorable result has a narrower scope.
Time sparse execution where the format is supported
The paper’s CPU study uses the DeepSparse engine to run OPT-2.7B on a single batch of 400 tokens. The processor is an Intel Core i9-7980XE at 2.60GHz, using 18 cores. The sparse and dense versions run in that same environment. The authors report end-to-end gains close to the theoretical optimum for the investigated settings. Their separate figure of 1.5× describes dense DeepSparse relative to standard ONNXRuntime. That reference helps distinguish a gain from the underlying engine from a gain when the same engine receives pruned weights.
For the GPU experiment, the authors time the matrix multiplications associated with the shapes in OPT-175B at a batch size of 2048 tokens. They use CUTLASS for sparse multiplication, taking the configuration selected by its profiler, and dense cuBLAS as the comparison. The paper states a theoretical 2× acceleration for 2:4 matrix multiplication on supported NVIDIA hardware. It measures individual multiplication speedups of 54 - 79% in the tested workloads. These timings make the case that suitable kernels can take advantage of the zeros at the target matrix sizes. The authors expect gains for a complete run to be smaller because time is also spent on work such as attention.
What the ablations show
Calibration quantity and the choice of segments
Most of the targeted ablations use OPT-2.7B, with 50% uniform sparsity unless the experiment specifies otherwise. The main reported metric in this appendix is raw-WikiText2 test perplexity. The smaller checkpoint makes it feasible to repeat pruning runs and try settings that would be costly to sweep at the largest scale. These experiments test the choices underlying the main method separately from the size comparison.
The authors first vary the number of C4 calibration segments. Even a few segments of 2048 tokens can give a usable reconstruction. Early increases in the sample count lead to visible improvements, and then the curve begins to flatten. This behavior is consistent with the role of the sample: initially, more inputs can provide a much better estimate of which features vary together and which correction directions are available. Changing the amount of data eventually has less effect on the quality of those decisions. The authors choose 128 segments for their experiments, balancing the observed gains against the time and memory required by a larger sample.
A related test varies the random draw while keeping the amount of calibration data and the pruning setup fixed. The authors run the usual OPT-2.7B 50% pruning experiment 5 times with different sampling seeds. They report 13.52 ± 0.075 in raw-WikiText2 test perplexity, expressed as the mean and standard deviation. Within the chosen C4 sampling procedure, changing the exact segments makes a relatively small difference to the result. The quantity sweep measures the benefit of gathering more input evidence, while the seed comparison measures variation under repeated draws at the standard budget.
Dampening and the mask refresh interval
The authors vary the dampening multiplier applied to the average diagonal of the input matrix. The OPT-2.7B perplexity results are similar over the range from 0.001 to 0.1. At very high dampening the results get considerably worse. Adding to the diagonal helps stabilize the inverse, but the altered matrix also determines the reconstruction and saliency calculations. Large additions can substantially change those calculations. The authors settle on 0.01, also expressed as 1%, with numerical robustness on the largest checkpoints in mind. The small-checkpoint sweep shows tolerance to a range of multipliers, and the main large-checkpoint runs demonstrate feasibility at the selected one.
The mask-selection test varies the number of columns scored together. A width of 1 performs poorly, as do the near-full choices of 4096 and 8192. A broad interval between the extremes gives better results, with a small advantage for widths on the order of a few hundred columns. This is the pattern the design argument would predict. At the narrow end, each feature must contribute its stipulated share of zeros. At the wide end, many decisions have been made by the time intervening repairs change the weights. The intermediate setting lets the procedure move zeros away from costly positions while scoring new candidates often enough to reflect prior compensation.
The default width of 128 lies within that effective range and coincides with the size used to batch the weight updates. The ablation concerns how frequently the mask is selected. The shared default is convenient because it aligns the boundaries of the two operations. The findings give empirical support to blockwise selection in this reconstruction procedure. They leave open how close the chosen mask is to the best attainable mask at the same density.
Hold the mask constant and test the approximation
To evaluate the partial updates, the authors compare their output with an exact reconstruction under the same mask and Hessian. This is a different comparison from magnitude pruning or AdaPrune. By holding the mask fixed, it asks how much error comes from the limited freedom of SparseGPT’s solver. The authors examine layers in the first half of OPT-2.7B at 50% sparsity. The quantity they compare is squared output reconstruction error for a layer.
Outside several early attention output projections that behave as outliers, the approximate squared errors average around 20% above the exact errors. For later layers of the fully connected output type, the excess comes close to 10%. These percentages have the exact local reconstruction error as their reference. The experiment measures neither an accuracy loss on a downstream task nor a proportional increase in perplexity. It tells the reader how close the cheaper fit comes to the best fit available under the same selection of connections and the same input statistics.
The authors suggest that some fully connected layers fare better because their input sets are wider, giving the restricted updates more scope for compensation. The comparison establishes a difference in reconstruction quality among the layers studied. Width is their proposed explanation for part of that difference. The outliers are also informative about the algorithm: the cost of freezing a column schedule can vary by transformation, even when the same solver is used throughout the network.
Change which layers receive the fixed pattern
With 2:4 pruning, each group in a selected layer must follow the pattern. If the full treatment reduces quality too much, a way to obtain an intermediate setting is to choose a subset of layers to prune. The authors test this on OPT-175B and BLOOM-176B with 2/3 of the layers receiving 2:4 pruning. They compare retaining an entire type of transformation with retaining a consecutive region. For the former they try attention and each of the two fully connected layer types. For the latter they try the front, middle, and back regions.
The relative sensitivity of the transformation types differs between OPT and BLOOM. The depth comparison gives a more consistent ordering: leaving the last third dense gives the best predictive quality among the tested regions. This comparison holds the share of layers selected for pruning fixed, so the difference reflects their placement as well as the interactions of those changes through the network. It gives a reason to consider where sparsity is imposed when the allowable pattern inside a pruned layer is already fixed.
The sequential algorithm also makes it possible to reuse the beginning of a pruning run for different partial configurations. The authors describe taking an initial portion of the compressed layers and keeping the original dense layers that follow it. Their appendix evaluates such configurations on the three text-prediction datasets. This uses the empirical advantage of protecting the end of the network to offer a series of choices about how many layers receive the full pattern. The quality comparisons measure the effect of those choices. The separate acceleration experiments provide the evidence about executing a sparse pattern.
Limitations
Limits identified by the authors
The authors present the size trend as an empirical finding and leave its cause for further study. Larger OPT variants survive the tested SparseGPT pruning with smaller losses. Excess parameterization is their proposed explanation. Changing size within a family also changes the dimensions and learned weights of the network. The experiments establish the observed relationship under their procedure and data. An explanation of which properties of the pretrained network produce that relationship would require a more direct investigation.
They also narrow the claim about the favorable perplexity change in the largest OPT variant to raw-WikiText2. The PTB and C4 results leave the finding as a corpus-specific outcome. Their caution about zero-shot task accuracy has a related purpose. Some measurements can move favorably in a particular setting even when the broadly supported result is preservation of accuracy. The evidence for effective pruning comes from the comparisons across settings and corpora, with individual favorable changes interpreted at their measured scale.
The authors characterize the acceleration experiments as preliminary and identify implementation work tailored to these networks as an open direction. The CPU engine supports the smaller OPT variant used for the reported end-to-end test, with support for larger variants described as still in development. The GPU numbers are for matrix multiplications at the tested shapes and token batch. The authors expect other operations in complete inference to reduce the realized speedup. They also acknowledge a greater accuracy cost from the constrained patterns, particularly at smaller parameter scales. A pattern can have good kernel support and still be a poor fit for a particular network’s accuracy needs.
Limits that follow from the setup
The main evidence covers OPT and BLOOM-176B, with most of the size and tuning analysis within OPT. The reported results describe how those pretrained checkpoints respond to this algorithm. Other architectures and training histories could lead to different input statistics, different sensitivity to freezing, and different responses to the same target. The detailed approximation comparison has a narrower scope still. It examines the early portion of OPT-2.7B for a fixed sparsity setting, which is enough to measure the solver’s approximation there.
The calibration and evaluation data also bound the claim. Calibration observes ordinary web text from a designated C4 shard. Repeated sampling checks stability within that source. The holdout evaluations extend the predictive comparison to designated test and validation data, and the task suite checks selected kinds of zero-shot accuracy. These measurements leave open how the compressed network would behave on inputs outside those evaluations. The demonstrated robustness is to differences that the experiment actually introduces, including different calibration draws, checkpoint sizes, and measured corpora.
The objective preserves layer outputs on the observed input features. It gives no direct criterion for matching an individual generation, or for preserving behavior in any particular application. The fitted repair can change many surviving weights. As a consequence, a removed coefficient is evidence about what can be compensated for in the reconstructed network. Its removal does not identify the coefficient’s contribution in the original network in isolation.
Local optimality also applies to a precise subproblem. The partial OBS step finds the best adjustment given the current adjustable set and the chosen value to freeze. Previously fixed coefficients are outside that fit. The mask is chosen with a blockwise rule and is itself subject to approximation. The result is a feasible sparse network with measured performance, instead of a solution certified to have the smallest overall error at its density. The exact-reconstruction comparison controls the mask and therefore addresses only the loss of reconstruction freedom under that chosen mask.
Finally, the scope of the compression budget matters. The uniform targets apply to the selected linear layers, with embeddings and the output head excluded. The joint quantization comparisons match storage for represented weights using the authors’ stated bitmask arrangement. The full memory footprint when executing the network is a separate system measurement. Likewise, the measured time to prune on an A100 is an offline compression cost. The time to serve text after pruning depends on how the deployment executes the retained weights and how much time its workload spends in the affected operations. Each result applies to the boundary of the experiment that produced it.
What came after
Researchers pursued removal at several structural levels
Later papers cite SparseGPT while considering compression at different scales inside a network. The citation and stated subject establish the connection in the literature. The subject of each paper identifies the decision it studies, while the details of its use of SparseGPT’s solver remain unspecified.
Structural pruning is the focus of LLM-Pruner. It puts the structural choice at the center of the question that SparseGPT initially addressed through connection-level masks. For SparseGPT, the ability to vary retained features from row to row is part of what makes unstructured pruning accurate. A structural pruning study asks which larger units are candidates for removal and takes on the additional constraints associated with those units. LLM-Pruner
SliceGPT studies compression by deleting rows and columns. These are precisely the kinds of matrix units that make the choice of an individual feature consequential across many outputs. SparseGPT discusses whole-column removal while explaining why it seeks to share calculations across distinct masks. The later study takes matrix dimensions themselves as the target of compression. SliceGPT
ShortGPT examines redundancy at the level of layers. SparseGPT’s partial 2:4 experiment asked which layers should receive fine-grained pruning and which should stay dense. A study of layer redundancy takes the whole transformation at that depth as its unit of interest. The questions are related because both concern where the network can tolerate a change, and their interventions give different meanings to a layer’s sensitivity. ShortGPT
Work on mixture-of-experts networks asks about pruning and skipping experts. This brings an architecture-specific unit into the search for removable computation. It also puts a decision about whether to execute a component alongside the possibility of pruning it. SparseGPT’s experiments offer a reference point for the distinct setting of fixed, fine-grained weight removal after pretraining. Not All Experts are Equal
Inference studies addressed other sources of work
Deja Vu studies contextual sparsity at inference time. Its stated focus places the input context in the decision about what work can be avoided during use. SparseGPT fixes a pattern through offline calibration. The study of contextual sparsity asks about opportunities that arise as particular inputs are processed. Deja Vu
FlexGen addresses high-throughput generative inference on a single GPU, and PowerInfer targets fast serving on a consumer-grade GPU. Each takes a deployment objective as its organizing problem. SparseGPT measures the cost of preparing sparse weights and times selected workloads using them. The serving papers frame efficiency at the level of generating and delivering outputs under a device constraint. Their citations connect those system questions to the preceding work on reducing weight costs. FlexGen · PowerInfer
LLMLingua studies shortening prompts to accelerate inference. The object it compresses is the input presented for processing. This extends the efficiency question beyond the size of the stored weights. SpecInfer studies tree-based speculative inference and verification, putting the way generation proceeds at the center of its investigation. These are additional places to look for reductions in work even when parameter storage is given. LLMLingua · SpecInfer
Later work broadened the evaluation question
A study of the brittleness of safety alignment examines pruning and low-rank modifications in relation to alignment. Its subject makes explicit a separate question about what survives a change to pretrained weights. SparseGPT measures perplexity and selected task accuracies after pruning. Alignment requires evidence about a different outcome, even in cases where those earlier measures remain stable. The later paper cites SparseGPT in pursuing that broader evaluation question. Assessing the Brittleness of Safety Alignment
Later surveys cite the paper from the perspectives of compression and efficient inference. A compression survey groups work around how to reduce or represent learned parameters. An inference survey takes the cost of running the resulting systems as its broader subject. SparseGPT contributes evidence relevant to both perspectives: how much fine-grained weight removal the evaluated checkpoints tolerate, and how selected execution tools respond when given a pattern they can use. The later research expands the set of possible targets and the properties worth measuring after compression. A Survey on Model Compression · A Survey on Efficient Inference
Cite
Cite as Elias Frantar and Dan Alistarh. 2023. SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shot. arXiv:2301.00774.
@misc{frantar2023sparsegpt,
title = {{SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shot}},
author = {Elias Frantar and Dan Alistarh},
year = {2023},
doi = {10.48550/arxiv.2301.00774},
eprint = {2301.00774},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2301.00774}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/frantar-2023-sparsegpt-massive-language-models-accurately/
References
- Blumensath, T. and Davies, M. E. Iterative thresholding for sparse approximations. Journal of Fourier Analysis and Applications, 140 (5-6):0 629–654, 2008. OpenAlex ↗ · Scholar ↗
- Boratko, M., Padigela, H., Mikkilineni, D., Yuvraj, P., Das, R., McCallum, A., Chang, M., Fokoue-Nkoutche, A., Kapanipathi, P., Mattei, N., et al. A systematic classification of knowledge, reasoning, and context within the ARC dataset. arXiv preprint arXiv:1806.00358, 2018. OpenAlex ↗ · Scholar ↗
- Dettmers, T. and Zettlemoyer, L. The case for 4-bit precision: k-bit inference scaling laws. arXiv preprint arXiv:2212.09720, 2022. our card
- 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
- EleutherAI. EleutherAI LM Evaluation Harness, 2022. URL https://github.com/EleutherAI/lm-evaluation-harness. OpenAlex ↗ · Scholar ↗
- Elsen, E., Dukhan, M., Gale, T., and Simonyan, K. Fast sparse convnets. In Conference on Computer Vision and Pattern Recognition (CVPR), 2020. OpenAlex ↗ · Scholar ↗
- Evci, U., Gale, T., Menick, J., Castro, P. S., and Elsen, E. Rigging the lottery: Making all tickets winners. In International Conference on Machine Learning (ICML), 2020. OpenAlex ↗ · Scholar ↗
- Frantar, E. and Alistarh, D. SPDY: Accurate pruning with speedup guarantees. arXiv preprint arXiv:2201.13096, 2022. OpenAlex ↗ · Scholar ↗
- Frantar, E., Kurtic, E., and Alistarh, D. M-FAC: Efficient matrix-free approximations of second-order information. In Conference on Neural Information Processing Systems (NeurIPS), 2021. OpenAlex ↗ · Scholar ↗
- Frantar, E., Ashkboos, S., Hoefler, T., and Alistarh, D. GPTQ: Accurate post-training compression for generative pretrained transformers. arXiv preprint arXiv:2210.17323, 2022a. OpenAlex ↗ · Scholar ↗
- Frantar, E., Singh, S. P., and Alistarh, D. Optimal Brain Compression: A framework for accurate post-training quantization and pruning. arXiv preprint arXiv:2208.11580, 2022b. Accepted to NeurIPS 2022, to appear. OpenAlex ↗ · Scholar ↗
- Gale, T., Elsen, E., and Hooker, S. The state of sparsity in deep neural networks. In International Conference on Machine Learning (ICML), 2019. OpenAlex ↗ · Scholar ↗
- Hagiwara, M. A simple and effective method for removal of hidden units and weights. Neurocomputing, 60 (2):0 207 – 218, 1994. ISSN 0925-2312. Backpropagation, Part IV. OpenAlex ↗ · Scholar ↗
- Han, S., Pool, J., Tran, J., and Dally, W. J. Learning both weights and connections for efficient neural networks. In Conference on Neural Information Processing Systems (NeurIPS), 2015. OpenAlex ↗ · Scholar ↗
- Han, S., Mao, H., and Dally, W. J. Deep compression: Compressing deep neural networks with pruning, trained quantization and Huffman coding. In International Conference on Learning Representations (ICLR), 2016. OpenAlex ↗ · Scholar ↗
- Hassibi, B., Stork, D. G., and Wolff, G. J. Optimal brain surgeon and general network pruning. In IEEE International Conference on Neural Networks, 1993. OpenAlex ↗ · Scholar ↗
- He, Y., Lin, J., Liu, Z., Wang, H., Li, L.-J., and Han, S. AMC: AutoML for model compression and acceleration on mobile devices. In European Conference on Computer Vision (ECCV), 2018. our card
- Hoefler, T., Alistarh, D., Ben-Nun, T., Dryden, N., and Peste, A. Sparsity in deep learning: Pruning and growth for efficient inference and training in neural networks. arXiv preprint arXiv:2102.00554, 2021. OpenAlex ↗ · Scholar ↗
- Hubara, I., Chmiel, B., Island, M., Banner, R., Naor, S., and Soudry, D. Accelerated sparse neural training: A provable and efficient method to find N:M transposable masks. In Conference on Neural Information Processing Systems (NeurIPS), 2021a. OpenAlex ↗ · Scholar ↗
- Hubara, I., Nahshan, Y., Hanani, Y., Banner, R., and Soudry, D. Accurate post training quantization with small calibration sets. In International Conference on Machine Learning (ICML), 2021b. OpenAlex ↗ · Scholar ↗
- HuggingFace. HuggingFace Perplexity Calculation, 2022. URL https://huggingface.co/docs/transformers/perplexity. OpenAlex ↗ · Scholar ↗
- Kingdon, J. Hypothesising Neural Nets, pp. 81–106. Springer London, London, 1997. ISBN 978-1-4471-0949-5. . OpenAlex ↗ · Scholar ↗
- Kurtic, E. and Alistarh, D. Gmp*: Well-tuned global magnitude pruning can outperform most bert-pruning methods. arXiv preprint arXiv:2210.06384, 2022. OpenAlex ↗ · Scholar ↗
- Kurtic, E., Campos, D., Nguyen, T., Frantar, E., Kurtz, M., Fineran, B., Goin, M., and Alistarh, D. The Optimal BERT Surgeon: Scalable and accurate second-order pruning for large language models. arXiv preprint arXiv:2203.07259, 2022. OpenAlex ↗ · Scholar ↗
- Kurtz, M., Kopinsky, J., Gelashvili, R., Matveev, A., Carr, J., Goin, M., Leiserson, W., Moore, S., Nell, B., Shavit, N., and Alistarh, D. Inducing and exploiting activation sparsity for fast inference on deep neural networks. In International Conference on Machine Learning (ICML), 2020. OpenAlex ↗ · Scholar ↗
- Kwon, W., Kim, S., Mahoney, M. W., Hassoun, J., Keutzer, K., and Gholami, A. A fast post-training pruning framework for transformers. arXiv preprint arXiv:2204.09656, 2022. OpenAlex ↗ · Scholar ↗
- LeCun, Y., Denker, J. S., and Solla, S. A. Optimal brain damage. In Conference on Neural Information Processing Systems (NeurIPS), 1989. OpenAlex ↗ · Scholar ↗
- Li, Y., Gong, R., Tan, X., Yang, Y., Hu, P., Zhang, Q., Yu, F., Wang, W., and Gu, S. BRECQ: Pushing the limit of post-training quantization by block reconstruction. In International Conference on Learning Representations (ICLR), 2021. OpenAlex ↗ · Scholar ↗
- Liu, L., Zhang, S., Kuang, Z., Zhou, A., Xue, J.-H., Wang, X., Chen, Y., Yang, W., Liao, Q., and Zhang, W. Group fisher pruning for practical network compression. In International Conference on Machine Learning (ICML), 2021. OpenAlex ↗ · Scholar ↗
- Marcus, M., Kim, G., Marcinkiewicz, M. A., MacIntyre, R., Bies, A., Ferguson, M., Katz, K., and Schasberger, B. The penn treebank: Annotating predicate argument structure. In Human Language Technology: Proceedings of a Workshop held at Plainsboro, New Jersey, March 8-11, 1994, 1994. our card
- Merity, S., Xiong, C., Bradbury, J., and Socher, R. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016. our card
- Mishra, A., Latorre, J. A., Pool, J., Stosic, D., Stosic, D., Venkatesh, G., Yu, C., and Micikevicius, P. Accelerating sparse deep neural networks. arXiv preprint arXiv:2104.08378, 2021. our card
- Mostafazadeh, N., Roth, M., Louis, A., Chambers, N., and Allen, J. Lsdsem 2017 shared task: The story cloze test. In Proceedings of the 2nd Workshop on Linking Models of Lexical, Sentential and Discourse-level Semantics, pp. 46–51, 2017. OpenAlex ↗ · Scholar ↗
- Nagel, M., Amjad, R. A., Van Baalen, M., Louizos, C., and Blankevoort, T. Up or down? Adaptive rounding for post-training quantization. In International Conference on Machine Learning (ICML), 2020. OpenAlex ↗ · Scholar ↗
- NeuralMagic. DeepSparse, 2022. URL https://github.com/neuralmagic/deepsparse. OpenAlex ↗ · Scholar ↗
- Paperno, D., Kruszewski, G., Lazaridou, A., Pham, Q. N., Bernardi, R., Pezzelle, S., Baroni, M., Boleda, G., and Fernández, R. The LAMBADA dataset: Word prediction requiring a broad discourse context. arXiv preprint arXiv:1606.06031, 2016. our card
- 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, 2022a. OpenAlex ↗ · Scholar ↗
- Park, M., You, J., Nagel, M., and Chang, S. Quadapter: Adapter for gpt-2 quantization. arXiv preprint arXiv:2211.16912, 2022b. OpenAlex ↗ · Scholar ↗
- Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., et al. Pytorch: An imperative style, high-performance deep learning library. In Conference on Neural Information Processing Systems (NeurIPS), 2019. our card
- Peste, A., Iofinova, E., Vladu, A., and Alistarh, D. AC/DC: Alternating compressed/decompressed training of deep neural networks. In Conference on Neural Information Processing Systems (NeurIPS), 2021. OpenAlex ↗ · Scholar ↗
- Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., and Liu, P. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 210 (140):0 1–67, 2020. our card
- Sanh, V., Wolf, T., and Rush, A. M. Movement pruning: Adaptive sparsity by fine-tuning. arXiv preprint arXiv:2005.07683, 2020. OpenAlex ↗ · Scholar ↗
- 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
- Singh, S. P. and Alistarh, D. WoodFisher: Efficient second-order approximation for neural network compression. In Conference on Neural Information Processing Systems (NeurIPS), 2020. OpenAlex ↗ · Scholar ↗
- Tata, S. and Patel, J. M. PiQA: An algebra for querying protein data sets. In International Conference on Scientific and Statistical Database Management, 2003. OpenAlex ↗ · Scholar ↗
- Wolf, T., Debut, L., Sanh, V., Chaumond, J., Delangue, C., Moi, A., Cistac, P., Rault, T., Louf, R., Funtowicz, M., et al. Huggingface's transformers: State-of-the-art natural language processing. arXiv preprint arXiv:1910.03771, 2019. our card
- Xiao, G., Lin, J., Seznec, M., Demouth, J., and Han, S. Smoothquant: Accurate and efficient post-training quantization for large language models. arXiv preprint arXiv:2211.10438, 2022. our card
- 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. arXiv preprint arXiv:2206.01861, 2022. our card
- Zhang, S., Roller, S., Goyal, N., Artetxe, M., Chen, M., Chen, S., Dewan, C., Diab, M., Li, X., Lin, X. V., et al. OPT: Open pre-trained transformer language models. arXiv preprint arXiv:2205.01068, 2022. our card
- Zhou, A., Ma, Y., Zhu, J., Liu, J., Zhang, Z., Yuan, K., Sun, W., and Li, H. Learning N:M fine-grained structured sparse neural networks from scratch. In International Conference on Learning Representations (ICLR), 2021. OpenAlex ↗ · Scholar ↗
- Zhu, M. and Gupta, S. To prune, or not to prune: exploring the efficacy of pruning for model compression. arXiv preprint arXiv:1710.01878, 2017. OpenAlex ↗ · Scholar ↗