SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.02528 · 2024

Scalable MatMul-free Language Modeling

arXiv · PDF · Open in the Atlas

Code that ran

9 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, 1 violated it and 0 have no contract verdict; 8 failures of our instrument; 0 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.02528.json · badge: /api/ran/2406.02528.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
ridgerchu/matmulfreellm canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
FunctionStatusWhere it lives
activation_quant Ran
ran; our contract draft was wrong, not the code
ridgerchu/matmulfreellm/mmfreelm/modules/layernorm.py
code served (permissive licence) · get_code("d2a44884578f8895")
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 numpy as np

torch.manual_seed(0)

# Create a small activation tensor with shape [n, d]
# n=2 (batch size), d=4 (feature dimension)
x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 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
bias_gelu Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ridgerchu/matmulfreellm/mmfreelm/modules/activations.py
code served (permissive licence) · get_code("0bda6e53e10d00b2")
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; 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)

# The function bias_gelu takes two tensor arguments: y and bias
# It adds bias to y, then applies a GELU activation using tanh approximation
# Both y and bias need to be tensors that support addition and dtype conversion

y = torch.randn(2, 4)
bias = torch.randn(2, 4)

ARGS = {
    "y": y,
    "bias": bias,
}
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 — no output shape is stated: observe_signature.py could not observe it (import:OSError)
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
bias_gelu_bwd Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ridgerchu/matmulfreellm/mmfreelm/modules/activations.py
code served (permissive licence) · get_code("cdeab393914039f4")
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)

# Create small tensors with distinct sizes
# g: gradient tensor, shape (B, D) where B=2, D=4
g = torch.randn(2, 4, dtype=torch.float32)

# y: output tensor, shape (B, D) where B=2, D=4
y = torch.randn(2, 4, dtype=torch.float32)

# bias: bias tensor, shape (D,) where D=4
bias = torch.randn(4, dtype=torch.float32)

ARGS = {
    "g": g,
    "y": y,
    "bias": bias,
}
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
fft_conv Ran
ran; our contract draft was wrong, not the code
ridgerchu/matmulfreellm/mmfreelm/modules/convolution.py
code served (permissive licence) · get_code("8def605349357890")
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 3, dtype family float, shape (2, 4, 8) 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.functional as F
from einops import rearrange

torch.manual_seed(0)

# Create small tensors with distinct dimensions
batch_size = 2
dim = 4
seqlen = 8

# u: input tensor, shape (batch, dim, seqlen)
u = torch.randn(batch_size, dim, seqlen, dtype=torch.float32)

# k: kernel tensor, shape (dim,) or (dim, seqlen)
k = torch.randn(dim, seqlen, dtype=torch.float32)

# dropout_mask: optional mask, shape (batch, dim) or None
dropout_mask = torch.ones(batch_size, dim, dtype=torch.float32)

# k_rev: optional reversed kernel, same shape as k or None
k_rev = torch.randn(dim, seqlen, dtype=torch.float32)

# gelu: boolean flag
gelu = True

ARGS = {
    "u": u,
    "k": k,
    "dropout_mask": dropout_mask,
    "gelu": gelu,
    "k_rev": k_rev,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 8) — shape (2, 4, 8) 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
is_power_of_2 Ran
ran, violated the contract we drafted
ridgerchu/matmulfreellm/mmfreelm/modules/feature_map.py
code served (permissive licence) · get_code("9760951c9f233ba8")
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

torch.manual_seed(0)

ARGS = {
    "n": 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 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
layer_norm_ref Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ridgerchu/matmulfreellm/mmfreelm/modules/fused_norm_gate.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from XsChen524/mode-mamba-ts, is pointer only (licence: NONE) · get_code("2ce8fcf5bedd19ec")
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 XsChen524/mode-mamba-ts, 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.

rms_norm_ref Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ridgerchu/matmulfreellm/mmfreelm/modules/fused_norm_gate.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from XsChen524/mode-mamba-ts, is pointer only (licence: NONE) · get_code("ab802ae3195c6316")
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 XsChen524/mode-mamba-ts, 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.

swish Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ridgerchu/matmulfreellm/mmfreelm/modules/activations.py
code served (permissive licence) · get_code("7782c4fdd8768c07")
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; 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 torch.nn.functional as F

torch.manual_seed(0)

# The swish function takes a single parameter 'x' which is used with F.silu()
# F.silu() expects a tensor input
# Create a small tensor to pass as input
x = torch.randn(2, 4)

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 Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py could not observe it (import:OSError)
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
weight_quant Ran
ran; our contract draft was wrong, not the code
ridgerchu/matmulfreellm/mmfreelm/modules/layernorm.py
code served (permissive licence) · get_code("df13e1b106d0c717")
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 (4, 3) 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)

# Construct a small weight tensor with shape [d, k]
# Using distinct dimensions: d=4, k=3
w = torch.randn(4, 3)

ARGS = {
    "w": w
}
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 (4, 3) — shape (4, 3) 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

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, 7 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 2 the same month, 5 later) and 2 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
layer_norm_ref 8 other papers
1 dated earlier, 2 the same month, 5 later
2403.16899 (2024-03)
State Space Models as Foundation Models: A Control Theoretic Overview
2406.03344 (2024-06)
Audio Mamba: Bidirectional State Space Model for Audio Representation Learning
2406.10700 (2024-06)
Voxel Mamba: Group-Free State Space Models for Point Cloud based 3D Object Detection
and 5 more not named here
rms_norm_ref 8 other papers
1 dated earlier, 2 the same month, 5 later
2403.16899 (2024-03)
State Space Models as Foundation Models: A Control Theoretic Overview
2406.03344 (2024-06)
Audio Mamba: Bidirectional State Space Model for Audio Representation Learning
2406.10700 (2024-06)
Voxel Mamba: Group-Free State Space Models for Point Cloud based 3D Object Detection
and 5 more not named here
activation_quant 1 other paper
1 later
2411.06360 (2024-11)
An Efficient Matrix Multiplication Algorithm for Accelerating Inference in Binary and Ternary Neural Networks
bias_gelu 1 other paper
1 later
2506.00385 (2025-06)
MagiCodec: Simple Masked Gaussian-Injected Codec for High-Fidelity Reconstruction and Generation
fft_conv 1 other paper
1 dated earlier
2402.10644 (2024-02)
Linear Transformers with Learnable Kernel Functions are Better In-Context Models
is_power_of_2 1 other paper
1 dated earlier
2306.12517 (2023-06)
FFCV: Accelerating Training by Removing Data Bottlenecks
weight_quant 1 other paper
1 later
2411.06360 (2024-11)
An Efficient Matrix Multiplication Algorithm for Accelerating Inference in Binary and Ternary Neural Networks

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 fundamentally altered how we approach scaling in machine learning. However, these models pose substantial computational and memory challenges, primarily due to the reliance on matrix multiplication (MatMul) within their attention and feed-forward (FFN) layers. We demonstrate that MatMul operations can be eliminated from LLMs while maintaining strong performance, even at billion-parameter scales. Our MatMul-free models, tested on models up to 2.7B parameters, are comparable to state-of-the-art pre-trained Transformers, and the performance gap narrows as model size increases. Our approach yields significant memory savings: a GPU-efficient implementation reduces memory consumption by up to 61% during training and over 10x during inference. When adapted for a multi-chip neuromorphic system, the model leverages asynchronous processing to achieve 4x higher throughput with 10x less energy than edge GPUs.

For agents

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

get_harvested_code_for_paper("2406.02528")
get_code_for_paper("2406.02528")
have("2406.02528")

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

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

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

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

Connect an agent — have() is free.