SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.06487 · 2022

Adapting Pre-trained Language Models to African Languages via Multilingual Adaptive Fine-Tuning

arXiv · PDF · Open in the Atlas

Code that ran

3 of 5 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, 0 violated it and 3 have no contract verdict; 0 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/2204.06487.json · badge: /api/ran/2204.06487.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
uds-lsv/afro-maft canonical (classifier label)
classifier basis not recorded on the link
3 ran · 2 no recorded run
FunctionStatusWhere it lives
create_logger Ran
ran on a synthesized input
uds-lsv/afro-maft/ClassificationTasks/src/utils.py
code served (permissive licence) · get_code("a420c4a9e826c5d9")
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
import tempfile
import os

# Create a temporary file for logging
temp_dir = tempfile.gettempdir()
log_file = os.path.join(temp_dir, "test_logger.log")

ARGS = {
    "log_file": log_file,
    "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
load_config Ran
ran on a synthesized input
uds-lsv/afro-maft/ClassificationTasks/src/utils.py
code served (permissive licence) · get_code("d7e5168716c4af27")
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 tempfile
import yaml
import os

# Create a temporary YAML configuration file
temp_dir = tempfile.mkdtemp()
config_file = os.path.join(temp_dir, "test_config.yaml")

# Write a valid YAML configuration
config_data = {
    "model": {
        "name": "test_model",
        "layers": 3,
        "hidden_dim": 128
    },
    "training": {
        "batch_size": 32,
        "learning_rate": 0.001,
        "epochs": 10
    },
    "data": {
        "path": "/data/dataset",
        "split": 0.8
    }
}

with open(config_file, 'w') as f:
    yaml.dump(config_data, f)

ARGS = {
    "filename": config_file
}
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 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
read_examples_from_file Ran
ran on a synthesized input
uds-lsv/afro-maft/ClassificationTasks/ner_scripts/ner_utils.py
code served (permissive licence) · get_code("769dac1988426fd6")
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 tempfile
import shutil

# Create a temporary directory for test data
temp_dir = tempfile.mkdtemp()

# Create a sample training file
train_file_path = os.path.join(temp_dir, 'train.txt')
with open(train_file_path, 'w', encoding='utf-8') as f:
    f.write("The B-PER\n")
    f.write("quick O\n")
    f.write("brown O\n")
    f.write("\n")
    f.write("John B-PER\n")
    f.write("ran O\n")
    f.write("\n")

# Create a sample test file
test_file_path = os.path.join(temp_dir, 'test.txt')
with open(test_file_path, 'w', encoding='utf-8') as f:
    f.write("Alice B-PER\n")
    f.write("walks O\n")
    f.write("\n")

ARGS = {
    'data_dir': temp_dir,
    'mode': 'train'
}
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 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
convert_examples_to_features Not yet run
unverified (harvested, no recorded run)
uds-lsv/afro-maft/ClassificationTasks/ner_scripts/ner_utils.py
code served (permissive licence) · get_code("816daacf29aeb254")
How it ran

no invocation recorded.

get_labels Not yet run
unverified (harvested, no recorded run)
uds-lsv/afro-maft/ClassificationTasks/ner_scripts/ner_utils.py
code served (permissive licence) · get_code("cdfcc953235fc5ca")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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 4 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
convert_examples_to_features 2 other papers
1 dated earlier, 1 later
2103.11811 (2021-03)
MasakhaNER: Named Entity Recognition for African Languages
2304.03952 (2023-04)
AfricaNLP workshop at ICLR2023 MPHAYANER: NAMED ENTITY RECOGNITION FOR TSHIVEND ˆA

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

Multilingual pre-trained language models (PLMs) have demonstrated impressive performance on several downstream tasks for both high-resourced and low-resourced languages. However, there is still a large performance drop for languages unseen during pre-training, especially African languages. One of the most effective approaches to adapt to a new language is \textit{language adaptive fine-tuning} (LAFT) -- fine-tuning a multilingual PLM on monolingual texts of a language using the pre-training objective. However, adapting to a target language individually takes a large disk space and limits the cross-lingual transfer abilities of the resulting models because they have been specialized for a single language. In this paper, we perform \textit{multilingual adaptive fine-tuning} on 17 most-resourced African languages and three other high-resource languages widely spoken on the African continent to encourage cross-lingual transfer learning. To further specialize the multilingual PLM, we removed vocabulary tokens from the embedding layer that corresponds to non-African writing scripts before MAFT, thus reducing the model size by around 50%. Our evaluation on two multilingual PLMs (AfriBERTa and XLM-R) and three NLP tasks (NER, news topic classification, and sentiment classification) shows that our approach is competitive to applying LAFT on individual languages while requiring significantly less disk space. Additionally, we show that our adapted PLM also improves the zero-shot cross-lingual transfer abilities of parameter efficient fine-tuning methods.

For agents

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

get_harvested_code_for_paper("2204.06487")
get_code_for_paper("2204.06487")
have("2204.06487")

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

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

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

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

Connect an agent — have() is free.