SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2302.14705 · 2023

AccelTran: A Sparsity-Aware Accelerator for Dynamic Inference with Transformers

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 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 6 have no contract verdict; 0 failures of our instrument; 3 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/2302.14705.json · badge: /api/ran/2302.14705.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
jha-lab/acceltran canonical (classifier label)
classifier basis not recorded on the link
6 ran · 3 no recorded run
FunctionStatusWhere it lives
get_op_list Ran
ran on a synthesized input
jha-lab/acceltran/simulator/src/simulator.py
code served (permissive licence) · get_code("5e454a59cd8c0217")
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)

# Test case 1: op_idx[0] is None
ops_1 = ["op_a", "op_b", "op_c"]
op_idx_1 = [None]
batch_size_1 = 1

# Test case 2: ops[op_idx[0]] is a list (multi-head case)
ops_2 = [
    "dummy",
    [
        ["head0_op0", "head0_op1", "head0_op2"],
        ["head1_op0", "head1_op1", "head1_op2"],
    ]
]
op_idx_2 = [1, [0, 1]]
batch_size_2 = 2

# Test case 3: batch_size == 1, single op selection
ops_3 = ["op_0", "op_1", "op_2", "op_3"]
op_idx_3 = [2]
batch_size_3 = 1

# Test case 4: batch_size > 1, multiple ops
ops_4 = ["op_0", "op_1", "op_2", "op_3"]
op_idx_4 = [1]
batch_size_4 = 2

ARGS = {
    "ops": ops_3,
    "op_idx": op_idx_3,
    "batch_size": batch_size_3,
}
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_ops_done Ran
ran on a synthesized input
jha-lab/acceltran/simulator/run_dataflow.py
code served (permissive licence) · get_code("a557c22ab2527687")
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 int, ndim 0, dtype family int, 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

class Operation:
    def __init__(self, done):
        self.done = done

op1 = Operation(done=True)
op2 = Operation(done=False)
op3 = Operation(done=True)

ops = [op1, op2, op3]

ARGS = {
    "ops": ops
}
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 int, ndim 0, dtype family int, 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_tiled_ops Ran
ran on a synthesized input
jha-lab/acceltran/simulator/src/dict2ops.py
code served (permissive licence) · get_code("43e5c13ecbd9f06d")
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
from tqdm import tqdm

torch.manual_seed(0)

class BaseOp:
    def __init__(self, is_compute_op=True, base_op=True):
        self.compute_op = is_compute_op
        self.base_op = base_op
        self.fwd_base_ops = []
        self.bwd_base_ops = []
    
    def tile_op(self):
        """Return a list of tiled operations"""
        return [BaseOp(self.compute_op, True), BaseOp(self.compute_op, True)]
    
    def convert_to_fwd_base_ops(self):
        """Convert to forward base ops"""
        self.fwd_base_ops = [BaseOp(True, True), BaseOp(False, True)]
    
    def convert_to_bwd_base_ops(self):
        """Convert to backward base ops"""
        self.bwd_base_ops = [BaseOp(False, True), BaseOp(True, True)]


class HeadOp:
    def __init__(self, is_compute_op=True, base_op=True):
        self.compute_op = is_compute_op
        self.base_op = base_op
        self.fwd_base_ops = []
        self.bwd_base_ops = []
    
    def tile_op(self):
        """Return a list of tiled operations"""
        return [HeadOp(self.compute_op, True), HeadOp(self.compute_op, True)]
    
    def convert_to_fwd_base_ops(self):
        """Convert to forward base ops"""
        self.fwd_base_ops = [HeadOp(True, True), HeadOp(False, True)]
    
    def convert_to_bwd_base_ops(self):
        """Convert to backward base ops"""
        self.bwd_base_ops = [HeadOp(False, True), HeadOp(True, True)]


# Create test operations
simple_compute_op = BaseOp(is_compute_op=True, base_op=True)
simple_memory_op = BaseOp(is_compute_op=False, base_op=True)

# Create non-base operations that need conversion
complex_compute_op = BaseOp(is_compute_op=True, base_op=False)
complex_memory_op = BaseOp(is_compute_op=False, base_op=False)

# Create multihead operations (list of HeadOp instances)
multihead_op = [
    HeadOp(is_compute_op=True, base_op=True),
    HeadOp(is_compute_op=False, base_op=True),
]

complex_multihead_op = [
    HeadOp(is_compute_op=True, base_op=False),
    HeadOp(is_compute_op=False, base_op=False),
]

# Combine all operations into a list
ops = [
    simple_compute_op,
    simple_memory_op,
    complex_compute_op,
    complex_memory_op,
    multihead_op,
    complex_multihead_op,
]

ARGS = {
    'ops': ops,
    'direction': 'fwd',
    'tile_compute_ops': True,
    'tile_memory_ops': False,
    'debug': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — 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_tokenizer_args Ran
ran on a synthesized input
jha-lab/acceltran/pruning/run_evaluation.py
code served (permissive licence) · get_code("790139f3f26c1fad")
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 shlex
import tempfile

torch.manual_seed(0)

# Create a temporary directory for output
output_dir = tempfile.mkdtemp()
task = "mrpc"

ARGS = {
    "output_dir": output_dir,
    "task": task,
}
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_training_args Ran
ran on a synthesized input
jha-lab/acceltran/pruning/run_evaluation.py
code served (permissive licence) · get_code("e2105743f5a5b342")
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 shlex

ARGS = {
    'output_dir': '/tmp/test_output',
    'task': 'sst2',
    'throughput_test': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
update_op_idx Ran
ran on a synthesized input
jha-lab/acceltran/simulator/src/simulator.py
code served (permissive licence) · get_code("e21722b02b27cae9")
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

torch.manual_seed(0)

# Analyze the function to understand what it expects:
# - ops: a list that can contain non-list items and list items
# - op_idx: a list with 2 elements [op_idx[0], op_idx[1]], where op_idx[0] is an index or None, 
#           and op_idx[1] is a list that can contain None or numeric values
# - stall_list: a list of boolean values
# - batch_size: an integer
# - ops_done: an integer (accumulator)

# Build ops structure with mixed content
ops = [
    "op0",           # non-list item at index 0
    ["head0", "head1"],  # list item at index 1 with 2 elements
    "op2",           # non-list item at index 2
    ["head0", "head1", "head2"],  # list item at index 3 with 3 elements
    "op4",           # non-list item at index 4
]

# Build op_idx: [current_op_index, list_of_positions_per_head]
op_idx = [1, [0, 5]]

# stall_list: boolean flags for each head (matches the number of heads in current op)
stall_list = [False, True]

# batch_size: integer for batch processing
batch_size = 2

# ops_done: counter for operations completed
ops_done = 0

ARGS = {
    "ops": ops,
    "op_idx": op_idx,
    "stall_list": stall_list,
    "batch_size": batch_size,
    "ops_done": ops_done,
}
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 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_last_compute_op Not yet run
unverified (harvested, no recorded run)
jha-lab/acceltran/simulator/src/simulator.py
code served (permissive licence) · get_code("54725a6fca4e8125")
How it ran

no invocation recorded.

get_ops Not yet run
unverified (harvested, no recorded run)
jha-lab/acceltran/simulator/src/dict2ops.py
code served (permissive licence) · get_code("92d7fe452f29b732")
How it ran

no invocation recorded.

main Not yet run
unverified (harvested, no recorded run)
jha-lab/acceltran/simulator/src/dict2ops.py
code served (permissive licence) · get_code("8532da00c39e5882")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 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.

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

Self-attention-based transformer models have achieved tremendous success in the domain of natural language processing. Despite their efficacy, accelerating the transformer is challenging due to its quadratic computational complexity and large activation sizes. Existing transformer accelerators attempt to prune its tokens to reduce memory access, albeit with high compute overheads. Moreover, previous works directly operate on large matrices involved in the attention operation, which limits hardware utilization. In order to address these challenges, this work proposes a novel dynamic inference scheme, DynaTran, which prunes activations at runtime with low overhead, substantially reducing the number of ineffectual operations. This improves the throughput of transformer inference. We further propose tiling the matrices in transformer operations along with diverse dataflows to improve data reuse, thus enabling higher energy efficiency. To effectively implement these methods, we propose AccelTran, a novel accelerator architecture for transformers. Extensive experiments with different models and benchmarks demonstrate that DynaTran achieves higher accuracy than the state-of-the-art top-k hardware-aware pruning strategy while attaining up to 1.2$\times$ higher sparsity. One of our proposed accelerators, AccelTran-Edge, achieves 330K$\times$ higher throughput with 93K$\times$ lower energy requirement when compared to a Raspberry Pi device. On the other hand, AccelTran-Server achieves 5.73$\times$ higher throughput and 3.69$\times$ lower energy consumption compared to the state-of-the-art transformer co-processor, Energon. The simulation source code is available at https://github.com/jha-lab/acceltran.

For agents

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

get_harvested_code_for_paper("2302.14705")
get_code_for_paper("2302.14705")
have("2302.14705")

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

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

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

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

Connect an agent — have() is free.