SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.03382 · 2022

Tutel: Adaptive Mixture-of-Experts at Scale

arXiv · PDF · Open in the Atlas

Code that ran

6 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; 2 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 3 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/2206.03382.json · badge: /api/ran/2206.03382.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
microsoft/tutel canonical (classifier label)
classifier basis not recorded on the link
6 ran · 3 no recorded run
FunctionStatusWhere it lives
get_world_rank Ran
ran, honoured the contract we drafted
microsoft/tutel/tutel/impls/communicate.py
pointer only (licence: MIT); the stored copy get_code serves, from ZJU-CNLAB/FlowMoE, is pointer only (licence: NONE) · get_code("e27ff54f207ed25a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ZJU-CNLAB/FlowMoE, 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.

get_world_size Ran
ran, honoured the contract we drafted
microsoft/tutel/tutel/impls/communicate.py
pointer only (licence: MIT); the stored copy get_code serves, from ZJU-CNLAB/FlowMoE, is pointer only (licence: NONE) · get_code("84f0fee712b16db3")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ZJU-CNLAB/FlowMoE, 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.

gshard_loss Ran
ran; our contract draft was wrong, not the code
microsoft/tutel/tutel/impls/losses.py
pointer only (licence: MIT); the stored copy get_code serves, from ZJU-CNLAB/FlowMoE, is pointer only (licence: NONE) · get_code("cbdc2156b54d24c4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ZJU-CNLAB/FlowMoE, 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.

load Ran
ran on a synthesized input
microsoft/tutel/tutel/system.py
code served (permissive licence) · get_code("2776ad89f773f827")
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 tempfile
import numpy as np
import torch

torch.manual_seed(0)

# Create a temporary numpy file
with tempfile.NamedTemporaryFile(suffix='.npy', delete=False) as f:
    temp_path = f.name
    np_array = np.random.randn(2, 4).astype(np.float32)
    np.save(temp_path, np_array)

ARGS = {
    'path': temp_path,
    'device': None,
}
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
load_importance_loss Ran
ran on a synthesized input
microsoft/tutel/tutel/impls/losses.py
code served (permissive licence) · get_code("686044486fdeee35")
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 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
from torch.distributions.normal import Normal

torch.manual_seed(0)

# Create small tensors for the function
batch_size = 2
num_experts = 4
topk = 2

# scores_wo_noise: tensor of shape (batch_size, num_experts)
# This represents expert scores without noise
scores_wo_noise = torch.randn(batch_size, num_experts)

# topk_logits: tensor of shape (batch_size, topk)
# This represents the top-k logits for each batch
topk_logits = torch.randn(batch_size, topk)

# num_global_experts: integer representing total number of experts
num_global_experts = 4

# gate_noise: float representing the noise level (must be > 0)
gate_noise = 0.1

ARGS = {
    "scores_wo_noise": scores_wo_noise,
    "topk_logits": topk_logits,
    "num_global_experts": num_global_experts,
    "gate_noise": gate_noise,
}
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 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
record_time Ran
ran on a synthesized input
microsoft/tutel/tutel/system.py
code served (permissive licence) · get_code("baf6225757c307f6")
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 float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 time

torch.manual_seed(0)

# The record_time function uses get_local_session() which accesses
# init_data_model_parallel.default_env, and that env has an is_cuda attribute.
# We need to set up a mock session before calling record_time.

class MockSession:
    def __init__(self, is_cuda=False):
        self.is_cuda = is_cuda
        self.global_rank = 0
        self.data_rank = 0
        self.model_rank = 0
        self.local_device = type('obj', (object,), {'type': 'cpu'})()

# Mock the init_data_model_parallel function to set up default_env
def init_data_model_parallel(group_count=1, backend='nccl'):
    result = MockSession(is_cuda=False)
    init_data_model_parallel.default_env = result
    return result

# Initialize the session
init_data_model_parallel()

# Now define ARGS for record_time
# record_time takes is_cuda as a parameter (optional, defaults to None)
ARGS = {
    'is_cuda': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tutel — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
cast_if_autocast_enabled Not yet run
unverified (harvested, no recorded run)
microsoft/tutel/tutel/impls/moe_layer.py
code served (permissive licence) · get_code("e3e62ba7aaa152c4")
How it ran

no invocation recorded.

create_groups_from_world Not yet run
unverified (harvested, no recorded run)
microsoft/tutel/tutel/impls/communicate.py
code served (permissive licence) · get_code("a83f2d199fefdfe9")
How it ran

no invocation recorded.

init_data_model_parallel Not yet run
unverified (harvested, no recorded run)
microsoft/tutel/tutel/system.py
code served (permissive licence) · get_code("9c8a0f437fd9e335")
How it ran

no invocation recorded.

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, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 6 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
get_world_rank 1 other paper
1 later
2510.00207 (2025-10)
FlowMoE: A Scalable Pipeline Scheduling Framework for Distributed Mixture-of-Experts Training
get_world_size 1 other paper
1 later
2510.00207 (2025-10)
FlowMoE: A Scalable Pipeline Scheduling Framework for Distributed Mixture-of-Experts Training
gshard_loss 1 other paper
1 later
2510.00207 (2025-10)
FlowMoE: A Scalable Pipeline Scheduling Framework for Distributed Mixture-of-Experts Training

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

Sparsely-gated mixture-of-experts (MoE) has been widely adopted to scale deep learning models to trillion-plus parameters with fixed computational cost. The algorithmic performance of MoE relies on its token routing mechanism that forwards each input token to the right sub-models or experts. While token routing dynamically determines the amount of expert workload at runtime, existing systems suffer inefficient computation due to their static execution, namely static parallelism and pipelining, which does not adapt to the dynamic workload. We present Flex, a highly scalable stack design and implementation for MoE with dynamically adaptive parallelism and pipelining. Flex designs an identical layout for distributing MoE model parameters and input data, which can be leveraged by all possible parallelism or pipelining methods without any mathematical inequivalence or tensor migration overhead. This enables adaptive parallelism/pipelining optimization at zero cost during runtime. Based on this key design, Flex also implements various MoE acceleration techniques. Aggregating all techniques, Flex finally delivers huge speedup at any scale -- 4.96x and 5.75x speedup of a single MoE layer over 16 and 2,048 A100 GPUs, respectively, over the previous state-of-the-art. Our evaluation shows that Flex efficiently and effectively runs a real-world MoE-based model named SwinV2-MoE, built upon Swin Transformer V2, a state-of-the-art computer vision architecture. On efficiency, Flex accelerates SwinV2-MoE, achieving up to 1.55x and 2.11x speedup in training and inference over Fairseq, respectively. On effectiveness, the SwinV2-MoE model achieves superior accuracy in both pre-training and down-stream computer vision tasks such as COCO object detection than the counterpart dense model, indicating the readiness of Flex for end-to-end real-world model training and inference.

For agents

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

get_harvested_code_for_paper("2206.03382")
get_code_for_paper("2206.03382")
have("2206.03382")

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

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

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

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

Connect an agent — have() is free.