SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.05981 · NeurIPS · 2024

ShiftAddLLM: Accelerating Pretrained LLMs via Post-Training Multiplication-Less Reparameterization

Amir Yazdanbakhsh, Wei Zhou, Haoran You, Huihong Shi, Celine Lin, Souvik Kundu, Yipin Guo, Yichao Fu, Xiaofan Zhang

arXiv · PDF · Open in the Atlas

Code that ran

9 of 17 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 8 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2406.05981.json · badge: /api/ran/2406.05981.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
gatech-eic/shiftaddllm canonical (classifier label)
classifier basis: census
9 ran · 7 no recorded run
GATECH-EIC/ShiftAddLLM canonical (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
FunctionStatusWhere it lives
find_layers Ran
ran; our contract draft was wrong, not the code
gatech-eic/shiftaddllm/modelutils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from squeezeailab/kvquant, is pointer only (licence: NONE) · get_code("a9e7f2cdf016b88b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from squeezeailab/kvquant, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_bloom Ran
ran; our contract draft was wrong, not the code
gatech-eic/shiftaddllm/model/bloom.py
code served (permissive licence) · get_code("cd666c16d4aaa66d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned MockBloomForCausalLM. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from unittest.mock import Mock, patch
import sys

torch.manual_seed(0)

# Mock the transformers library to avoid actual model downloads
class MockBloomForCausalLM:
    def __init__(self, *args, **kwargs):
        self.seqlen = None
    
    @classmethod
    def from_pretrained(cls, model_name, torch_dtype=None):
        return cls()

# Create a mock module for transformers
mock_transformers = Mock()
mock_transformers.BloomForCausalLM = MockBloomForCausalLM

# Patch transformers before the function is called
sys.modules['transformers'] = mock_transformers

ARGS = {
    'model': 'bigscience/bloom-560m'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MockBloomForCausalLM — a MockBloomForCausalLM output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockBloomForCausalLM output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_gemma Ran
ran; our contract draft was wrong, not the code
gatech-eic/shiftaddllm/model/gemma.py
code served (permissive licence) · get_code("62ed73ff09377dd3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned MockGemmaForCausalLM. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from unittest.mock import Mock, patch
import sys

torch.manual_seed(0)

# Create a mock model that mimics GemmaForCausalLM behavior
class MockGemmaForCausalLM(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = torch.nn.Linear(4, 4)
    
    @classmethod
    def from_pretrained(cls, model_name, torch_dtype='auto'):
        return cls()

# Mock the transformers module
mock_transformers = Mock()
mock_transformers.GemmaForCausalLM = MockGemmaForCausalLM

# Patch transformers import
sys.modules['transformers'] = mock_transformers

ARGS = {
    'model': 'google/gemma-2b'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MockGemmaForCausalLM — a MockGemmaForCausalLM output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockGemmaForCausalLM output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_llama Ran
ran; our contract draft was wrong, not the code
gatech-eic/shiftaddllm/llama_analysis.py
code served (permissive licence) · get_code("88d590323ed219c8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned MockLlamaForCausalLM. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from unittest.mock import Mock, patch
import sys

torch.manual_seed(0)

# Create a mock LlamaForCausalLM class since we can't download the real model
class MockLlamaForCausalLM:
    def __init__(self, *args, **kwargs):
        self.seqlen = None
    
    @classmethod
    def from_pretrained(cls, model_name, torch_dtype=None):
        return cls()

# Patch the transformers import to return our mock
mock_transformers = Mock()
mock_transformers.LlamaForCausalLM = MockLlamaForCausalLM
sys.modules['transformers'] = mock_transformers

# The function expects a model identifier string (HuggingFace model name)
# We'll pass a simple string identifier
ARGS = {
    'model': 'meta-llama/Llama-2-7b'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MockLlamaForCausalLM — a MockLlamaForCausalLM output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockLlamaForCausalLM output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_mistral Ran
ran; our contract draft was wrong, not the code
gatech-eic/shiftaddllm/model/mistral.py
code served (permissive licence) · get_code("6fcbba51d98ff415")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned MockMistralForCausalLM. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from unittest.mock import Mock, patch
import sys

torch.manual_seed(0)

# Mock the transformers module to avoid actual downloads
class MockMistralForCausalLM(torch.nn.Module):
    def __init__(self, *args, **kwargs):
        super().__init__()
        self.linear = torch.nn.Linear(4, 4)
    
    @classmethod
    def from_pretrained(cls, model_name, torch_dtype=None):
        return cls()

# Create a mock transformers module
mock_transformers = Mock()
mock_transformers.MistralForCausalLM = MockMistralForCausalLM

# Patch the transformers import
sys.modules['transformers'] = mock_transformers

ARGS = {
    'model': 'mistral-7b'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MockMistralForCausalLM — a MockMistralForCausalLM output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockMistralForCausalLM output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_op Ran
ran; our contract draft was wrong, not the code
gatech-eic/shiftaddllm/energy/shiftaddllm_energy.py
code served (permissive licence) · get_code("533eb4023e30e110")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'input': 64,
    'output': 128,
    'bits': 8,
    'OPtype': 'FC',
    'name': 'FP_Mult',
    'batch': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_op_list Ran
ran; our contract draft was wrong, not the code
gatech-eic/shiftaddllm/energy/shiftaddllm_energy.py
code served (permissive licence) · get_code("0b1b3174ad5e276b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    'model_type': 'opt',
    'quant_type': 'fp',
    'dim': 64,
    'fc_dim': 256,
    'wbits': 8
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_opt Ran
ran; our contract draft was wrong, not the code
gatech-eic/shiftaddllm/model/opt.py
code served (permissive licence) · get_code("887f43fe08a6472d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned MockOPTForCausalLM. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function expects a model parameter that is a string (model name/path)
# However, since we can't actually download from HuggingFace, we need to mock
# the from_pretrained call. We'll create a minimal mock setup.

class MockConfig:
    def __init__(self):
        self.max_position_embeddings = 2048

class MockOPTForCausalLM(nn.Module):
    def __init__(self):
        super().__init__()
        self.config = MockConfig()
        self.linear = nn.Linear(4, 4)
    
    @classmethod
    def from_pretrained(cls, model_name, torch_dtype='auto'):
        return cls()

# Monkey patch the transformers module before the function runs
import sys
from types import ModuleType

mock_transformers = ModuleType('transformers')
mock_transformers.OPTForCausalLM = MockOPTForCausalLM
sys.modules['transformers'] = mock_transformers

# The model parameter should be a string (model identifier)
model_name = "facebook/opt-125m"

ARGS = {
    "model": model_name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MockOPTForCausalLM — a MockOPTForCausalLM output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockOPTForCausalLM output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_quant_op Ran
ran; our contract draft was wrong, not the code
gatech-eic/shiftaddllm/energy/shiftaddllm_energy.py
code served (permissive licence) · get_code("207a7b902ad10794")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function get_quant_op:
# It takes: input (int), output (int), bits (int), quant_type (str='fp')
# It calls get_op multiple times with these parameters
# get_op constructs operation dictionaries

# Valid arguments for get_quant_op
ARGS = {
    'input': 64,
    'output': 32,
    'bits': 8,
    'quant_type': 'fp'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
bloom_pack3 Not yet run
unverified (harvested, no recorded run)
gatech-eic/shiftaddllm/model/bloom.py
code served (permissive licence) · get_code("0cad9f7e67e39610")
How it ran

no invocation recorded.

gemma_pack3 Not yet run
unverified (harvested, no recorded run)
gatech-eic/shiftaddllm/model/gemma.py
code served (permissive licence) · get_code("8de8396130cd1a7d")
How it ran

no invocation recorded.

get_c4 Not yet run
unverified (harvested, no recorded run)
gatech-eic/shiftaddllm/datautils.py
code served (permissive licence) · get_code("3b7f82daf1a2f6d5")
How it ran

no invocation recorded.

get_ptb Not yet run
unverified (harvested, no recorded run)
gatech-eic/shiftaddllm/datautils.py
code served (permissive licence) · get_code("7f7c3deb52669856")
How it ran

no invocation recorded.

get_wikitext2 Not yet run
unverified (harvested, no recorded run)
gatech-eic/shiftaddllm/datautils.py
code served (permissive licence) · get_code("50f2b672b1461e67")
How it ran

no invocation recorded.

llama_pack3 Not yet run
unverified (harvested, no recorded run)
GATECH-EIC/ShiftAddLLM/model/llama.py
code served (permissive licence) · get_code("ac39ef2ac4b2aa39")
How it ran

no invocation recorded.

mistral_pack3 Not yet run
unverified (harvested, no recorded run)
gatech-eic/shiftaddllm/model/mistral.py
code served (permissive licence) · get_code("be9ddf29d82d32eb")
How it ran

no invocation recorded.

opt_pack3 Not yet run
unverified (harvested, no recorded run)
gatech-eic/shiftaddllm/model/opt.py
code served (permissive licence) · get_code("5a1ab8a11275fe3d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 2 the same month, 5 later) and 12 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
find_layers 27 other papers
15 dated earlier, 2 the same month, 8 later, 1 same year, order not determinable, 1 undated
2203.13474 (2022-03)
CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis
2023.emnlp-main.892 (2023 (year only))
Z-FOLD: A Frustratingly Easy Post-Training Quantization Scheme for LLMs
2307.09288 (2023-07)
Llama 2: Open Foundation and Fine-Tuned Chat Models
and 24 more not named here
get_bloom 5 other papers
3 dated earlier, 1 later, 1 same year, order not determinable
2301.00774 (2023-01)
SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shot
2307.15290 (2023-07)
ChatHome: Development and Evaluation of a Domain-Specific Language Model for Home Renovation
2310.09499 (2023-10)
One-Shot Sensitivity-Aware Mixed Sparsity Pruning for Large Language Models
and 2 more not named here
get_llama 5 other papers
2 dated earlier, 1 the same month, 1 later, 1 same year, order not determinable
2307.15290 (2023-07)
ChatHome: Development and Evaluation of a Domain-Specific Language Model for Home Renovation
2310.09499 (2023-10)
One-Shot Sensitivity-Aware Mixed Sparsity Pruning for Large Language Models
2024.findings-naacl.145 (2024 (year only))
Role Prompting Guided Domain Adaptation with General Capability Preserve for Large Language Models
and 2 more not named here
get_opt 5 other papers
3 dated earlier, 2 later
2210.17323 (2022-10)
GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers
2301.00774 (2023-01)
SparseGPT: Massive Language Models Can Be Accurately Pruned in One-Shot
2307.13304 (2023-07)
QuIP: 2-Bit Quantization of Large Language Models With Guarantees
and 2 more not named here
opt_pack3 2 other papers
1 dated earlier, 1 later
2210.17323 (2022-10)
GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers
2411.05282 (2024-11)
MicroScopiQ: Accelerating Foundational Models through Outlier-Aware Microscaling Quantization

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Large language models (LLMs) have shown impressive performance on language tasks but face challenges when deployed on resource-constrained devices due to their extensive parameters and reliance on dense multiplications, resulting in high memory demands and latency bottlenecks. Shift-and-add reparameterization offers a promising solution by replacing costly multiplications with hardware-friendly primitives in both the attention and multi-layer perceptron (MLP) layers of an LLM. However, current reparameterization techniques require training from scratch or full parameter fine-tuning to restore accuracy, which is resource-intensive for LLMs. To address this, we propose accelerating pretrained LLMs through post-training shift-and-add reparameterization, creating efficient multiplication-free models, dubbed ShiftAddLLM. Specifically, we quantize each weight matrix into binary matrices paired with group-wise scaling factors. The associated multiplications are reparameterized into (1) shifts between activations and scaling factors and (2) queries and adds according to the binary matrices. To reduce accuracy loss, we present a multi-objective optimization method to minimize both weight and output activation reparameterization errors. Additionally, based on varying sensitivity across layers to reparameterization, we develop an automated bit allocation strategy to further reduce memory usage and latency. Experiments on five LLM families and eight tasks consistently validate the effectiveness of ShiftAddLLM, achieving average perplexity reductions of 5.6 and 22.7 points at comparable or lower latency compared to the most competitive quantized LLMs at 3-and 2-bit precision, respectively, and more than 80% memory and energy reductions over the original LLMs. Codes and models are available at https://github.com/GATECH-EIC/ ShiftAddLLM. * Note that 1 LUT corresponds to 8 operations, as each bit in queries is from a weight element. We identify a promising yet unexplored opportunity for improving LLM efficiency: reparameterizing their extensive multiplications with more cost-effective hardware substitutes, such as bitwise shifts and adds. Inspired by practices in computer architecture and digital signal processing, replacing multiplications with bitwise shifts and adds [66,22] can offer up to 3.1 /0.1 = 31× energy and 3495 /137 ≈ 26× area reductions (see Tab. 1). This hardware-inspired approach can lead to efficient and fast implementations, as shown by previous research on ShiftAddNet [69,70,72]. Unlike previous techniques that require training from scratch or extensive fine-tuning, we propose a new method to integrate the shift-and-add concept into LLMs through post-training optimization. To design multiplication-less LLMs, we need to address three key challenges: First, how can we effectively reparameterize pretrained LLMs with shifts and adds in a post-training manner? Previous reparameterization techniques [69,72] can result in nontrivial quantization errors, requiring fine-tuning or retraining to avoid accuracy drops. We aim to develop a ready-to-use post-training reparameterization method for LLMs. Second, how can we mitigate the accuracy drop from shiftand-add reparameterization? Approximating original multiplications with lower-bit shifts and adds typically reduces model accuracy. Most studies resort to fine-tuning or increasing model sizes, complicating LLM deployment. We hypothesize that optimizing both weight and activation errors can minimize overall reparameterization error, aligning with recent activation-aware weight quantization methods in LLMs. Third, how can we handle varying sensitivities to reparameterization across different layers and blocks in LLMs? An automated strategy to determine the optimal number of bits for reparameterized weights in each layer is needed. More vulnerable layers should have higherbit representations, while less sensitive layers can use lower-bit representations. This ensures no bottlenecked layers due to aggressive reparameterization and maximizes redundancy exploitation. To the best of our knowledge, this is the first attempt to address these three challenges for multiplicationless LLMs through post-training reparameterization. Our contributions are summarized as follows: • We propose accelerating pretrained LLMs via a post-training bitwise shift-and-add reparameterization, resulting in efficient multiplication-less LLMs, dubbed ShiftAddLLM. All weights are quantized into binary matrices paired with group-wise scaling factors; the associated multiplications are reparameterized into shift-and-add operations. • To mitigate accuracy loss, we present a multi-objective optimization method aligning and optimizing both weight and output activation objectives, minimizing overall reparameterization error, and achieving lower perplexity and better task accuracy. • We introduce a mixed and automated bit allocation strategy that determines the optimal number of bits for reparameterized weights per layer, based on their vulnerability to compression. Susceptible layers receive higher-bit representations, while less sensitive ones get lower-bit representations. Our extensive results across five LLMs and eight tasks consistently show the superior accuracy and efficiency trade-offs achieved by ShiftAddLLM, with average perplexity reductions of 5.6 and 22.7 at comparable or even lower latency compared to the most competitive quantized LLMs at three and two bits, respectively, and more than 80% memory and energy reductions over the original LLMs. 2 Related Works LLM Quantization. Significant efforts have been made to quantize LLMs, including quantizationaware training (QAT) [39,52] and post-training quantization (PTQ) [18,38,63,15]. QAT requires calibrated data and significant retraining resources, whereas PTQ is more dominant due to it lower computational and time overhead. There are two prevalent PTQ strategies for LLMs: (1) uniform quantization of both weights and activations [63,15,68], often limited to 8 bits (W8A8) as lower bit representations can significantly reduce accuracy; and (2) lower bit weight-only quantization [18,48,14,28,6], which quantizes LLM weights to lower bits while keeping activations in a FP16 format.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2406.05981")
get_code_for_paper("2406.05981")
have("2406.05981")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2406.05981.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2406.05981.svg)](https://syntology.ai/paper/2406.05981)

Connect an agent — have() is free.