SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.24144 · 2026

EVA: Accelerating LLM Decoding via an Efficient Vector Quantization Architecture

Yiran Chen, Hai Li, Cong Guo, Yifan Xu, Ziyue Zhang, Bowen Duan, Xinhua Chen, Yuzhe Fu, Chiyue Wei, Haoxuan Shan, Changchun Zhou

arXiv · PDF · Open in the Atlas

Code that ran

9 of 13 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; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 7 failures of our instrument; 4 no recorded run), measured 2026-11-23; 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/2605.24144.json · badge: /api/ran/2605.24144.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
dbw6/Eva canonical (classifier label)
classifier basis: census
9 ran · 4 no recorded run
FunctionStatusWhere it lives
compute_average_index_counts Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dbw6/Eva/simulator/aqlm_analysis.py
code served (permissive licence) · get_code("60eaa38c50c59a9b")
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 ndarray, ndim 1, dtype family float, shape (256,) 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 numpy as np

# Create a small stand-in indices_full array
# Shape should be (n_rows, some_dim, num_codebooks)
# The function uses indices as input to np.bincount, so values should be integers in range [0, 255]
n_rows = 2
middle_dim = 3
num_codebooks = 4

# Create random indices with values in [0, 255] range
np.random.seed(0)
indices_full = np.random.randint(0, 256, size=(n_rows, middle_dim, num_codebooks), dtype=np.int32)

ARGS = {
    "indices_full": indices_full,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (256,) — shape (256,) 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
extract_weight_indices Ran
ran, honoured the contract we drafted
dbw6/Eva/simulator/aqlm_analysis.py
code served (permissive licence) · get_code("1fce10211e64cfff")
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 ndarray, ndim 3, dtype family int, shape (3, 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
import numpy as np

torch.manual_seed(0)

class AttentionModule(nn.Module):
    def __init__(self):
        super().__init__()
        # Create a mock weight module with 'codes' attribute
        self.q_proj = nn.Module()
        self.k_proj = nn.Module()
        self.v_proj = nn.Module()
        self.o_proj = nn.Module()
        
        # Add codes as a tensor attribute (3D tensor to test transpose)
        self.q_proj.codes = torch.randint(0, 256, (2, 3, 4), dtype=torch.uint8)
        self.k_proj.codes = torch.randint(0, 256, (2, 3, 4), dtype=torch.uint8)
        self.v_proj.codes = torch.randint(0, 256, (2, 3, 4), dtype=torch.uint8)
        self.o_proj.codes = torch.randint(0, 256, (2, 3, 4), dtype=torch.uint8)

class MLPModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.up_proj = nn.Module()
        self.gate_proj = nn.Module()
        self.down_proj = nn.Module()
        
        self.up_proj.codes = torch.randint(0, 256, (2, 3, 4), dtype=torch.uint8)
        self.gate_proj.codes = torch.randint(0, 256, (2, 3, 4), dtype=torch.uint8)
        self.down_proj.codes = torch.randint(0, 256, (2, 3, 4), dtype=torch.uint8)

class LayerModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.self_attn = AttentionModule()
        self.mlp = MLPModule()

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.model = nn.Module()
        self.model.layers = nn.ModuleList([LayerModule() for _ in range(2)])

model = MockModel()

ARGS = {
    'model': model,
    'layer_number': 0,
    'weight_type': 'q_proj'
}
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 ndarray, ndim 3, dtype family int, shape (3, 2, 4) — shape (3, 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
fit_faiss_kmeans Ran
ran; our contract draft was wrong, not the code
dbw6/Eva/algorithm/src/kmeans.py
code served (permissive licence) · get_code("81f3ffa3b24921b4")
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

torch.manual_seed(0)

# Create a small tensor: [nsamples=2, dim=4]
data = torch.randn(2, 4)

# Number of centroids
k = 2

# Maximum iterations
max_iter = 10

# Run on CPU (gpu=False to avoid CUDA requirement)
gpu = False

# Optional: max points per centroid (set to None to test the default path)
max_points_per_centroid = None

# Verbose output
verbose = False

ARGS = {
    "data": data,
    "k": k,
    "max_iter": max_iter,
    "gpu": gpu,
    "max_points_per_centroid": max_points_per_centroid,
    "verbose": verbose,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
faiss, 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
is_model_for_causal_lm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dbw6/Eva/algorithm/src/modelutils.py
code served (permissive licence) · get_code("a4b3eb2d0a0ea0d4")
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
import torch.nn as nn
import transformers
from transformers import PreTrainedModel, PretrainedConfig

torch.manual_seed(0)

# Create a minimal config
class MinimalConfig(PretrainedConfig):
    model_type = "minimal"
    
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.hidden_size = 4
        self.vocab_size = 8
        self.num_hidden_layers = 1

# Create a minimal causal LM model
class MinimalCausalLM(PreTrainedModel):
    config_class = MinimalConfig
    base_model_prefix = "transformer"
    
    def __init__(self, config):
        super().__init__(config)
        self.config = config
        self.transformer = nn.Module()
        self.lm_head = nn.Linear(config.hidden_size, config.vocab_size)
    
    def get_output_embeddings(self):
        return self.lm_head
    
    def forward(self, input_ids):
        return None

# Instantiate the model
config = MinimalConfig()
model = MinimalCausalLM(config)

ARGS = {
    "model": model
}
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 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
load_yaml Ran
ran; our contract draft was wrong, not the code
dbw6/Eva/simulator/config.py
code served (permissive licence) · get_code("170f525d725f54b6")
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 tempfile
from pathlib import Path
import yaml

# Create a temporary directory and YAML file
temp_dir = tempfile.mkdtemp()
temp_path = Path(temp_dir) / "test.yaml"

# Write a valid YAML mapping to the file
test_data = {
    "key1": "value1",
    "key2": 42,
    "key3": ["a", "b", "c"],
    "nested": {"inner_key": "inner_value"}
}

with temp_path.open('w', encoding='utf-8') as f:
    yaml.dump(test_data, f)

ARGS = {
    "path": temp_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — 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
load_yaml_directory Ran
ran; our contract draft was wrong, not the code
dbw6/Eva/simulator/config.py
code served (permissive licence) · get_code("3ad03bb7784f1436")
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 tempfile
from pathlib import Path
import yaml

# Create a temporary directory with YAML files
temp_dir = tempfile.TemporaryDirectory()
temp_path = Path(temp_dir.name)

# Create some test YAML files
yaml_file_1 = temp_path / "config1.yaml"
yaml_file_2 = temp_path / "config2.yaml"

# Write YAML content with a top-level key
with open(yaml_file_1, 'w') as f:
    yaml.dump({
        'settings': {
            'param1': 'value1',
            'param2': 42
        }
    }, f)

with open(yaml_file_2, 'w') as f:
    yaml.dump({
        'settings': {
            'param3': 'value3',
            'param4': [1, 2, 3]
        }
    }, f)

ARGS = {
    'path': temp_path,
    'top_level_key': 'settings'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — 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
maybe_get_0th_element Ran
ran, violated the contract we drafted
dbw6/Eva/algorithm/src/utils.py
code served (permissive licence) · get_code("681820c06d56adbd")
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
import torch.nn as nn
from typing import Sequence, Union, Any

torch.manual_seed(0)

# Test case 1: Non-sequence input (int)
test_int = 42

# Test case 2: Non-sequence input (string)
test_string = "hello"

# Test case 3: Non-sequence input (tensor)
test_tensor = torch.randn(2, 4)

# Test case 4: Sequence input (list)
test_list = [1, 2, 3, 4, 5]

# Test case 5: Sequence input (tuple)
test_tuple = (torch.randn(2, 4), torch.randn(3, 5))

# Test case 6: Sequence input (list of tensors)
test_list_of_tensors = [torch.randn(2, 4), torch.randn(3, 5)]

# For the function, we just need to test with one value at a time
# Let's use a simple sequence to demonstrate
x = [10, 20, 30]

ARGS = {
    "x": x
}
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
resolve_repo_path Ran
ran; our contract draft was wrong, not the code
dbw6/Eva/simulator/config.py
code served (permissive licence) · get_code("8ddb42ef2b21568b")
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 PosixPath. 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.

from pathlib import Path

# The function takes a raw_path parameter that can be str or Path
# It converts it to a Path object and either returns it if absolute,
# or joins it with REPO_ROOT if relative

# Create test arguments
ARGS = {
    "raw_path": "some/relative/path.txt",
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
traces_from_lengths Ran
ran; our contract draft was wrong, not the code
dbw6/Eva/simulator/datasets.py
code served (permissive licence) · get_code("66c1130f2c759f58")
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 random
from typing import Iterable

# The function takes:
# - lengths: Iterable[tuple[int, int]] - an iterable of tuples with two integers each
# - target_rps: float (default 1.0) - target requests per second
# - seed: int (default 42) - random seed

# Construct a list of tuples representing (input_length, output_length) pairs
lengths = [
    (10, 20),
    (15, 25),
    (8, 16),
    (12, 24),
]

ARGS = {
    'lengths': lengths,
    'target_rps': 2.5,
    'seed': 42,
}
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
get_mean_nbits_by_codebook Not yet run
unverified (harvested, no recorded run)
dbw6/Eva/algorithm/src/utils.py
code served (permissive licence) · get_code("aebbe1775db58c48")
How it ran

no invocation recorded.

load_aqlm_model Not yet run
unverified (harvested, no recorded run)
dbw6/Eva/algorithm/model_loader.py
code served (permissive licence) · get_code("a2ef1e1285e2c83a")
How it ran

no invocation recorded.

load_quantized_model Not yet run
unverified (harvested, no recorded run)
dbw6/Eva/simulator/aqlm_analysis.py
code served (permissive licence) · get_code("1c28ff61d7b14b57")
How it ran

no invocation recorded.

maybe_script Not yet run
unverified (harvested, no recorded run)
dbw6/Eva/algorithm/src/utils.py
code served (permissive licence) · get_code("e546469491f4fb36")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 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 13 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-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

Large Language Models (LLMs) have achieved impressive performance across diverse domains but remain inefficient during the autoregressive decoding phase. Unlike the prefill stage, which employs compute-bound GEMM operations, decoding executes a sequence of small GEMV-like computations that are memory-bound and underutilize modern accelerators. Weight-only vector quantization (VQ) has emerged as an effective compression technique that clusters model weights into a shared codebook and replaces the original weight matrix with lowprecision indices, enabling 2-bit-level weight compression. While this approach substantially reduces model size and memory bandwidth, it still suffers from two critical inefficiencies: the low utilization of GEMV computation and frequent memory conflicts during codebook lookups. This paper presents EVA, an efficient vector-quantizationbased architecture that addresses both computational and memory bottlenecks in LLM decoding. EVA builds on a simple yet effective insight that combines input-codebook computation with conflict-free memory access. Instead of reconstructing quantized weights from indices, EVA directly performs dot products between input vectors and the weight codebook, transforming LLM decoding from GEMV to GEMM computation. It then performs structured lookups from an intermediate output buffer, eliminating memory bank conflicts. We further design a hardware-software co-optimized architecture specialized for LLM decoding while remaining compatible with conventional prefill execution. Evaluations show that EVA achieves up to 11.17× speedup and 7.17× higher energy efficiency compared with the SOTA lookup-based architecture, while preserving arithmetic precision after vector quantization. Our code is available at https://github.com/dbw6/Eva.git.

For agents

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

get_harvested_code_for_paper("2605.24144")
get_code_for_paper("2605.24144")
have("2605.24144")

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

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

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

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

Connect an agent — have() is free.