SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.11477 · 2024

How Can We Effectively Expand the Vocabulary of LLMs with 0.01GB of Target Language Text?

arXiv · PDF · Open in the Atlas

Code that ran

10 of 12 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, 2 violated it and 0 have no contract verdict; 7 failures of our instrument; 2 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/2406.11477.json · badge: /api/ran/2406.11477.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
gucci-j/lowres-cva canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
gucci-j/lowres-cve canonical (classifier label)
classifier basis: census
1 ran · 0 no recorded run
FunctionStatusWhere it lives
create_mapping_dict Ran
ran; our contract draft was wrong, not the code
gucci-j/lowres-cva/instantiation/src/core/align_init.py
code served (permissive licence) · get_code("4eaffb969c834cfd")
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 dict. 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)

# dict1 and dict2 have 'input_ids' and 'offset_mapping' keys
# The function iterates through offset_mapping and input_ids by index
# offset_mapping contains (start, end) tuples
# The function compares these ranges to find overlaps

dict1 = {
    'input_ids': [101, 2054, 2003, 102],
    'offset_mapping': [(0, 0), (0, 4), (5, 9), (10, 10)]
}

dict2 = {
    'input_ids': [201, 2054, 2003, 202],
    'offset_mapping': [(0, 0), (0, 4), (5, 9), (10, 10)]
}

ARGS = {
    'dict1': dict1,
    'dict2': dict2
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
filter_fn Ran
ran, violated the contract we drafted
gucci-j/lowres-cva/preprocessing/src/train_fasttext.py
code served (permissive licence) · get_code("cfba8ed4574f17f5")
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

# Construct a valid example dict with 'text' key
example = {
    'text': 'This is a sample text with multiple words'
}

# Define ARGS mapping all parameters
ARGS = {
    'example': example,
    'min_length': 5,
    'target_lang': 'sw'
}
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
filter_fn Ran
ran, violated the contract we drafted
gucci-j/lowres-cve/preprocessing/src/train_fasttext.py
code served (permissive licence) · get_code("5b144fd329d608c3")
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

# Construct a valid example dict that the function expects
example = {
    'text': 'hello world this is a test'
}

# Define ARGS dict with all parameters
ARGS = {
    'example': example,
    'min_length': 5,
    'target_lang': 'sw'
}
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
generate_yaml Ran
ran; our contract draft was wrong, not the code
gucci-j/lowres-cva/eval/src/generate_yml.py
code served (permissive licence) · get_code("922fb3fe47d60fd8")
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
import yaml
from pathlib import Path
import tempfile

# Create temporary directories to act as paths
temp_dir_adapter = tempfile.mkdtemp()
temp_dir_base = tempfile.mkdtemp()

adapter_path = temp_dir_adapter
base_path = temp_dir_base

ARGS = {
    'adapter_path': adapter_path,
    'base_path': base_path,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, yaml — 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
group_texts Ran
ran; our contract draft was wrong, not the code
gucci-j/lowres-cva/preprocessing/src/main_lapt.py
code served (permissive licence) · get_code("0643ee8d0cd584bc")
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 dict. 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)

# Construct valid arguments for group_texts function
# The function expects:
# - examples: dict with keys mapping to lists of lists (token sequences)
# - block_size: int for the target block size
# - eos_id: int for end-of-sequence token id

# Create sample examples dict with token sequences
examples = {
    'input_ids': [
        [101, 2054, 2003],  # first sequence
        [1045, 2572, 2572]  # second sequence
    ],
    'attention_mask': [
        [1, 1, 1],
        [1, 1, 1]
    ]
}

ARGS = {
    'examples': examples,
    'block_size': 128,
    'eos_id': 2
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
restructure_data Ran
ran; our contract draft was wrong, not the code
gucci-j/lowres-cva/eval/src/convert_greeksum_into_hf_datasets.py
code served (permissive licence) · get_code("033921f119e7d425")
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 dict. 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

# Analyze the function: restructure_data takes:
# 1. data: dict - needs 'url', 'title', 'abstract', 'article' keys
# 2. file_name: str - needs to contain '.json' to split on

data = {
    'url': 'https://example.com/article',
    'title': 'Sample Article Title',
    'abstract': 'This is a summary of the article.',
    'article': 'This is the full text of the article with more details.'
}

file_name = 'sample_document.json'

ARGS = {
    'data': data,
    'file_name': file_name
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
restructure_data Ran
ran; our contract draft was wrong, not the code
gucci-j/lowres-cva/eval/src/create_hf_nli_datasets.py
code served (permissive licence) · get_code("8cd912324b707626")
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 dict. 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 numpy as np

# Define test data for Japanese case
ja_data = {
    'sentence_pair_id': 'ja_pair_1',
    'sentence1': 'これはテストです',
    'sentence2': 'これはサンプルです',
    'label': 1
}

# Define test data for non-Japanese case
en_data = {
    'premise': 'This is a test',
    'hypothesis': 'This is a sample',
    'label': 0
}

# Test with Japanese language code
ARGS = {
    'data': ja_data,
    'lang_code': 'ja',
    'sample_id': 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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
restructure_data Ran
ran; our contract draft was wrong, not the code
gucci-j/lowres-cva/eval/src/create_hf_span_datasets.py
code served (permissive licence) · get_code("493e6cb5c20a5002")
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 dict. 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 numpy as np

torch.manual_seed(0)

# Construct a valid dict argument for restructure_data
data = {
    'id': 'doc_001',
    'context': 'The quick brown fox jumps over the lazy dog. This is a sample context for a question answering task.',
    'question': 'What does the fox jump over?',
    'answers': {
        'text': ['the lazy dog', 'lazy dog'],
        'answer_start': [26, 30]
    }
}

ARGS = {
    'data': data
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
restructure_data Ran
ran; our contract draft was wrong, not the code
gucci-j/lowres-cva/eval/src/create_hf_sum_datasets.py
code served (permissive licence) · get_code("aa6c63022da0881b")
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 dict. 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)

# Test case 1: German language data
data_de = {
    'gem_id': 'doc_001',
    'url': 'https://example.com/de',
    'title': 'Deutscher Titel',
    'target': 'Deutsche Zusammenfassung',
    'text': 'Deutscher Text'
}

# Test case 2: Non-German language data
data_en = {
    'id': 'doc_002',
    'url': 'https://example.com/en',
    'title': 'English Title',
    'summary': 'English Summary',
    'text': 'English Text'
}

# Define ARGS with German language code (uses the 'de' branch)
ARGS = {
    'data': data_de,
    'lang_code': 'de'
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
round_to_nearest_multiple Ran
ran, honoured the contract we drafted
gucci-j/lowres-cva/instantiation/src/core/align_init.py
code served (permissive licence) · get_code("cee6083e09139c9a")
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.

import math

def round_to_nearest_multiple(vocabulary_size, multiple):
    rounded_size = math.ceil(vocabulary_size / multiple) * multiple
    return rounded_size

ARGS = {
    "vocabulary_size": 1000,
    "multiple": 64
}
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
instantiate_model_by_align Not yet run
unverified (harvested, no recorded run)
gucci-j/lowres-cva/instantiation/src/core/align_init.py
code served (permissive licence) · get_code("2e24044afbae3ca2")
How it ran

no invocation recorded.

load_kenswquad Not yet run
unverified (harvested, no recorded run)
gucci-j/lowres-cva/eval/src/create_hf_span_datasets.py
code served (permissive licence) · get_code("fc5aa82c442a286e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 1 later) and 10 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
round_to_nearest_multiple 2 other papers
1 dated earlier, 1 later
2402.10712 (2024-02)
An Empirical Study on Cross-lingual Vocabulary Adaptation for Efficient Language Model Inference
2412.11704 (2024-12)
Adapting Chat Language Models Using Only Target Unlabeled Language Data
filter_fn 1 other paper
1 dated earlier
2402.10712 (2024-02)
An Empirical Study on Cross-lingual Vocabulary Adaptation for Efficient Language Model Inference

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 shown remarkable capabilities in many languages beyond English. Yet, LLMs require more inference steps when generating non-English text due to their reliance on English-centric tokenizers and vocabulary, resulting in higher usage costs to non-English speakers. Vocabulary expansion with target language tokens is a widely used cross-lingual vocabulary adaptation approach to remedy this issue. Despite its effectiveness in inference speedup, previous work on vocabulary expansion has focused on high-resource settings assuming access to a substantial amount of target language data to effectively initialize the embeddings of the new tokens and adapt the LLM to the target language. However, vocabulary expansion in low-resource settings has yet to be explored. In this article, we investigate vocabulary expansion in low-resource settings by considering embedding initialization methods and continual pre-training strategies. Through extensive experiments across typologically diverse languages, tasks and models, we establish a set of strategies to perform vocabulary expansion for faster inference, while striving to maintain competitive downstream performance to baselines. This is achieved with only 30K sentences ($\sim$0.01GB text data) from the target language.

For agents

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

get_harvested_code_for_paper("2406.11477")
get_code_for_paper("2406.11477")
have("2406.11477")

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

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

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

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

Connect an agent — have() is free.