SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.02015 · 2024

MuxServe: Flexible Spatial-Temporal Multiplexing for Multiple LLM Serving

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 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; 5 failures of our instrument; 1 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/2404.02015.json · badge: /api/ran/2404.02015.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
hao-ai-lab/muxserve canonical (classifier label)
classifier basis: census
7 ran · 1 no recorded run
FunctionStatusWhere it lives
create_shared_var Ran
ran; our contract draft was wrong, not the code
hao-ai-lab/muxserve/muxserve/shm_utils.py
code served (permissive licence) · get_code("0ea2b6175c8ac1a7")
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 SharedMemory. 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 os
from multiprocessing.shared_memory import SharedMemory

# Set up environment
os.environ['FLEXSM_SHM_PREFIX'] = 'test_'

# Clean up any existing shared memory with these names to avoid conflicts
test_names = ['test_shm_name_1', 'test_shm_name_2']
for name in test_names:
    try:
        shm = SharedMemory(name)
        shm.close()
        shm.unlink()
    except:
        pass

# Define arguments for create_shared_var
ARGS = {
    'shm_name': 'shm_name_1',
    'size': 256,
    'create': True
}
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 SharedMemory — a SharedMemory output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SharedMemory 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
get_real_rate Ran
ran, violated the contract we drafted
hao-ai-lab/muxserve/benchmark/end_to_end/bench_end_to_end_muxserve.py
code served (permissive licence) · get_code("8e3cd3729936f861")
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 numpy as np

torch.manual_seed(0)

ARGS = {
    "rates_ratio": [1.0, 2.0, 3.0, 4.0],
    "max_rate": 100.0,
    "rate_scale": 0.5
}
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 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
init_logger Ran
ran; our contract draft was wrong, not the code
hao-ai-lab/muxserve/muxserve/logger.py
code served (permissive licence) · get_code("197a0f338024eca9")
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 Logger. 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 logging

def init_logger(name: str):
    return logging.getLogger(name)

ARGS = {
    "name": "test_logger"
}
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 Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
is_cfg_valid Ran
ran; our contract draft was wrong, not the code
hao-ai-lab/muxserve/benchmark/end_to_end/bench_end_to_end_muxserve.py
code served (permissive licence) · get_code("1efcb2e9730f7147")
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 os
import yaml
import tempfile
import shutil

# Create a temporary directory with test config files
temp_dir = tempfile.mkdtemp()

# Create valid config file with positive gpu_memory_utilization
valid_config = {
    'gpu_memory_utilization': 0.8,
    'model': 'test_model',
    'batch_size': 32
}
with open(os.path.join(temp_dir, 'config_valid.yaml'), 'w') as f:
    yaml.dump(valid_config, f)

# Create invalid config file with zero gpu_memory_utilization
invalid_config = {
    'gpu_memory_utilization': 0,
    'model': 'test_model',
    'batch_size': 16
}
with open(os.path.join(temp_dir, 'config_invalid.yaml'), 'w') as f:
    yaml.dump(invalid_config, f)

# Create invalid config file with negative gpu_memory_utilization
invalid_config2 = {
    'gpu_memory_utilization': -0.5,
    'model': 'test_model',
    'batch_size': 8
}
with open(os.path.join(temp_dir, 'config_invalid2.yaml'), 'w') as f:
    yaml.dump(invalid_config2, f)

# Create a config file that should be skipped (contains 'spatial' in name)
spatial_config = {
    'gpu_memory_utilization': -0.1,
    'model': 'spatial_model'
}
with open(os.path.join(temp_dir, 'spatial_config.yaml'), 'w') as f:
    yaml.dump(spatial_config, f)

# Create a subdirectory (should be skipped)
subdir = os.path.join(temp_dir, 'subdir')
os.makedirs(subdir)

ARGS = {
    'read_dir': temp_dir
}
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 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
map_shm_name Ran
ran; our contract draft was wrong, not the code
hao-ai-lab/muxserve/muxserve/shm_utils.py
code served (permissive licence) · get_code("05f72ec8263762e7")
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 os

# Set up environment variable if needed
os.environ['FLEXSM_SHM_PREFIX'] = 'test_prefix_'

def map_shm_name(shm_name):
    shm_name = PREFIX + shm_name.split('/')[-1]
    return shm_name

# Analyze the function:
# - Takes one parameter: shm_name (a string)
# - Splits by '/' and takes the last element
# - Prepends PREFIX (from environment variable)
# - Returns the modified name

ARGS = {
    'shm_name': '/path/to/shared_memory_name'
}
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 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
pack_to_proc_name Ran
ran; our contract draft was wrong, not the code
hao-ai-lab/muxserve/muxserve/tracer.py
code served (permissive licence) · get_code("21d87cd2fd05d248")
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)

ARGS = {
    'model_name': 'facebook/opt-125m',
    'mps_percentage': 42.5
}
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
read_shared_var Ran
ran, honoured the contract we drafted
hao-ai-lab/muxserve/muxserve/shm_utils.py
code served (permissive licence) · get_code("882ad2eb293ebb9b")
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.

from multiprocessing.shared_memory import SharedMemory

# Create a shared memory object and write an integer to it
test_value = 42
test_str = str(test_value).encode('utf-8')
shm = SharedMemory(create=True, size=len(test_str))
shm.buf[:len(test_str)] = test_str

ARGS = {
    "shm": shm
}
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 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_placement_from_cfg Not yet run
unverified (harvested, no recorded run)
hao-ai-lab/muxserve/benchmark/end_to_end/bench_end_to_end_muxserve.py
code served (permissive licence) · get_code("0bfb73da82247d71")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 7 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
init_logger 5 other papers
2 dated earlier, 3 later
2401.09670 (2024-01)
DistServe: Disaggregating Prefill and Decoding for Goodput-optimized Large Language Model Serving
2403.02310 (2024-03)
Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-Serve
2405.05465 (2024-05)
Vidur: A Large-Scale Simulation Framework For LLM Inference
and 2 more not named here

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 demonstrated remarkable performance, and organizations are racing to serve LLMs of varying sizes as endpoints for use-cases like chat, programming and search. However, efficiently serving multiple LLMs poses significant challenges for existing approaches due to varying popularity of LLMs. In the paper, we present MuxServe, a flexible spatial-temporal multiplexing system for efficient multiple LLM serving. The key insight behind is to colocate LLMs considering their popularity to multiplex memory resources, and leverage the characteristics of prefill and decoding phases to separate and flexibly colocate them to multiplex computation resources. MuxServe formally formulates the multiplexing problem, and proposes a novel placement algorithm and adaptive batch scheduling strategy to identify optimal colocations and maximize utilization. MuxServe designs a unified resource manager to enable flexible and efficient multiplexing. Evaluation results show that MuxServe can achieves up to $1.8\times$ higher throughput or processes $2.9\times$ more requests within $99\%$ SLO attainment. The code is available at: \url{https://github.com/hao-ai-lab/MuxServe}.

For agents

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

get_harvested_code_for_paper("2404.02015")
get_code_for_paper("2404.02015")
have("2404.02015")

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

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

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

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

Connect an agent — have() is free.