SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.06446 · NeurIPS · 2023

ShiftAddViT: Mixture of Multiplication Primitives Towards Efficient Vision Transformers

Haoran You, Huihong Shi, Celine Lin, Yipin Guo

arXiv · PDF · Open in the Atlas

Code that ran

14 of 20 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 9 have no contract verdict; 4 failures of our instrument; 6 no recorded run), measured 2026-11-23; 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/2306.06446.json · badge: /api/ran/2306.06446.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/ShiftAddViT canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
gatech-eic/shiftaddvit canonical (classifier label)
classifier basis: classifier_2025
6 ran · 6 no recorded run
FunctionStatusWhere it lives
LinearShiftFunction Ran
ran on a synthesized input · constructed an object; no result was computed
gatech-eic/shiftaddvit/pvt/deepshift/modules.py
code served (permissive licence) · get_code("a615513dd08f6baa")
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 an instance of its own class, LinearShiftFunction: the run constructed the object and did not call it, so no result was computed. 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 math

torch.manual_seed(0)

# Set up minimal args for the module-level functions
class MinimalArgs:
    def __init__(self):
        self.tvm_tune = False
        self.tvm_throughput = False

import sys
import types
sys.modules['argparse'].ArgumentParser = lambda *a, **k: types.SimpleNamespace(parse_args=lambda: MinimalArgs())

# Build minimal tensors for LinearShiftFunction.forward
batch_size = 2
input_dim = 4
output_dim = 3

input_tensor = torch.randn(batch_size, input_dim)
shift_tensor = torch.randn(output_dim, input_dim)
sign_tensor = torch.randn(output_dim, input_dim)
bias_tensor = torch.randn(output_dim)
conc_weight = None

ARGS = {
    'input': input_tensor,
    'shift': shift_tensor,
    'sign': sign_tensor,
    'bias': bias_tensor,
    'conc_weight': conc_weight,
    'use_kernel': False,
    'use_cuda': False,
    'rounding': 'deterministic',
    'shift_range': (-14, 0),
    'act_integer_bits': 16,
    'act_fraction_bits': 16
}
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 LinearShiftFunction — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LinearShiftFunction 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
RoundFixedPoint Ran
ran on a synthesized input · constructed an object; no result was computed
gatech-eic/shiftaddvit/pvt/deepshift/modules.py
code served (permissive licence) · get_code("2e1aba58531fd33c")
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 an instance of its own class, RoundFixedPoint: the run constructed the object and did not call it, so no result was computed. 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
import math
import types as _types

torch.manual_seed(0)

def round_to_fixed(input, integer_bits=16, fraction_bits=16):
    assert integer_bits >= 1, integer_bits
    if integer_bits == 1:
        return torch.sign(input) - 1
    delta = math.pow(2.0, -fraction_bits)
    bound = math.pow(2.0, integer_bits - 1)
    min_val = -bound
    max_val = bound - 1
    rounded = torch.floor(input / delta) * delta
    clipped_value = torch.clamp(rounded, min_val, max_val)
    return clipped_value

class RoundFixedPoint(torch.autograd.Function):

    @staticmethod
    def forward(ctx, input, act_integer_bits=16, act_fraction_bits=16):
        return utils.round_to_fixed(input, act_integer_bits, act_fraction_bits)

    @staticmethod
    def backward(ctx, grad_output):
        return (grad_output, None, None)

utils = _types.SimpleNamespace(**{n: globals()[n] for n in ['round_to_fixed'] if n in globals()})

input_tensor = torch.randn(2, 4)
act_integer_bits = 16
act_fraction_bits = 16

ARGS = {
    'input': input_tensor,
    'act_integer_bits': act_integer_bits,
    'act_fraction_bits': act_fraction_bits
}
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 RoundFixedPoint — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RoundFixedPoint 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
SignFunction Ran
ran on a synthesized input · constructed an object; no result was computed
gatech-eic/shiftaddvit/pvt/deepshift/modules.py
code served (permissive licence) · get_code("9382bd1b11ac0b5b")
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 an instance of its own class, SignFunction: the run constructed the object and did not call it, so no result was computed. 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 torch.autograd import Function

torch.manual_seed(0)

class SignFunction(Function):
    @staticmethod
    def forward(ctx, input):
        return torch.sign(input)

    @staticmethod
    def backward(ctx, grad_output):
        return grad_output

# Create a small input tensor (batch size 2, dimension 4)
input_tensor = torch.randn(2, 4)

ARGS = {
    'input': input_tensor
}
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 SignFunction — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SignFunction 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
UnsymmetricGradMulFunction Ran
ran on a synthesized input · constructed an object; no result was computed
gatech-eic/shiftaddvit/pvt/deepshift/modules.py
code served (permissive licence) · get_code("5f6cabb73701e31e")
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 an instance of its own class, UnsymmetricGradMulFunction: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

# Create two small tensors for the forward pass
# The function multiplies input1 and input2 element-wise
input1 = torch.randn(2, 4, requires_grad=True)
input2 = torch.randn(2, 4, requires_grad=True)

ARGS = {
    "input1": input1,
    "input2": input2,
}
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 UnsymmetricGradMulFunction — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a UnsymmetricGradMulFunction 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
apot_quantization Ran
ran on a synthesized input
GATECH-EIC/ShiftAddViT/pvt/deepshift/modules_q.py
code served (permissive licence) · get_code("37f926226be72ba5")
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 Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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)

# Create a small tensor to quantize
tensor = torch.randn(2, 4, requires_grad=True)

# Create alpha parameter
alpha = torch.tensor([0.5], requires_grad=True)

# Create projection set - a set of quantization levels
# For power-of-two quantization, we use values like [0.0, 0.25, 0.5, 0.75, 1.0]
proj_set = torch.tensor([0.0, 0.25, 0.5, 0.75, 1.0])

ARGS = {
    "tensor": tensor,
    "alpha": alpha,
    "proj_set": proj_set,
    "is_weight": True,
    "grad_scale": 0.1,
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
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
build_power_value Ran
ran on a synthesized input
GATECH-EIC/ShiftAddViT/pvt/deepshift/modules_q.py
code served (permissive licence) · get_code("937a6c4fc842fead")
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 Tensor, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 = {
    "B": 2,
    "additive": True,
}
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 Tensor, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
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
build_transform Ran
ran; our contract draft was wrong, not the code
GATECH-EIC/ShiftAddViT/pvt/datasets.py
code served (permissive licence) · get_code("b1ff741b34908d33")
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 Compose. 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
from torchvision import transforms

torch.manual_seed(0)

class ArgsConfig:
    def __init__(self):
        self.input_size = 224
        self.color_jitter = 0.4
        self.aa = "rand-m9-mstd0.5"
        self.train_interpolation = "bicubic"
        self.reprob = 0.25
        self.remode = "pixel"
        self.recount = 1

ARGS = {
    "is_train": True,
    "args": ArgsConfig()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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_energy Ran
ran on a synthesized input
GATECH-EIC/ShiftAddViT/pvt/hw_utils.py
code served (permissive licence) · get_code("19a6199c54ccbe78")
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 tuple. 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 numpy as np

# Construct tiling_factor dictionary with all required keys
tiling_factor = {
    'N3': 2,
    'N0': 3,
    'N': 4,
    'M3': 2,
    'M2': 2,
    'M1': 2,
    'M0': 2,
    'M': 8,
    'C3': 2,
    'C2': 2,
    'C1': 2,
    'C0': 2,
    'C': 3,
    'E1': 2,
    'E3': 2,
    'E': 4,
    'R': 3,
    'S': 3,
    'stride': 1,
    'F': 4,
    'H': 5,
    'W': 5,
}

# Construct unit_energy dictionary with all required keys
unit_energy = {
    'unit_comp': 1.5,
    'unit_DRAM': 2.0,
    'unit_DRAM_GB': 0.5,
    'unit_GB': 1.0,
    'unit_NoC': 0.8,
    'unit_NoC_psum': 0.6,
    'unit_RF': 0.2,
    'unit_RF_weight': 0.3,
}

ARGS = {
    'tiling_factor': tiling_factor,
    'unit_energy': unit_energy,
}
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 tuple — a tuple output has no array shape of its own; none is 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_latency Ran
ran on a synthesized input
GATECH-EIC/ShiftAddViT/pvt/hw_utils.py
code served (permissive licence) · get_code("0d49960c0a9b17f9")
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 float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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)

# Construct tiling_factor dictionary with all required keys
# These represent tiling parameters for a neural network computation
tiling_factor = {
    'N3': 2,
    'N0': 3,
    'N': 6,
    'M3': 4,
    'M2': 5,
    'M1': 2,
    'M0': 3,
    'M': 60,
    'C3': 2,
    'C2': 3,
    'C1': 2,
    'C0': 4,
    'C': 48,
    'E1': 2,
    'E3': 3,
    'E': 6,
    'R': 3,
    'S': 3,
    'stride': 1,
    'F': 2,
}

# Unit latency is a scalar representing base latency per operation
unit_latency = 1.5

ARGS = {
    'tiling_factor': tiling_factor,
    'unit_latency': unit_latency,
}
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 float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
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_mem_space Ran
ran, honoured the contract we drafted
GATECH-EIC/ShiftAddViT/pvt/gpu_mem_track.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from applied-machine-learning-lab/dt4ier, is pointer only (licence: NONE) · get_code("efa7095cdb85be6c")
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 applied-machine-learning-lab/dt4ier, 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.

gradient_scale Ran
ran; our contract draft was wrong, not the code
GATECH-EIC/ShiftAddViT/pvt/deepshift/modules_q.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from yfguo91/ternary-spike, is pointer only (licence: NONE) · get_code("6899805d3c9c6510")
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 yfguo91/ternary-spike, 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.

round Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gatech-eic/shiftaddvit/pvt/deepshift/modules.py
code served (permissive licence) · get_code("f62a2b221d8f8ac3")
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 Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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)

# Create a small tensor with floating point values that can be rounded
x = torch.randn(2, 4)

# Define rounding parameter - test with deterministic version
rounding = 'deterministic'

ARGS = {
    'x': x,
    'rounding': rounding
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
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
round_to_fixed Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
gatech-eic/shiftaddvit/pvt/deepshift/modules.py
code served (permissive licence) · get_code("a32c2a526fb3d73d")
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 Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 math

torch.manual_seed(0)

# Create a small tensor with values that will be meaningful for the rounding function
input_tensor = torch.randn(2, 4) * 100  # Random values scaled up to test rounding

ARGS = {
    "input": input_tensor,
    "integer_bits": 16,
    "fraction_bits": 16,
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
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
valid_tiling Ran
ran on a synthesized input
GATECH-EIC/ShiftAddViT/pvt/hw_utils.py
code served (permissive licence) · get_code("85935d2d7062b8a8")
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 bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

# Construct a valid tiling_factor dictionary
# The function validates several hierarchical factorizations and constraints
# Let's build a dictionary that satisfies all the checks

tiling_factor = {
    # N factorization: N = N3 * N0
    'N3': 2,
    'N0': 4,
    'N': 8,  # 2 * 4
    
    # M factorization: M = M3 * M2 * M1 * M0
    'M3': 2,
    'M2': 2,
    'M1': 2,
    'M0': 2,  # Must be <= 16 * mem_factor
    'M': 16,  # 2 * 2 * 2 * 2
    
    # C factorization: C = C3 * C2 * C1 * C0
    'C3': 1,  # Must be 1
    'C2': 2,
    'C1': 2,
    'C0': 2,  # C0 * S < 12 * mem_factor
    'C': 8,  # 1 * 2 * 2 * 2
    
    # E factorization: E = E1 * E3
    'E1': 2,
    'E3': 2,
    'E': 4,  # 2 * 2
    
    # Spatial dimensions
    'R': 3,
    'S': 2,  # C0 * S < 12 * mem_factor: 2 * 2 = 4 < 12
    
    'stride': 1,
    'F': 2,
}

FC_flag = False
num_bits = 32

ARGS = {
    'tiling_factor': tiling_factor,
    'FC_flag': FC_flag,
    'num_bits': num_bits,
}
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 bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
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
ClampFunction Not yet run
unverified (harvested, no recorded run)
gatech-eic/shiftaddvit/pvt/deepshift/modules.py
code served (permissive licence) · get_code("fd769e1bffb1e459")
How it ran

no invocation recorded.

LinearShift Not yet run
unverified (harvested, no recorded run)
gatech-eic/shiftaddvit/pvt/deepshift/modules.py
code served (permissive licence) · get_code("a7f3ad394c6f3252")
How it ran

no invocation recorded.

clamp Not yet run
unverified (harvested, no recorded run)
gatech-eic/shiftaddvit/pvt/deepshift/modules.py
code served (permissive licence) · get_code("f3c76f772fb760b8")
How it ran

no invocation recorded.

round_fixed_point Not yet run
unverified (harvested, no recorded run)
gatech-eic/shiftaddvit/pvt/deepshift/modules.py
code served (permissive licence) · get_code("7fb5e3c67e1c7645")
How it ran

no invocation recorded.

sign Not yet run
unverified (harvested, no recorded run)
gatech-eic/shiftaddvit/pvt/deepshift/modules.py
code served (permissive licence) · get_code("3b470af6a393acb1")
How it ran

no invocation recorded.

unsym_grad_mul Not yet run
unverified (harvested, no recorded run)
gatech-eic/shiftaddvit/pvt/deepshift/modules.py
code served (permissive licence) · get_code("cc32343ee636e043")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 distinct functions with an identity, 4 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 4 later) and 16 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
build_transform 37 other papers
25 dated earlier, 9 later, 3 same year, order not determinable
2104.05707 (2021-04)
LocalViT: Analyzing Locality in Vision Transformers
2104.13840 (2021-04)
Twins: Revisiting the Design of Spatial Attention in Vision Transformers
2106.00515 (2021-06)
KVT: k-NN Attention for Boosting Vision Transformers
and 34 more not named here
get_mem_space 7 other papers
7 later
2310.13012 (2023-10)
H2O Open Ecosystem for State-of-the-art Large Language Models
2310.20199 (2023-10)
In Search of Lost Online Test-time Adaptation: A Survey
2311.08756 (2023-11)
Accelerating Toeplitz Neural Network with Constant-time Inference Complexity
and 4 more not named here
gradient_scale 1 other paper
1 later
2312.06372 (2023-12)
Ternary Spike: Learning Ternary Spikes for Spiking Neural Networks
round
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2410.21759 (2024-10)
IntLoRA: Integral Low-rank Adaptation of Quantized Diffusion Models

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-23.

Repositories linked to this paper

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

Abstract

Vision Transformers (ViTs) have shown impressive performance and have become a unified backbone for multiple vision tasks. However, both the attention mechanism and multi-layer perceptrons (MLPs) in ViTs are not sufficiently efficient due to dense multiplications, leading to costly training and inference. To this end, we propose to reparameterize pre-trained ViTs with a mixture of multiplication primitives, e.g., bitwise shifts and additions, towards a new type of multiplication-reduced model, dubbed ShiftAddViT, which aims to achieve end-to-end inference speedups on GPUs without requiring training from scratch. Specifically, all MatMuls among queries, keys, and values are reparameterized using additive kernels, after mapping queries and keys to binary codes in Hamming space. The remaining MLPs or linear layers are then reparameterized with shift kernels. We utilize TVM to implement and optimize those customized kernels for practical hardware deployment on GPUs. We find that such a reparameterization on (quadratic or linear) attention maintains model accuracy, while inevitably leading to accuracy drops when being applied to MLPs. To marry the best of both worlds, we further propose a new mixture of experts (MoE) framework to reparameterize MLPs by taking multiplication or its primitives as experts, e.g., multiplication and shift, and designing a new latency-aware load-balancing loss. Such a loss helps to train a generic router for assigning a dynamic amount of input tokens to different experts according to their latency. In principle, the faster the experts run, the more input tokens they are assigned. Extensive experiments on various 2D/3D Transformer-based vision tasks consistently validate the effectiveness of our proposed ShiftAddViT, achieving up to 5.18× latency reductions on GPUs and 42.9% energy savings, while maintaining a comparable accuracy as original or efficient ViTs. Codes and models are available at https://github.com/GATECH-EIC/ShiftAddViT.

For agents

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

get_harvested_code_for_paper("2306.06446")
get_code_for_paper("2306.06446")
have("2306.06446")

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

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

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

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

Connect an agent — have() is free.