SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.17238 · 2023

Fast Inference of Mixture-of-Experts Language Models with Offloading

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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, 2 violated it and 0 have no contract verdict; 2 failures of our instrument; 0 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/2312.17238.json · badge: /api/ran/2312.17238.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
dvmazur/mixtral-offloading canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
FunctionStatusWhere it lives
is_namedtuple Ran
ran, violated the contract we drafted
dvmazur/mixtral-offloading/src/utils.py
code served (permissive licence) · get_code("639811fcfbb1e7a8")
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.

from collections import namedtuple

# Create a valid namedtuple instance
Point = namedtuple('Point', ['x', 'y'])
valid_namedtuple = Point(1, 2)

# Create an invalid namedtuple-like object (regular tuple)
regular_tuple = (1, 2)

# Create another invalid object (regular class instance)
class RegularClass:
    pass

regular_instance = RegularClass()

# The function takes a single parameter 'x' which can be any object
# We'll test it with a valid namedtuple instance
ARGS = {
    'x': valid_namedtuple
}
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 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
nested_compare Ran
ran, violated the contract we drafted
dvmazur/mixtral-offloading/src/utils.py
code served (permissive licence) · get_code("d79294cb3c49a723")
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 numpy as np

torch.manual_seed(0)

# The function nested_compare checks if two nested structures (lists, tuples, dicts)
# have matching structure. It recursively compares the structure but doesn't actually
# compare values - it just checks types and nesting patterns match.

# Test case 1: Simple nested structures
t = {
    "a": [1, 2, 3],
    "b": (4, 5),
    "c": {"nested": "value"}
}

u = {
    "a": [10, 20, 30],
    "b": (40, 50),
    "c": {"nested": "different_value"}
}

ARGS = {
    "t": t,
    "u": u
}
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 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
nested_pack Ran
ran, honoured the contract we drafted
dvmazur/mixtral-offloading/src/utils.py
code served (permissive licence) · get_code("7ebe56894626731f")
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 Point. 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 collections import namedtuple
import torch

torch.manual_seed(0)

# Create a simple namedtuple for testing
Point = namedtuple('Point', ['x', 'y'])

# Create flat list with some values to unpack
flat = [1, 2, 3, 4, 5, 6, 7, 8]

# Create a nested structure example that uses namedtuples, lists, tuples, and dicts
structure = Point(
    x={'a': [1, 2], 'b': (3, 4)},
    y={'c': 5, 'd': [6, 7, 8]}
)

ARGS = {
    'flat': flat,
    'structure': structure
}
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 Point — a Point output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Point output the recorded ndim 1 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
pack_4bit_u8_common Ran
ran; our contract draft was wrong, not the code
dvmazur/mixtral-offloading/src/packing.py
code served (permissive licence) · get_code("3ccd9ec0272b8111")
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 PackedTensor. 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 a small tensor with even height (required by the function)
# Shape: (4, 3) - height is 4 (even), width is 3
# Values should be in range [0, 15] to fit in 4-bit representation
W_q = torch.randint(0, 16, (4, 3), dtype=torch.int32)

ARGS = {
    "W_q": W_q
}
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 PackedTensor — a PackedTensor output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PackedTensor output the recorded ndim 2 and dtype family int 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
unpack_4bit_u8_common Ran
ran; our contract draft was wrong, not the code
dvmazur/mixtral-offloading/src/packing.py
code served (permissive licence) · get_code("6445d17b9878e024")
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 int, 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

torch.manual_seed(0)

# Create a small 4-bit quantized tensor
# The function expects uint8 tensor where each byte contains two 4-bit values
# We'll create a tensor with shape (2, 3) to demonstrate
W_q = torch.randint(0, 256, (2, 3), dtype=torch.uint8)

ARGS = {
    "W_q": W_q,
}
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 int, 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 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 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
is_namedtuple 2 other papers
2 dated earlier
1909.04630 (2019-09)
Meta-Learning with Implicit Gradients
1911.00176 (2019-11)
Sequence Modeling with Unconstrained Generation Order
nested_pack 2 other papers
2 dated earlier
1909.04630 (2019-09)
Meta-Learning with Implicit Gradients
1911.00176 (2019-11)
Sequence Modeling with Unconstrained Generation Order
nested_compare 1 other paper
1 dated earlier
1911.00176 (2019-11)
Sequence Modeling with Unconstrained Generation Order

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

With the widespread adoption of Large Language Models (LLMs), many deep learning practitioners are looking for strategies of running these models more efficiently. One such strategy is to use sparse Mixture-of-Experts (MoE) - a type of model architectures where only a fraction of model layers are active for any given input. This property allows MoE-based language models to generate tokens faster than their dense counterparts, but it also increases model size due to having multiple experts. Unfortunately, this makes state-of-the-art MoE language models difficult to run without high-end GPUs. In this work, we study the problem of running large MoE language models on consumer hardware with limited accelerator memory. We build upon parameter offloading algorithms and propose a novel strategy that accelerates offloading by taking advantage of innate properties of MoE LLMs. Using this strategy, we build can run Mixtral-8x7B with mixed quantization on desktop hardware and free-tier Google Colab instances.

For agents

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

get_harvested_code_for_paper("2312.17238")
get_code_for_paper("2312.17238")
have("2312.17238")

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

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

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

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

Connect an agent — have() is free.