SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.14361 · 2024

MoE-Infinity: Efficient MoE Inference on Personal Machines with Sparsity-Aware Expert Cache

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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 0 have no contract verdict; 3 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/2401.14361.json · badge: /api/ran/2401.14361.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
efficientmoe/moe-infinity canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
torchmoe/moe-infinity canonical (classifier label)
classifier basis: census
1 ran · 0 no recorded run
FunctionStatusWhere it lives
capture_result Ran
ran; our contract draft was wrong, not the code
efficientmoe/moe-infinity/benchmarks/serving/validate_batched_dispatch.py
code served (permissive licence) · get_code("3a5205d2f63607bc")
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 Result. 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 dataclasses import dataclass
from typing import Callable

torch.manual_seed(0)

@dataclass
class Result:
    name: str
    status: str
    detail: str

class Blocked(RuntimeError):
    pass

def capture_result(name: str, fn: Callable[[], str]) -> Result:
    try:
        detail = fn()
        return Result(name=name, status='PASS', detail=detail)
    except Blocked as exc:
        return Result(name=name, status='BLOCKED', detail=str(exc))
    except Exception as exc:
        return Result(name=name, status='FAIL', detail=f'{type(exc).__name__}: {exc}')


# Define test functions for the fn parameter
def successful_fn():
    """A function that succeeds and returns a string detail."""
    return "Operation completed successfully"

def blocked_fn():
    """A function that raises Blocked exception."""
    raise Blocked("This operation is blocked")

def failing_fn():
    """A function that raises a generic exception."""
    raise ValueError("Something went wrong")


# Construct valid arguments
ARGS = {
    'name': 'test_operation',
    'fn': successful_fn
}
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 Result — a Result output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Result 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
extract_context_feature Ran
ran; our contract draft was wrong, not the code
torchmoe/moe-infinity/moe_infinity/entrypoints/big_modeling.py
code served (permissive licence) · get_code("d546dd12f4a824c5")
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, 3, 20) 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)

# Construct hidden_states as a tuple of tensors, one per layer
# Index 0 is embedding output, indices 1+ are decoder layer outputs
# For layer_ids=(1, 9, 17, 25, 33), we need at least 34 entries (0-indexed)
# Each tensor: [batch=2, seq_len=3, hidden_size=4]

hidden_states = tuple(
    torch.randn(2, 3, 4) for _ in range(35)
)

layer_ids = (1, 9, 17, 25, 33)

ARGS = {
    "hidden_states": hidden_states,
    "layer_ids": layer_ids,
}
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 3, dtype family float, shape (2, 3, 20) — shape (2, 3, 20) 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
recommendation Ran
ran; our contract draft was wrong, not the code
efficientmoe/moe-infinity/benchmarks/serving/validate_batched_dispatch.py
code served (permissive licence) · get_code("dbefd08c6aab8151")
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 str. 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)

# The function takes one parameter: analysis, which is a dict
# It accesses analysis['supports_token_batched_input'] and casts it to bool
# The function returns a string recommendation based on this boolean value

# We need to construct two test cases to show both branches work:
# Case 1: supports_token_batched_input = False (returns Option B recommendation)
# Case 2: supports_token_batched_input = True (returns Option A recommendation)

# For this setup, we'll use the True case as the primary argument
analysis = {
    'supports_token_batched_input': True,
}

ARGS = {
    'analysis': analysis,
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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

Also present in other papers' code

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

This paper presents MoE-Infinity, an efficient MoE inference system designed for personal machines with limited GPU memory capacity. The key idea for MoE-Infinity is that on personal machines, which are often single-user environments, MoE-based LLMs typically operate with a batch size of one. In this setting, MoE models exhibit a high degree of activation sparsity, meaning a small number of experts are frequently reused in generating tokens during the decode phase. Leveraging this idea, we design a sparsity-aware expert cache, which can trace the sparse activation of experts during inference and carefully select the trace that represents the sparsity pattern. By analyzing these selected traces, MoE-Infinity guides the replacement and prefetching of the expert cache, providing 3.1-16.7x per-token latency improvements over numerous state-of-the-art systems, including vLLM, Ollama, DeepSpeed and BrainStorm across various MoE models (DeepSeek and Mixtral) when handling different LLM tasks. MoE-Infinity's source code is publicly available at https://github.com/EfficientMoE/MoE-Infinity

For agents

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

get_harvested_code_for_paper("2401.14361")
get_code_for_paper("2401.14361")
have("2401.14361")

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

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

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

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

Connect an agent — have() is free.