SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2024.findings-emnlp.221 · EMNLP Findings · 2024

Med-MoE: Mixture of Domain-Specific Experts for Lightweight Medical Vision-Language Models

Li Yuan, Yan Zhang, Zuozhu Liu, Songtao Jiang, Tuo Zheng, Yeying Jin

Open in the Atlas

Code that ran

8 of 20 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 3 have no contract verdict; 4 failures of our instrument; 12 no recorded run), measured 2026-11-24; 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/2024.findings-emnlp.221.json · badge: /api/ran/2024.findings-emnlp.221.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
jiangsongtao/Med-MoE canonical (classifier label)
classifier basis: census
8 ran · 12 no recorded run
FunctionStatusWhere it lives
MoELlamaDecoderLayer_forward Ran
ran on a synthesized input
jiangsongtao/Med-MoE/moellava/model/language_model/llava_llama_moe.py
code served (permissive licence) · get_code("e1ddbcb53218bca5")
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 function. 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
import torch.nn as nn
from typing import Optional, Tuple

torch.manual_seed(0)

# Build minimal mock components that the forward function uses
class MockLayerNorm(nn.Module):
    def __init__(self, hidden_size):
        super().__init__()
        self.weight = nn.Parameter(torch.ones(hidden_size))
        self.bias = nn.Parameter(torch.zeros(hidden_size))
    
    def forward(self, x):
        return x * self.weight + self.bias

class MockSelfAttention(nn.Module):
    def __init__(self, hidden_size):
        super().__init__()
        self.hidden_size = hidden_size
    
    def forward(self, hidden_states, attention_mask=None, position_ids=None, 
                past_key_value=None, output_attentions=False, use_cache=False):
        batch_size, seq_len, hidden_size = hidden_states.shape
        self_attn_weights = torch.randn(batch_size, 1, seq_len, seq_len) if output_attentions else None
        present_key_value = (torch.randn(batch_size, 1, seq_len, hidden_size),
                            torch.randn(batch_size, 1, seq_len, hidden_size)) if use_cache else None
        return hidden_states, self_attn_weights, present_key_value

class MockMLP(nn.Module):
    def __init__(self, hidden_size, return_moe_loss=False):
        super().__init__()
        self.hidden_size = hidden_size
        self.return_moe_loss = return_moe_loss
    
    def forward(self, hidden_states):
        output = torch.randn_like(hidden_states)
        if self.return_moe_loss:
            moe_loss = torch.tensor(0.1)
            return (output, moe_loss)
        return output

class MockMoELlamaDecoderLayer(nn.Module):
    def __init__(self, hidden_size=4):
        super().__init__()
        self.input_layernorm = MockLayerNorm(hidden_size)
        self.self_attn = MockSelfAttention(hidden_size)
        self.post_attention_layernorm = MockLayerNorm(hidden_size)
        self.mlp = MockMLP(hidden_size, return_moe_loss=True)

# Create the layer instance
layer = MockMoELlamaDecoderLayer(hidden_size=4)

# Create test inputs
batch_size = 2
seq_len = 3
hidden_size = 4

hidden_states = torch.randn(batch_size, seq_len, hidden_size)
attention_mask = torch.ones(batch_size, 1, seq_len, seq_len)
position_ids = torch.arange(seq_len).unsqueeze(0).expand(batch_size, -1)
past_key_value = None
output_attentions = True
use_cache = True
padding_mask = None

ARGS = {
    "self": layer,
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
MoEMiniCPMDecoderLayer_forward Ran
ran on a synthesized input
jiangsongtao/Med-MoE/moellava/model/language_model/llava_minicpm_moe.py
code served (permissive licence) · get_code("fa8801310651c9e1")
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 function. 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
import torch.nn as nn
import math

torch.manual_seed(0)

# Build minimal self-attention module
class MockSelfAttention(nn.Module):
    def __init__(self, hidden_size):
        super().__init__()
        self.hidden_size = hidden_size
    
    def forward(self, hidden_states, attention_mask=None, position_ids=None, 
                past_key_value=None, output_attentions=False, use_cache=False, **kwargs):
        batch_size, seq_len, _ = hidden_states.shape
        attn_weights = None
        if output_attentions:
            attn_weights = torch.randn(batch_size, 1, seq_len, seq_len)
        present_key_value = None
        if use_cache:
            present_key_value = (torch.randn(batch_size, 1, seq_len, self.hidden_size),
                                torch.randn(batch_size, 1, seq_len, self.hidden_size))
        return hidden_states, attn_weights, present_key_value

# Build minimal MLP that can optionally return (output, moe_loss)
class MockMLP(nn.Module):
    def __init__(self, hidden_size, return_moe_loss=True):
        super().__init__()
        self.hidden_size = hidden_size
        self.return_moe_loss = return_moe_loss
    
    def forward(self, hidden_states):
        output = torch.randn_like(hidden_states)
        if self.return_moe_loss:
            moe_loss = torch.tensor(0.1)
            return (output, moe_loss)
        return output

# Build the decoder layer
class MockMoEMiniCPMDecoderLayer(nn.Module):
    def __init__(self, hidden_size, num_hidden_layers, scale_depth):
        super().__init__()
        self.hidden_size = hidden_size
        self.num_hidden_layers = num_hidden_layers
        self.scale_depth = scale_depth
        self.input_layernorm = nn.LayerNorm(hidden_size)
        self.post_attention_layernorm = nn.LayerNorm(hidden_size)
        self.self_attn = MockSelfAttention(hidden_size)
        self.mlp = MockMLP(hidden_size, return_moe_loss=True)

# Instantiate the layer
hidden_size = 4
num_hidden_layers = 2
scale_depth = 1.0

layer = MockMoEMiniCPMDecoderLayer(hidden_size, num_hidden_layers, scale_depth)

# Create input tensors
batch_size = 2
seq_len = 3
hidden_states = torch.randn(batch_size, seq_len, hidden_size)
attention_mask = torch.ones(batch_size, 1, seq_len, seq_len)
position_ids = torch.arange(seq_len).unsqueeze(0).expand(batch_size, -1)

# Import the function and get the forward method
from typing import Optional, Tuple
def MoEMiniCPMDecoderLayer_forward(self):
    def forward(hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor]=None, position_ids: Optional[torch.LongTensor]=None, past_key_value: Optional[Tuple[torch.Tensor]]=None, output_attentions: Optional[bool]=False, use_cache: Optional[bool]=False, **kwargs) -> Tuple[torch.FloatTensor, Optional[Tuple[torch.FloatTensor, torch.FloatTensor]]]:
        import warnings
        if 'padding_mask' in kwargs:
            warnings.warn('Passing `padding_mask` is deprecated and will be removed in v4.37. Please make sure use `attention_mask` instead.`')
        residual = hidden_states
        hidden_states = self.input_layernorm(hidden_states)
        hidden_states, self_attn_weights, present_key_value = self.self_attn(hidden_states=hidden_states, attention_mask=attention_mask, position_ids=position_ids, past_key_value=past_key_value, output_attentions=output_attentions, use_cache=use_cache, **kwargs)
        hidden_states = residual + hidden_states * (self.scale_depth / math.sqrt(self.num_hidden_layers))
        residual = hidden_states
        hidden_states = self.post_attention_layernorm(hidden_states)
        hidden_states = self.mlp(hidden_states)
        moe_losses = []
        if len(hidden_states) == 3:
            moe_losses.append(hidden_states[1])
            hidden_states = hidden_states[0]
        hidden_states = residual + hidden_states * (self.scale_depth / math.sqrt(self.num_hidden_layers))
        outputs = (hidden_states,)
        if output_attentions:
            outputs += (self_attn_weights,)
        if use_cache:
            outputs += (present_key_value,)
        outputs += (moe_losses,)
        return outputs
    return forward

# Bind the forward method to the layer
layer.forward = MoEMiniCPMDecoderLayer_forward(layer)

ARGS = {
    'self': layer,
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
MoEQwen1_5DecoderLayer_forward Ran
ran on a synthesized input
jiangsongtao/Med-MoE/moellava/model/language_model/llava_qwen1_5_moe.py
code served (permissive licence) · get_code("15e340a0eb2ddf55")
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 function. 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
import torch.nn as nn
from typing import Optional, Tuple

torch.manual_seed(0)

class MockAttention(nn.Module):
    def __init__(self, hidden_size):
        super().__init__()
        self.hidden_size = hidden_size
    
    def forward(self, hidden_states, attention_mask=None, position_ids=None, 
                past_key_value=None, output_attentions=False, use_cache=False):
        batch_size, seq_len, _ = hidden_states.shape
        self_attn_weights = torch.randn(batch_size, 8, seq_len, seq_len) if output_attentions else None
        present_key_value = (torch.randn(batch_size, 8, seq_len, 4), 
                            torch.randn(batch_size, 8, seq_len, 4)) if use_cache else None
        output = hidden_states
        return output, self_attn_weights, present_key_value

class MockMLP(nn.Module):
    def __init__(self, hidden_size):
        super().__init__()
        self.hidden_size = hidden_size
    
    def forward(self, hidden_states):
        return hidden_states

class MockMoEMLP(nn.Module):
    def __init__(self, hidden_size):
        super().__init__()
        self.hidden_size = hidden_size
    
    def forward(self, hidden_states):
        return (hidden_states, torch.tensor(0.1))

class MoEQwen1_5DecoderLayer(nn.Module):
    def __init__(self, hidden_size=4):
        super().__init__()
        self.input_layernorm = nn.LayerNorm(hidden_size)
        self.self_attn = MockAttention(hidden_size)
        self.post_attention_layernorm = nn.LayerNorm(hidden_size)
        self.mlp = MockMoEMLP(hidden_size)

batch_size = 2
seq_len = 3
hidden_size = 4

layer = MoEQwen1_5DecoderLayer(hidden_size=hidden_size)

hidden_states = torch.randn(batch_size, seq_len, hidden_size)
attention_mask = torch.ones(batch_size, seq_len)
position_ids = torch.arange(seq_len, dtype=torch.long).unsqueeze(0).expand(batch_size, -1)
past_key_value = None
output_attentions = True
use_cache = True
padding_mask = None

ARGS = {
    "self": layer,
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
einsum Ran
ran; our contract draft was wrong, not the code
jiangsongtao/Med-MoE/moe/sharded_moe.py
code served (permissive licence) · get_code("97286a837fefce75")
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

torch.manual_seed(0)

# Test with rule 's,se->se'
# a should be shape (s,) and b should be shape (s, e)
s = 2
e = 4

a = torch.randn(s)
b = torch.randn(s, e)

ARGS = {
    'rule': 's,se->se',
    'a': a,
    'b': b
}
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 (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
get_chunk Ran
ran; our contract draft was wrong, not the code
jiangsongtao/Med-MoE/model_vqa_med.py
code served (permissive licence) · get_code("42a46570620cd9fa")
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) and returned list, ndim 1, dtype family int; 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 math

def split_list(lst, n):
    """Split a list into n (roughly) equal-sized chunks"""
    chunk_size = math.ceil(len(lst) / n)
    return [lst[i:i + chunk_size] for i in range(0, len(lst), chunk_size)]

def get_chunk(lst, n, k):
    chunks = split_list(lst, n)
    return chunks[k]

# Setup code
lst = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
n = 3
k = 1

ARGS = {
    "lst": lst,
    "n": n,
    "k": k
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 list, ndim 1, dtype family int — 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
is_moe_param Ran
ran, violated the contract we drafted
jiangsongtao/Med-MoE/moe/utils.py
code served (permissive licence) · get_code("dee86097e6631190")
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)

# Create a tensor with allreduce attribute set to False
param = torch.randn(2, 4)
param.allreduce = False

ARGS = {
    "param": param
}
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
split_list Ran
ran; our contract draft was wrong, not the code
jiangsongtao/Med-MoE/model_vqa_med.py
code served (permissive licence) · get_code("076c252c52cbb161")
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) and returned list. 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 math

def split_list(lst, n):
    """Split a list into n (roughly) equal-sized chunks"""
    chunk_size = math.ceil(len(lst) / n)
    return [lst[i:i + chunk_size] for i in range(0, len(lst), chunk_size)]

# Setup code
lst = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
n = 3

ARGS = {
    "lst": lst,
    "n": n
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 list — a list 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
split_params_into_shared_and_expert_params Ran
ran; our contract draft was wrong, not the code
jiangsongtao/Med-MoE/moe/utils.py
code served (permissive licence) · get_code("593d61d6861a857f")
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
import torch.nn as nn

torch.manual_seed(0)

# Create a list of parameters
# Some will be regular parameters, some will have allreduce=False (moe params)
params = []

# Create a regular parameter (shared)
param1 = nn.Parameter(torch.randn(2, 4))
params.append(param1)

# Create an expert parameter by setting allreduce=False
param2 = nn.Parameter(torch.randn(3, 4))
param2.allreduce = False
params.append(param2)

# Create another regular parameter (shared)
param3 = nn.Parameter(torch.randn(2, 4))
params.append(param3)

# Create another expert parameter
param4 = nn.Parameter(torch.randn(5, 4))
param4.allreduce = False
params.append(param4)

ARGS = {
    "params": params
}
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
MoELlamaModel_forward Not yet run
unverified (harvested, no recorded run)
jiangsongtao/Med-MoE/moellava/model/language_model/llava_llama_moe.py
code served (permissive licence) · get_code("ea5a837117cbc108")
How it ran

no invocation recorded.

MoEMiniCPMModel_forward Not yet run
unverified (harvested, no recorded run)
jiangsongtao/Med-MoE/moellava/model/language_model/llava_minicpm_moe.py
code served (permissive licence) · get_code("2dd7035083ebd746")
How it ran

no invocation recorded.

MoEMistralDecoderLayer_forward Not yet run
unverified (harvested, no recorded run)
jiangsongtao/Med-MoE/moellava/model/language_model/llava_mistral_moe.py
code served (permissive licence) · get_code("23374f774ccd816e")
How it ran

no invocation recorded.

MoEMistralModel_forward Not yet run
unverified (harvested, no recorded run)
jiangsongtao/Med-MoE/moellava/model/language_model/llava_mistral_moe.py
code served (permissive licence) · get_code("b9973d7b9463a950")
How it ran

no invocation recorded.

MoEPhiDecoderLayer_forward Not yet run
unverified (harvested, no recorded run)
jiangsongtao/Med-MoE/moellava/model/language_model/llava_phi_moe.py
code served (permissive licence) · get_code("39d607f946329bf0")
How it ran

no invocation recorded.

MoEPhiModel_forward Not yet run
unverified (harvested, no recorded run)
jiangsongtao/Med-MoE/moellava/model/language_model/llava_phi_moe.py
code served (permissive licence) · get_code("a99c749ee7048e1e")
How it ran

no invocation recorded.

MoEQWenBlock_forward Not yet run
unverified (harvested, no recorded run)
jiangsongtao/Med-MoE/moellava/model/language_model/llava_qwen_moe.py
code served (permissive licence) · get_code("05fcb2f70ea89caf")
How it ran

no invocation recorded.

MoEQWenModel_forward Not yet run
unverified (harvested, no recorded run)
jiangsongtao/Med-MoE/moellava/model/language_model/llava_qwen_moe.py
code served (permissive licence) · get_code("a0b5b1bf7d581d23")
How it ran

no invocation recorded.

MoEQwen1_5Model_forward Not yet run
unverified (harvested, no recorded run)
jiangsongtao/Med-MoE/moellava/model/language_model/llava_qwen1_5_moe.py
code served (permissive licence) · get_code("dd5a3d298e9b69e3")
How it ran

no invocation recorded.

gumbel_rsample Not yet run
unverified (harvested, no recorded run)
jiangsongtao/Med-MoE/moe/sharded_moe.py
code served (permissive licence) · get_code("3b6fa807ed00b1da")
How it ran

no invocation recorded.

has_moe_layers Not yet run
unverified (harvested, no recorded run)
jiangsongtao/Med-MoE/moe/utils.py
code served (permissive licence) · get_code("d327fe6cbd808182")
How it ran

no invocation recorded.

multiplicative_jitter Not yet run
unverified (harvested, no recorded run)
jiangsongtao/Med-MoE/moe/sharded_moe.py
code served (permissive licence) · get_code("765e66c4d56297b6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 distinct functions with an identity, 12 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 8 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
split_list 197 other papers
22 dated earlier, 46 later, 128 same year, order not determinable, 1 undated
2112.05682 (2021-12)
Self-attention Does Not Need $O(n^2)$ Memory
2306.17107 (2023-06)
LLaVAR: Enhanced Visual Instruction Tuning for Text-Rich Image Understanding
2307.10490 (2023-07)
Abusing Images and Sounds for Indirect Instruction Injection in Multi-Modal LLMs
and 194 more not named here
get_chunk 189 other papers
21 dated earlier, 44 later, 124 same year, order not determinable
2112.05682 (2021-12)
Self-attention Does Not Need $O(n^2)$ Memory
2306.17107 (2023-06)
LLaVAR: Enhanced Visual Instruction Tuning for Text-Rich Image Understanding
2307.10490 (2023-07)
Abusing Images and Sounds for Indirect Instruction Injection in Multi-Modal LLMs
and 186 more not named here
MoEMiniCPMDecoderLayer_forward 1 other paper
1 same year, order not determinable
2408.15881 (2024-08)
LLaVA-MoD: Making LLaVA Tiny via MoE Knowledge Distillation
MoEMiniCPMModel_forward 1 other paper
1 same year, order not determinable
2408.15881 (2024-08)
LLaVA-MoD: Making LLaVA Tiny via MoE Knowledge Distillation
MoEMistralDecoderLayer_forward 1 other paper
1 same year, order not determinable
2408.15881 (2024-08)
LLaVA-MoD: Making LLaVA Tiny via MoE Knowledge Distillation
MoEMistralModel_forward 1 other paper
1 same year, order not determinable
2408.15881 (2024-08)
LLaVA-MoD: Making LLaVA Tiny via MoE Knowledge Distillation
einsum 1 other paper
1 same year, order not determinable
2404.10237 (2024-04)
Med-MoE: Mixture of Domain-Specific Experts for Lightweight Medical Vision-Language Models
gumbel_rsample 1 other paper
1 same year, order not determinable
2404.10237 (2024-04)
Med-MoE: Mixture of Domain-Specific Experts for Lightweight Medical Vision-Language Models
has_moe_layers 1 other paper
1 same year, order not determinable
2404.10237 (2024-04)
Med-MoE: Mixture of Domain-Specific Experts for Lightweight Medical Vision-Language Models
is_moe_param 1 other paper
1 same year, order not determinable
2404.10237 (2024-04)
Med-MoE: Mixture of Domain-Specific Experts for Lightweight Medical Vision-Language Models
multiplicative_jitter 1 other paper
1 same year, order not determinable
2404.10237 (2024-04)
Med-MoE: Mixture of Domain-Specific Experts for Lightweight Medical Vision-Language Models
split_params_into_shared_and_expert_params 1 other paper
1 same year, order not determinable
2404.10237 (2024-04)
Med-MoE: Mixture of Domain-Specific Experts for Lightweight Medical Vision-Language Models

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-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Recent advancements in general-purpose or domain-specific multimodal large language models (LLMs) have witnessed remarkable progress for medical decision-making. However, they are designated for specific classification or generative tasks, and require model training or finetuning on large-scale datasets with sizeable parameters and tremendous computing, hindering their clinical utility across diverse resource-constrained scenarios in practice. In this paper, we propose a novel and lightweight framework Med-MoE (Mixture-of-Experts) that tackles both discriminative and generative multimodal medical tasks. The learning of Med-MoE consists of three steps: multimodal medical alignment, instruction tuning and routing, and domain-specific MoE tuning. After aligning multimodal medical images with LLM tokens, we then enable the model for different multimodal medical tasks with instruction tuning, together with a trainable router tailored for expert selection across input modalities. Finally, the model is tuned by integrating the router with multiple domain-specific experts, which are selectively activated and further empowered by meta expert. Comprehensive experiments on both open-and close-end medical question answering (Med-VQA) and image classification tasks across datasets such as VQA-RAD, SLAKE and Path-VQA demonstrate that our model can achieve performance superior to or on par with state-of-the-art baselines, while only requiring approximately 30%-50% of activated model parameters. Extensive analysis and ablations corroborate the effectiveness and practical utility of our method. Our code is released at https://github.com/jiangsongtao/Med-MoE.

For agents

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

get_harvested_code_for_paper("2024.findings-emnlp.221")
get_code_for_paper("2024.findings-emnlp.221")
have("2024.findings-emnlp.221")

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

curl https://syntology.ai/api/ran/2024.findings-emnlp.221.json

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

[![Syntology run record](https://syntology.ai/api/ran/2024.findings-emnlp.221.svg)](https://syntology.ai/paper/2024.findings-emnlp.221)

Connect an agent — have() is free.