SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.03115 · ICLR · 2025

X-ALMA: Plug & Play Modules and Adaptive Rejection for Quality Translation at Scale

Haoran Xu, Philipp Koehn, Kenton Murray, Hieu Hoang, Akiko Eriguchi, Huda Khayrallah

arXiv · PDF · Open in the Atlas

Code that ran

3 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 0 failures of our instrument; 6 no recorded run), measured 2026-11-22; 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/2410.03115.json · badge: /api/ran/2410.03115.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
fe1ixxu/ALMA community
Papers with Code archive
3 ran · 6 no recorded run
FunctionStatusWhere it lives
LlamaMLP Ran
ran on a synthesized input · constructed an object; no result was computed
fe1ixxu/ALMA/modeling_xalma.py
code served (permissive licence) · get_code("22b14861d2a7046e")
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 an instance of its own class, LlamaMLP: the run constructed the object and did not call it, so no result was computed. 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 transformers.activations import ACT2FN

torch.manual_seed(0)

class Config:
    def __init__(self):
        self.hidden_size = 4
        self.intermediate_size = 8
        self.mlp_bias = True
        self.hidden_act = 'silu'
        self.pretraining_tp = 1

config = Config()

ARGS = {
    'config': config
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LlamaMLP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LlamaMLP 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
LlamaPreTrainedModel Ran
ran on a synthesized input · constructed an object; no result was computed
fe1ixxu/ALMA/modeling_xalma.py
code served (permissive licence) · get_code("92b63c7c724b0ad8")
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 an instance of its own class, LlamaPreTrainedModel: the run constructed the object and did not call it, so no result was computed. 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 transformers.models.llama.configuration_llama import LlamaConfig

torch.manual_seed(0)

# Create a minimal LlamaConfig
config = LlamaConfig(
    vocab_size=100,
    hidden_size=64,
    num_hidden_layers=2,
    num_attention_heads=4,
    intermediate_size=128,
    max_position_embeddings=512,
    initializer_range=0.02,
)

# Since LlamaPreTrainedModel is a PreTrainedModel subclass,
# it doesn't take positional arguments in __init__.
# It only needs 'config' passed during initialization.

ARGS = {
    'config': config,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LlamaPreTrainedModel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LlamaPreTrainedModel 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
LlamaRotaryEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
fe1ixxu/ALMA/modeling_xalma.py
code served (permissive licence) · get_code("18df0f479941cc0b")
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 an instance of its own class, LlamaRotaryEmbedding: the run constructed the object and did not call it, so no result was computed. 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 transformers.models.llama.configuration_llama import LlamaConfig

torch.manual_seed(0)

# Create a minimal LlamaConfig
config = LlamaConfig(
    hidden_size=64,
    num_hidden_layers=2,
    vocab_size=1000,
    max_position_embeddings=2048,
    rope_scaling=None
)

# Create arguments for LlamaRotaryEmbedding
ARGS = {
    "dim": 64,
    "max_position_embeddings": 2048,
    "base": 10000,
    "device": None,
    "scaling_factor": 1.0,
    "rope_type": "default",
    "config": config
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LlamaRotaryEmbedding — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a LlamaRotaryEmbedding 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
LlamaAttention Not yet run
unverified (harvested, no recorded run)
fe1ixxu/ALMA/modeling_xalma.py
code served (permissive licence) · get_code("2f90acc30c03054d")
How it ran

no invocation recorded.

LlamaDecoderLayer Not yet run
unverified (harvested, no recorded run)
fe1ixxu/ALMA/modeling_xalma.py
code served (permissive licence) · get_code("189228f2bd4c1774")
How it ran

no invocation recorded.

LlamaFlashAttention2 Not yet run
unverified (harvested, no recorded run)
fe1ixxu/ALMA/modeling_xalma.py
code served (permissive licence) · get_code("029efe060793a0cf")
How it ran

no invocation recorded.

LlamaModel Not yet run
unverified (harvested, no recorded run)
fe1ixxu/ALMA/modeling_xalma.py
code served (permissive licence) · get_code("6110e1e09650f061")
How it ran

no invocation recorded.

LlamaSdpaAttention Not yet run
unverified (harvested, no recorded run)
fe1ixxu/ALMA/modeling_xalma.py
code served (permissive licence) · get_code("29dde771bf07eb36")
How it ran

no invocation recorded.

XALMAForCausalLM Not yet run
unverified (harvested, no recorded run)
fe1ixxu/ALMA/modeling_xalma.py
code served (permissive licence) · get_code("0954d169fb129d21")
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, 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 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
LlamaPreTrainedModel
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
2402.14905 (2024-02)
MobileLLM: Optimizing Sub-billion Parameter Language Models for On-Device Use Cases
2502.13533 (2025-02)
Train Small, Infer Large: Memory-Efficient LoRA Training for Large 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-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 achieved remarkable success across various NLP tasks with a focus on English due to English-centric pre-training and limited multilingual data. In this work, we focus on the problem of translation, and while some multilingual LLMs claim to support for hundreds of languages, models often fail to provide high-quality responses for mid-and low-resource languages, leading to imbalanced performance heavily skewed in favor of highresource languages. We introduce X-ALMA, a model designed to ensure toptier performance across 50 diverse languages, regardless of their resource levels. X-ALMA surpasses state-of-the-art open-source multilingual LLMs, such as Aya-101 ( Üstün et al., 2024) and Aya-23 (Aryabumi et al., 2024), in every single translation direction on the FLORES-200 and WMT'23 test datasets according to COMET-22. This is achieved by plug-and-play language-specific module architecture to prevent language conflicts during training and a carefully designed training regimen with novel optimization methods to maximize the translation performance. After the final stage of training regimen, our proposed Adaptive-Rejection Preference Optimization (ARPO) surpasses existing preference optimization methods in translation tasks. 1 ‡ Work done at Microsoft. 1 Code is released at https://github.com/fe1ixxu/ALMA. Models and Dataset are released at https://huggingface/X-ALMA.

For agents

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

get_harvested_code_for_paper("2410.03115")
get_code_for_paper("2410.03115")
have("2410.03115")

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

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

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

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

Connect an agent — have() is free.