SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.15793 · ICML · 2024

Language Adaptation on a Tight Academic Compute Budget: Tokenizer Swapping Works and Pure bfloat16 Is Enough

Gerard De Melo, Konstantin Dobler

arXiv · PDF · Open in the Atlas

Code that ran

13 of 19 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; 6 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 6 no recorded run), measured 2026-11-23; 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/2408.15793.json · badge: /api/ran/2408.15793.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
konstantinjdobler/tight-budget-llm-adaptation canonical (classifier label)
classifier basis: census
13 ran · 6 no recorded run
FunctionStatusWhere it lives
clean_name Ran
ran; our contract draft was wrong, not the code
konstantinjdobler/tight-budget-llm-adaptation/dlib/checkpointing.py
code served (permissive licence) · get_code("66d977e369c51487")
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

def clean_name(n):
    """Remove common wrapper prefixes from module names."""
    return n.replace('_forward_module.', '').replace('_original_module.', '').replace('_checkpoint_wrapped_module.', '').replace('_fsdp_wrapped_module.', '').replace('_orig_mod.', '')

# The function takes a single parameter 'n' which is a string (module name)
# It performs string replacements to remove common wrapper prefixes
# So we need to provide a string argument

ARGS = {
    'n': '_fsdp_wrapped_module._checkpoint_wrapped_module.linear.weight'
}
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 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
clean_name Ran
ran; our contract draft was wrong, not the code
konstantinjdobler/tight-budget-llm-adaptation/dlib/model_profiling.py
code served (permissive licence) · get_code("6918de657eafc50f")
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 torch.nn as nn

torch.manual_seed(0)

# The function clean_name takes a single string parameter 'n' and performs
# string replacements on it. It removes common wrapper prefixes.

ARGS = {
    'n': '_fsdp_wrapped_module._checkpoint_wrapped_module._original_module.linear_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 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
find_multiple Ran
ran, honoured the contract we drafted
konstantinjdobler/tight-budget-llm-adaptation/dlib/utils.py
code served (permissive licence) · get_code("b25892e03bf1cf0a")
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 torch
import numpy as np

# find_multiple takes two integers: n and k
# It returns the smallest multiple of k that is >= n
# The function uses basic integer arithmetic (%, +, -)

ARGS = {
    "n": 10,
    "k": 3,
}
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 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
flops_per_param Ran
ran, honoured the contract we drafted
konstantinjdobler/tight-budget-llm-adaptation/dlib/speed_monitor.py
code served (permissive licence) · get_code("76c1f0017f2562ed")
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 torch

torch.manual_seed(0)

ARGS = {
    "max_seq_length": 128,
    "num_layers": 12,
    "hidden_size": 768,
    "num_params": 110000000,
}
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 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
format_elapsed_time Ran
ran; our contract draft was wrong, not the code
konstantinjdobler/tight-budget-llm-adaptation/dlib/utils.py
code served (permissive licence) · get_code("5d606d4fab8d2be4")
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

torch.manual_seed(0)

# The function takes a single parameter: seconds (float)
# It formats elapsed time into a human-readable string based on the duration

ARGS = {
    'seconds': 5.432
}
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 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
get_lr_with_cosine_schedule Ran
ran, honoured the contract we drafted
konstantinjdobler/tight-budget-llm-adaptation/dlib/lr_schedules.py
code served (permissive licence) · get_code("f188d07e3a737f21")
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. 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 get_lr_with_cosine_schedule(it, learning_rate, warmup_period, lr_decay_period, min_lr):
    """
    Returns actual lr based on current iteration. Should be called every iteration.
    From lit-gpt: https://github.com/Lightning-AI/lit-gpt/blob/a21d46ae80f84c350ad871578d0348b470c83021/pretrain/redpajama.py#L301
    """
    if it < warmup_period:
        return learning_rate * it / warmup_period
    if it > lr_decay_period:
        return min_lr
    decay_ratio = (it - warmup_period) / (lr_decay_period - warmup_period)
    assert 0 <= decay_ratio <= 1
    coeff = 0.5 * (1.0 + math.cos(math.pi * decay_ratio))
    return min_lr + coeff * (learning_rate - min_lr)


ARGS = {
    "it": 500,
    "learning_rate": 0.001,
    "warmup_period": 100,
    "lr_decay_period": 1000,
    "min_lr": 0.00001,
}
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 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
get_max_seqlen_in_batch Ran
ran; our contract draft was wrong, not the code
konstantinjdobler/tight-budget-llm-adaptation/helpers/mokey_patch_fa_packing.py
code served (permissive licence) · get_code("d4a53ff33a6fcd12")
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 1, dtype family int, shape (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)

# The function expects an attention_mask tensor
# It finds max value, then counts occurrences of each value from 1 to max
# So we need a tensor with integer values where max value determines the loop count

# Create a small attention mask tensor with shape (batch_size, seq_len)
# Values should be integers from 0 to some max value
attention_mask = torch.tensor([
    [1, 2, 2, 0],
    [1, 1, 2, 2]
], dtype=torch.int64)

ARGS = {
    "attention_mask": attention_mask
}
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 1, dtype family int, shape (4,) — shape (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_optimizer Ran
ran; our contract draft was wrong, not the code
konstantinjdobler/tight-budget-llm-adaptation/dlib/get_optimizer.py
code served (permissive licence) · get_code("34c25d7be7a8152e")
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 AdamW. 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)

# Build a small model with trainable parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        # Parameters that should decay
        self.wte = nn.Embedding(10, 4)
        self.linear = nn.Linear(4, 3)
        
        # Parameters that should NOT decay
        self.lm_head = nn.Linear(3, 5)
        self.ln_f = nn.LayerNorm(3)
        
    def forward(self, x):
        x = self.wte(x)
        x = self.linear(x)
        x = self.lm_head(x)
        x = self.ln_f(x)
        return x

model = SimpleModel()

# Ensure all parameters are trainable
for param in model.parameters():
    param.requires_grad = True

ARGS = {
    'model': model,
    'lr': 1e-4,
    'weight_decay': 0.01,
    'betas': (0.9, 0.999),
    'foreach': True,
    'use_paged_adamw': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
bitsandbytes, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type AdamW — a AdamW output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AdamW 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
get_unpad_data Ran
ran; our contract draft was wrong, not the code
konstantinjdobler/tight-budget-llm-adaptation/helpers/mokey_patch_fa_packing.py
code served (permissive licence) · get_code("6167fdcdd4d5d961")
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.functional as F

torch.manual_seed(0)

# Create a small attention mask tensor
# The function expects attention_mask to have integer values where:
# - 0 represents padding
# - positive integers represent sequence lengths or positions
# We'll create a batch of 2 sequences with some padding

# attention_mask shape: (batch_size, seq_len)
# Values: 0 for padding, 1-3 for actual tokens
attention_mask = torch.tensor([
    [1, 2, 3, 0],
    [1, 2, 0, 0]
], dtype=torch.int64)

ARGS = {
    "attention_mask": attention_mask
}
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
hex2dec Ran
ran, honoured the contract we drafted
konstantinjdobler/tight-budget-llm-adaptation/helpers/smart_heuristics.py
code served (permissive licence) · get_code("74b4020b7c03984e")
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 torch

# The function hex2dec takes a hexadecimal string and converts it to decimal
# It only requires one parameter: hex_str, which should be a string

ARGS = {
    "hex_str": "1A"
}
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 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
log_model_stats_to_wandb Ran
ran, honoured the contract we drafted
konstantinjdobler/tight-budget-llm-adaptation/dlib/model_profiling.py
code served (permissive licence) · get_code("2e6b7b3694e81d06")
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. 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 torch.nn as nn
import torch.distributed as dist
from unittest.mock import MagicMock, patch
import wandb

torch.manual_seed(0)

# Mock wandb.run._log to avoid actual logging
wandb.run = MagicMock()
wandb.run._log = MagicMock()
wandb.Histogram = MagicMock()

# Create a minimal model with parameters and gradients
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.Linear(4, 3)
        self.layer2 = nn.Linear(3, 2)
    
    def forward(self, x):
        return self.layer2(torch.relu(self.layer1(x)))

model = SimpleModel()

# Add gradients to parameters by doing a forward/backward pass
x = torch.randn(2, 4)
y = torch.randn(2, 2)
loss = model(x).mean()
loss.backward()

# Mock distributed functions since we're running single-process
def mock_all_reduce(tensor, op=None):
    return tensor

def mock_reduce(tensor, dst=0, op=None):
    return tensor

def mock_is_initialized():
    return False

# Patch the distributed functions
with patch('torch.distributed.is_initialized', side_effect=mock_is_initialized):
    with patch('torch.distributed.all_reduce', side_effect=mock_all_reduce):
        with patch('torch.distributed.reduce', side_effect=mock_reduce):
            with patch('torch.distributed.get_rank', return_value=0):
                # This would be called, but we ensure it returns 0
                pass

ARGS = {
    'model': model,
    'log_weights': True,
    'log_grads': True,
    'rank': 0,
    'sharded_grads': False,
    'sharded_weights': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm, wandb — 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
num_parameters Ran
ran, honoured the contract we drafted
konstantinjdobler/tight-budget-llm-adaptation/dlib/utils.py
code served (permissive licence) · get_code("5109370b9cf73f69")
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 torch
from torch import nn

torch.manual_seed(0)

# Create a simple test module with parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

module = SimpleModel()

ARGS = {
    "module": module,
    "requires_grad": None,
}
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 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
top_script Ran
ran; our contract draft was wrong, not the code
konstantinjdobler/tight-budget-llm-adaptation/helpers/smart_heuristics.py
code served (permissive licence) · get_code("8e6d49aaf98611d9")
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.

from collections import defaultdict

# Create a simple mapping from character ordinals to script names
ord2script = {
    ord('a'): 'latin',
    ord('b'): 'latin',
    ord('c'): 'latin',
    ord('α'): 'greek',
    ord('β'): 'greek',
    ord('中'): 'cjk',
    ord('文'): 'cjk',
}

token = "abcαβ中"

ARGS = {
    'token': token,
    'ord2script': ord2script,
}
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 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
estimate_flops Not yet run
unverified (harvested, no recorded run)
konstantinjdobler/tight-budget-llm-adaptation/dlib/speed_monitor.py
code served (permissive licence) · get_code("0eb4b83e52cb9d84")
How it ran

no invocation recorded.

get_flops_available Not yet run
unverified (harvested, no recorded run)
konstantinjdobler/tight-budget-llm-adaptation/dlib/speed_monitor.py
code served (permissive licence) · get_code("ad0d4ccf7268fb64")
How it ran

no invocation recorded.

get_ord2script Not yet run
unverified (harvested, no recorded run)
konstantinjdobler/tight-budget-llm-adaptation/helpers/smart_heuristics.py
code served (permissive licence) · get_code("e8e4a9db7236b331")
How it ran

no invocation recorded.

monkey_patched_mistral_forward_for_pretraining_with_attn_mask_fix Not yet run
unverified (harvested, no recorded run)
konstantinjdobler/tight-budget-llm-adaptation/helpers/mokey_patch_fa_packing.py
code served (permissive licence) · get_code("5d646da0f559c685")
How it ran

no invocation recorded.

my_modded_dist_save Not yet run
unverified (harvested, no recorded run)
konstantinjdobler/tight-budget-llm-adaptation/dlib/checkpointing.py
code served (permissive licence) · get_code("077df7ccd5f734f7")
How it ran

no invocation recorded.

sharded_calculate_and_log_stats Not yet run
unverified (harvested, no recorded run)
konstantinjdobler/tight-budget-llm-adaptation/dlib/model_profiling.py
code served (permissive licence) · get_code("8df89d90dd3e4c21")
How it ran

no invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 6 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 1 the same month, 3 later) and 12 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
find_multiple 6 other papers
2 dated earlier, 1 the same month, 3 later
2307.09288 (2023-07)
Llama 2: Open Foundation and Fine-Tuned Chat Models
2406.06046 (2024-06)
MATES : Model-Aware Data Selection for Efficient Pretraining with Data Influence Models
2408.16725 (2024-08)
Mini-Omni: Language Models Can Hear, Talk While Thinking in Streaming
and 3 more not named here
get_max_seqlen_in_batch 2 other papers
1 dated earlier, 1 later
2402.12030 (2024-02)
Towards Cross-Tokenizer Distillation: the Universal Logit Distillation Loss for LLMs
2501.04961 (2025-01)
Demystifying Domain-adaptive Post-training for Financial LLMs
get_ord2script 2 other papers
1 dated earlier, 1 same year, order not determinable
2309.04679 (2023-09)
Embedding structure matters: Comparing methods to adapt multilingual vocabularies to new languages
2024.findings-emnlp.918 (2024 (year only))
Targeted Multilingual Adaptation for Low-resource Language Families
hex2dec 2 other papers
1 dated earlier, 1 same year, order not determinable
2309.04679 (2023-09)
Embedding structure matters: Comparing methods to adapt multilingual vocabularies to new languages
2024.findings-emnlp.918 (2024 (year only))
Targeted Multilingual Adaptation for Low-resource Language Families
top_script 2 other papers
1 dated earlier, 1 same year, order not determinable
2309.04679 (2023-09)
Embedding structure matters: Comparing methods to adapt multilingual vocabularies to new languages
2024.findings-emnlp.918 (2024 (year only))
Targeted Multilingual Adaptation for Low-resource Language Families
get_unpad_data 1 other paper
1 later
2501.04961 (2025-01)
Demystifying Domain-adaptive Post-training for Financial LLMs

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

Repositories linked to this paper

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

Abstract

We investigate continued pretraining of LLMs for language adaptation on a tight academic budget: a setting in which only a few GPUs can be used in parallel, for a heavily constrained duration. We focus on adapting Mistral-7B to German or Arabic and evaluate several techniques to improve efficiency and effectiveness in this setting. Our German models adapted on this tight compute budget underperform compared to the base Mistral-7B, while our Arabic models outperform several baselines, showing that for sufficiently well-represented languages, continued pretraining for specialization is not always helpful. Our main findings focus on training precision and tokenizer swapping. Our results show that pure bfloat16 training is a viable alternative to mixed-precision training, while being much faster when only using a few GPUs. Swapping the tokenizer for a specialized one yields more efficient tokenization and is competitive with the original tokenizer, which already contains some German tokens, but did not significantly increase performance for German. Code and model weights are available on GitHub.

For agents

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

get_harvested_code_for_paper("2408.15793")
get_code_for_paper("2408.15793")
have("2408.15793")

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

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

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

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

Connect an agent — have() is free.