SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.09685 · ICLR · 2021

LoRA: Low-Rank Adaptation of Large Language Models

Edward Hu, Weizhu Chen, Yelong Shen, Yuanzhi Li, Lu Wang, Zeyuan Allen-Zhu, Phillip Wallis, Shean Wang

arXiv · PDF · Open in the Atlas

Code that ran

51 of 84 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (19 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 41 have no contract verdict; 9 failures of our instrument; 33 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/2106.09685.json · badge: /api/ran/2106.09685.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
zhanglab-aim/lingo community
not in the paper's declared repositories
11 ran · 7 no recorded run
ikergarcia1996/sequence-labeling-llms community (classifier label)
classifier basis not recorded on the link
9 ran · 5 no recorded run
hellokevin07/elastictrainer community (classifier label)
classifier basis not recorded on the link
5 ran · 3 no recorded run
phoebussi/alpaca-cot community
not in the paper's declared repositories
4 ran · 3 no recorded run
chenlicodebank/lora_on_analog_hardware community (classifier label)
classifier basis not recorded on the link
3 ran · 3 no recorded run
hitz-zentroa/this-is-not-a-dataset community
Papers with Code archive
3 ran · 2 no recorded run
vivo-ai-lab/bluelm community
not in the paper's declared repositories
2 ran · 1 no recorded run
labmlai/annotated_deep_learning_paper_implementations community
not in the paper's declared repositories
2 ran · 0 no recorded run
h2oai/h2o-llmstudio community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
lighterswang/biomedclip-lora community
not in the paper's declared repositories
1 ran · 1 no recorded run
lif31up/attention-is-all-you-need community (classifier label)
classifier basis not recorded on the link
1 ran · 1 no recorded run
Lightning-AI/lit-llama community
Papers with Code archive
1 ran · 0 no recorded run
mistralai/mistral-inference community
not in the paper's declared repositories
1 ran · 0 no recorded run
mistralai/mistral-finetune community
not in the paper's declared repositories
1 ran · 0 no recorded run
qwenlm/qwen-vl community
not in the paper's declared repositories
1 ran · 0 no recorded run
qwenlm/qwen community
not in the paper's declared repositories
1 ran · 0 no recorded run
KU-CVLAB/MoA community
Papers with Code archive
1 ran · 0 no recorded run
punica-ai/punica community
not in the paper's declared repositories
1 ran · 0 no recorded run
internlm/xtuner community
not in the paper's declared repositories
1 ran · 0 no recorded run
davisyoshida/lorax community (classifier label)
classifier basis not recorded on the link
0 ran · 2 no recorded run
song-wx/sift community
not in the paper's declared repositories
0 ran · 2 no recorded run
flagai-open/aquila2 community
Papers with Code archive
0 ran · 1 no recorded run
if001/rwkv-lm-lora-ja community
not in the paper's declared repositories
0 ran · 1 no recorded run
wwxu21/cut community
not in the paper's declared repositories
0 ran · 1 no recorded run
FunctionStatusWhere it lives
Conv2d Ran
ran on a synthesized input · constructed an object; no result was computed
zhanglab-aim/lingo/peftnew/tuners/lora.py
pointer only (licence: GPL-3.0) · get_code("4025b3aa55f8b3e1")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zhanglab-aim/lingo, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Conv2d Ran
ran on a synthesized input · constructed an object; no result was computed
phoebussi/alpaca-cot/peft/src/peft/tuners/lora.py
code served (permissive licence) · get_code("f156ba83a62bfd88")
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, Conv2d: 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
import math

torch.manual_seed(0)

ARGS = {
    "adapter_name": "default",
    "in_channels": 3,
    "out_channels": 4,
    "kernel_size": 3,
    "stride": 1,
    "padding": 1,
    "r": 2,
    "lora_alpha": 1,
    "lora_dropout": 0.1,
}
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 Conv2d — 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 Conv2d 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
Embedding Ran
ran on a synthesized input · constructed an object; no result was computed
zhanglab-aim/lingo/peftnew/tuners/lora.py
pointer only (licence: GPL-3.0) · get_code("747685b3f553947b")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zhanglab-aim/lingo, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Embedding Ran
ran on a synthesized input · constructed an object; no result was computed
phoebussi/alpaca-cot/peft/src/peft/tuners/lora.py
code served (permissive licence) · get_code("1d022836585085cb")
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, Embedding: 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
import math
import warnings

torch.manual_seed(0)

ARGS = {
    'adapter_name': 'default',
    'num_embeddings': 10,
    'embedding_dim': 4,
    'r': 2,
    'lora_alpha': 1,
    'lora_dropout': 0.1,
}
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 Embedding — 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 Embedding 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
Linear Ran
ran on a synthesized input · constructed an object; no result was computed
zhanglab-aim/lingo/peftnew/tuners/lora.py
pointer only (licence: GPL-3.0) · get_code("81d374052d6022b2")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zhanglab-aim/lingo, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Linear Ran
ran on a synthesized input · constructed an object; no result was computed
phoebussi/alpaca-cot/peft/src/peft/tuners/lora.py
code served (permissive licence) · get_code("1f506a3641c40fac")
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, Linear: 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
import math

torch.manual_seed(0)

ARGS = {
    "adapter_name": "default",
    "in_features": 4,
    "out_features": 3,
    "r": 2,
    "lora_alpha": 1,
    "lora_dropout": 0.1,
    "fan_in_fan_out": False,
    "bias": True,
    "init_lora_weights": True,
}
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 Linear — 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 Linear 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
Linear Ran
ran on a synthesized input
labmlai/annotated_deep_learning_paper_implementations/labml_nn/lora/gpt2.py
code served (permissive licence) · get_code("57b8771890dd7b1b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float, shape (2, 3) 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

class Linear(nn.Module):
    """
    ## LoRA Linear Layer

    LoRA linear layer adds a low-rank decomposition to the pre-trained
    weight matrix ($W_0 \\in \\mathbb{R}^{d 	imes k}$)
    of the linear layer.

    $$W_0 + \\Delta W = W_0 + BA$$

    , where $B \\in \\mathbb{R}^{d 	imes r}$, $A \\in \\mathbb{R}^{r 	imes k}$,
     and the rank $r \\ll min(d, k)$.

    All parameters are frozen except $A$ and $B$.

    $\\Delta W$ is initialized to be zero at the beginning of the training.

    They multiple $x \\Delta W^T$ by $\x0crac{\x07lpha}{r}$ where $\x07lpha$ is a hyper-parameter.
    Once $\x07lpha$ is tuned it can be kept the same when varying $r$.
    """

    def __init__(self, in_features: int, out_features: int, bias: bool, r: int, alpha: int=None):
        """
        :param in_features: is the number of input features of the linear layer
        :param out_features: is the number of output features of the linear layer
        :param bias: is a flag indicating if there is a bias parameter
        :param r: is the rank of the decomposition $r$
        :param alpha: is the scaling factor $\x07lpha$
        """
        super().__init__()
        if alpha is None:
            alpha = r
        self.weight = nn.Parameter(torch.empty((out_features, in_features)))
        self.weight.requires_grad = False
        if bias:
            self.bias = nn.Parameter(torch.empty(out_features))
            self.bias.requires_grad = False
        else:
            self.bias = None
        self.scaling = alpha / r
        self.lora_a = nn.Parameter(torch.empty((r, in_features)))
        self.lora_b = nn.Parameter(torch.empty((out_features, r)))
        with torch.no_grad():
            nn.init.kaiming_uniform_(self.lora_a, a=5 ** 0.5)
            nn.init.zeros_(self.lora_b)

    def forward(self, x: torch.Tensor):
        result = nn.functional.linear(x, self.weight, bias=self.bias)
        result += x @ self.lora_a.T @ self.lora_b.T * self.scaling
        return result


INIT_ARGS = {
    'in_features': 4,
    'out_features': 3,
    'bias': True,
    'r': 2,
    'alpha': 8,
}

ARGS = {
    'x': torch.randn(2, 4),
}

if __name__ == '__main__':
    model = Linear(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 3) — shape (2, 3) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
LoRALayer Ran
ran on a synthesized input · constructed an object; no result was computed
Lightning-AI/lit-llama/lit_llama/lora.py
code served (permissive licence) · get_code("03b78b050e202a11")
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, LoRALayer: 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

torch.manual_seed(0)

ARGS = {
    "r": 8,
    "lora_alpha": 16,
    "lora_dropout": 0.1,
    "merge_weights": True,
}
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 LoRALayer — 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 LoRALayer 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
LoRALinear Ran
ran on a synthesized input · constructed an object; no result was computed
mistralai/mistral-inference/src/mistral_inference/lora.py
code served (permissive licence) · get_code("d91b99d50ee2e13b")
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, LoRALinear: 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

torch.manual_seed(0)

ARGS = {
    'in_features': 4,
    'out_features': 3,
    'rank': 2,
    'scaling': 2.0,
    'bias': False,
}
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 LoRALinear — 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 LoRALinear 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
LoRALinear Ran
ran on a synthesized input · constructed an object; no result was computed
mistralai/mistral-finetune/model/lora.py
code served (permissive licence) · get_code("0fa772920c405ed2")
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, LoRALinear: 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

torch.manual_seed(0)

ARGS = {
    'in_features': 8,
    'out_features': 6,
    'rank': 4,
    'scaling': 2.0,
    'dropout': 0.1,
    'bias': False,
}
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 LoRALinear — 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 LoRALinear 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
LoraArguments Ran
ran on a synthesized input · constructed an object; no result was computed
qwenlm/qwen-vl/finetune.py
pointer only (licence: NOASSERTION) · get_code("e9170e0ed6d12210")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, qwenlm/qwen-vl (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

LoraArguments Ran
ran on a synthesized input · constructed an object; no result was computed
qwenlm/qwen/finetune.py
code served (permissive licence) · get_code("33efd3e3245a8802")
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, LoraArguments: 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
from dataclasses import dataclass, field
from typing import Dict, Optional, List

torch.manual_seed(0)

ARGS = {
    'lora_r': 64,
    'lora_alpha': 16,
    'lora_dropout': 0.05,
    'lora_target_modules': ['c_attn', 'c_proj', 'w1', 'w2'],
    'lora_weight_path': '',
    'lora_bias': 'none',
    'q_lora': False,
}
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 LoraArguments — 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 LoraArguments 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
LoraInjectedLinear Ran
ran on a synthesized input · constructed an object; no result was computed
KU-CVLAB/MoA/domainbed/models/lora/lora_util.py
pointer only (licence: NONE) · get_code("d4f1b87ebb0746ff")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, KU-CVLAB/MoA when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

LoraLayer Ran
ran on a synthesized input · constructed an object; no result was computed
zhanglab-aim/lingo/peftnew/tuners/lora.py
pointer only (licence: GPL-3.0) · get_code("e5f9e40bdb24afdb")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zhanglab-aim/lingo, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

LoraWeight Ran
ran on a synthesized input · constructed an object; no result was computed
punica-ai/punica/src/punica/utils/lora.py
code served (permissive licence) · get_code("b6d5f1638edabb8a")
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, LoraWeight: 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

torch.manual_seed(0)

# Define the ARGS dict with all required parameters for LoraWeight.__init__
ARGS = {
    "num_layers": 2,
    "in_features": 4,
    "out_features": 3,
    "lora_rank": 2,
    "dtype": torch.float32,
    "device": torch.device("cpu"),
}
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 LoraWeight — 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 LoraWeight 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
ModulesToSaveWrapper Ran
ran on a synthesized input · constructed an object; no result was computed
zhanglab-aim/lingo/peftnew/tuners/lora.py
pointer only (licence: GPL-3.0) · get_code("7bb2b9cb3064a59c")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zhanglab-aim/lingo, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

ModulesToSaveWrapper Ran
ran on a synthesized input · constructed an object; no result was computed
phoebussi/alpaca-cot/peft/src/peft/tuners/lora.py
code served (permissive licence) · get_code("5e92a950d55ba432")
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, ModulesToSaveWrapper: 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
import copy

torch.manual_seed(0)

# Create a simple module to wrap
class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create the module to save
module_to_save = SimpleModule()

# Define adapter name
adapter_name = "default"

ARGS = {
    "module_to_save": module_to_save,
    "adapter_name": adapter_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 ModulesToSaveWrapper — 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 ModulesToSaveWrapper 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
MultiHeadAttention Ran
ran on a synthesized input
labmlai/annotated_deep_learning_paper_implementations/labml_nn/lora/gpt2.py
code served (permissive licence) · get_code("7a1353c5e5ac87b5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, 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 torch
import torch.nn as nn

INIT_ARGS = {
    'd_model': 4,
    'n_heads': 2,
    'r': 3
}

ARGS = {
    'x': torch.randn(2, 5, 4)  # batch_size=2, seq_len=5, d_model=4
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
PeftConfig Ran
ran on a synthesized input · constructed an object; no result was computed
zhanglab-aim/lingo/peftnew/tuners/lora.py
pointer only (licence: GPL-3.0) · get_code("b368ffa3c3d69f27")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zhanglab-aim/lingo, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

PeftConfigMixin Ran
ran on a synthesized input · constructed an object; no result was computed
zhanglab-aim/lingo/peftnew/tuners/lora.py
pointer only (licence: GPL-3.0) · get_code("867983846f2ffb06")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zhanglab-aim/lingo, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

QuantLinear Ran
ran on a synthesized input · constructed an object; no result was computed
zhanglab-aim/lingo/peftnew/tuners/lora.py
pointer only (licence: GPL-3.0) · get_code("1464d2a7f4cf160e")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zhanglab-aim/lingo, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

_LoRA_qkv_timm Ran
ran on a synthesized input
lighterswang/biomedclip-lora/lora.py
pointer only (licence: NONE) · get_code("d8d584f9d3ef1a8f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lighterswang/biomedclip-lora when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_words_ids Ran
ran on a synthesized input
ikergarcia1996/sequence-labeling-llms/constrained_generation.py
code served (permissive licence) · get_code("336b88501d97f8d6")
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 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 torch
import numpy as np

class MockTokenizer:
    def encode(self, word, add_special_tokens=False):
        # Return a simple list of token ids based on word length
        # This simulates tokenizer behavior
        return [hash(word) % 1000 + i for i in range(len(word))]

tokenizer = MockTokenizer()
sentence = "hello world test"

ARGS = {
    "tokenizer": tokenizer,
    "sentence": sentence
}
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 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
convert_to_analog_according_to_name Ran
ran on a synthesized input
chenlicodebank/lora_on_analog_hardware/hardware_aware_training/related_functions.py
code served (permissive licence) · get_code("f0826162829e047c")
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 torch
import torch.nn as nn
from torch.nn import Linear

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = Linear(4, 3)
        self.linear2 = Linear(3, 2)
        self.nested = nn.Sequential(
            Linear(2, 5),
            nn.ReLU(),
            Linear(5, 2)
        )
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        x = self.nested(x)
        return x

module = SimpleModel()

ARGS = {
    'module': module,
    'parent_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 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
downscale_t_dy_and_t_dw Ran
ran on a synthesized input
hellokevin07/elastictrainer/selection_solver_DP.py
code served (permissive licence) · get_code("3a4aed8b19f818f9")
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 numpy as np

# Construct small numpy arrays for t_dy and t_dw
t_dy = np.array([10.5, 20.3, 15.7, 5.2], dtype=np.float32)
t_dw = np.array([8.1, 12.4, 9.8, 6.3], dtype=np.float32)

# Optional parameter with default value
Tq = 1000.0

ARGS = {
    "t_dy": t_dy,
    "t_dw": t_dw,
    "Tq": Tq,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
embed Ran
ran on a synthesized input
lif31up/attention-is-all-you-need/EmbeddedDataset.py
code served (permissive licence) · get_code("6351105db75b9e71")
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 (512, 768) 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

torch.manual_seed(0)

class MockTokenizer:
    def __call__(self, text, return_tensors=None, padding=None, truncation=None, max_length=None):
        # Return a dict with 'input_ids' and 'attention_mask' as tensors
        return {
            'input_ids': torch.randint(0, 1000, (1, 512)),
            'attention_mask': torch.ones(1, 512, dtype=torch.long)
        }

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(768, 768)
    
    def forward(self, input_ids, attention_mask):
        # Return an object with last_hidden_state attribute
        batch_size = input_ids.shape[0]
        seq_length = input_ids.shape[1]
        last_hidden_state = torch.randn(batch_size, seq_length, 768)
        
        class Output:
            pass
        
        output = Output()
        output.last_hidden_state = last_hidden_state
        return output

ARGS = {
    'text': 'hello world',
    'tokenizer': MockTokenizer(),
    'model': MockModel()
}
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 (512, 768) — shape (512, 768) 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
find_all_linear_modules Ran
ran; our contract draft was wrong, not the code
vivo-ai-lab/bluelm/train/utils/finetune_peft.py
pointer only (licence: NOASSERTION) · get_code("848321f611fd218e")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, vivo-ai-lab/bluelm (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

find_all_linear_names Ran
ran; our contract draft was wrong, not the code
hitz-zentroa/this-is-not-a-dataset/load_model.py
code served (permissive licence) · get_code("cfdc29157de085e3")
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 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple model with Linear layers
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.embedding = nn.Linear(4, 8)
        self.hidden = nn.Linear(8, 16)
        self.lm_head = nn.Linear(16, 4)
        self.output = nn.Linear(16, 4)
    
    def forward(self, x):
        x = self.embedding(x)
        x = self.hidden(x)
        x = self.output(x)
        return x

model = SimpleModel()

ARGS = {
    "model": model,
    "quantization": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
bitsandbytes, torch — 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
find_all_linear_names Ran
ran; our contract draft was wrong, not the code
internlm/xtuner/xtuner/model/utils.py
code served (permissive licence) · get_code("53281c424cf5891f")
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 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 torch
from torch import nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
        self.nested = nn.Sequential(
            nn.Linear(2, 5),
            nn.ReLU(),
            nn.Linear(5, 1)
        )
        self.lm_head = nn.Linear(1, 1)
        self.output_layer = nn.Linear(1, 1)

model = SimpleModel()

ARGS = {
    "model": model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — 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
get_cfg Ran
ran on a synthesized input
h2oai/h2o-llmstudio/llm_studio/src/loggers.py
code served (permissive licence) · get_code("078030b5193a097e")
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 dataclasses
from typing import Any

torch_imported = False
try:
    import torch
    torch_imported = True
except ImportError:
    pass

@dataclasses.dataclass
class MockConfig:
    """Mock configuration object that mimics the interface used by get_cfg"""
    
    def __init__(self):
        self.param1 = 1.5
        self.param2 = "test_value"
        self.param3 = 42
        self._private_param = "should_be_ignored"
        self._order = ['param1', 'param2', 'param3', '_private_param']
        self._visibility_map = {
            'param1': 1,
            'param2': 1,
            'param3': 1,
            '_private_param': -1,
        }
    
    def get_annotations(self):
        return {
            'param1': float,
            'param2': str,
            'param3': int,
            '_private_param': str,
        }
    
    def _get_order(self, warn_if_unset=False):
        return self._order
    
    def _get_visibility(self, key):
        return self._visibility_map.get(key, 1)
    
    @property
    def __dict__(self):
        return {
            'param1': 1.5,
            'param2': "test_value",
            'param3': 42,
            '_private_param': "should_be_ignored",
        }


@dataclasses.dataclass
class NestedMockConfig:
    """Mock configuration with nested dataclass"""
    
    def __init__(self):
        self.outer_param = 2.5
        self.nested = MockConfig()
        self._order = ['outer_param', 'nested']
        self._visibility_map = {
            'outer_param': 1,
            'nested': 1,
        }
    
    def get_annotations(self):
        return {
            'outer_param': float,
            'nested': MockConfig,
        }
    
    def _get_order(self, warn_if_unset=False):
        return self._order
    
    def _get_visibility(self, key):
        return self._visibility_map.get(key, 1)
    
    @property
    def __dict__(self):
        return {
            'outer_param': 2.5,
            'nested': self.nested,
        }


ARGS = {
    'cfg': MockConfig()
}
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
get_device_map Ran
ran; our contract draft was wrong, not the code
hitz-zentroa/this-is-not-a-dataset/load_model.py
code served (permissive licence) · get_code("a145b7042b65ac5e")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch
import os

torch.manual_seed(0)

# Clear any existing DDP environment variables to have clean state
if 'LOCAL_RANK' in os.environ:
    del os.environ['LOCAL_RANK']
if 'LOCAL_WORLD_SIZE' in os.environ:
    del os.environ['LOCAL_WORLD_SIZE']

ARGS = {
    'force_auto_device_map': False,
    'max_memory_MB': 1024,
    'use_better_transformer': False,
}
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 tuple, ndim 1, dtype family float — a tuple 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
get_device_map Ran
ran; our contract draft was wrong, not the code
ikergarcia1996/sequence-labeling-llms/load_model.py
code served (permissive licence) · get_code("47660e151147cb9e")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch
import os
import logging

torch.manual_seed(0)

# Set up basic logging to avoid warnings during execution
logging.basicConfig(level=logging.INFO)

# Test case 1: force_auto_device_map=True without DDP environment
ARGS = {
    "force_auto_device_map": True,
    "max_memory_MB": 1024,
    "use_better_transformer": False,
}
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 tuple, ndim 1, dtype family float — a tuple 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
get_dtype Ran
ran on a synthesized input
ikergarcia1996/sequence-labeling-llms/seq2seq.py
code served (permissive licence) · get_code("db50388eace49466")
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
from accelerate import Accelerator

torch.manual_seed(0)

# Create an Accelerator instance with mixed_precision set to 'bf16'
accelerator = Accelerator(mixed_precision='bf16')

ARGS = {
    'accelerator': accelerator
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
accelerate, 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_label_list Ran
ran; our contract draft was wrong, not the code
chenlicodebank/lora_on_analog_hardware/lora_training_glue/run_classification.py
code served (permissive licence) · get_code("adb7541f2edf078e")
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 torch
import numpy as np
from datasets import Dataset

torch.manual_seed(0)

# Create a mock dataset with multi-label structure
# The function accesses raw_dataset[split]['label']
# and either calls .unique() or iterates through lists

# Option 1: Create a dataset that has multi-label (list) structure
label_data_multi = {
    'label': [
        [0, 1],
        [1, 2],
        [0, 2, 3]
    ],
    'text': ['sample1', 'sample2', 'sample3']
}

# Option 2: Create a dataset that has single-label structure
label_data_single = {
    'label': [0, 1, 2, 0, 1],
    'text': ['sample1', 'sample2', 'sample3', 'sample4', 'sample5']
}

# Build a dict-like object that mimics the raw_dataset structure
class MockDataset(dict):
    def __init__(self, data_dict):
        super().__init__(data_dict)
    
    def unique(self, key):
        """Return unique values from a column"""
        values = self[key]
        return sorted(list(set(values)))

# Create train and test splits
train_split_multi = MockDataset(label_data_multi)
train_split_single = MockDataset(label_data_single)

raw_dataset_multi = {
    'train': train_split_multi,
    'test': MockDataset({'label': [[3, 4], [4]], 'text': ['test1', 'test2']})
}

raw_dataset_single = {
    'train': train_split_single,
    'test': MockDataset({'label': [3, 4], 'text': ['test1', 'test2']})
}

# Test with multi-label dataset
ARGS = {
    'raw_dataset': raw_dataset_multi,
    'split': 'train'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
datasets, numpy, torch — 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
get_peft_config Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
vivo-ai-lab/bluelm/train/utils/finetune_peft.py
pointer only (licence: NOASSERTION) · get_code("60df31a5803dfdaa")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, vivo-ai-lab/bluelm (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_quantization_config Ran
ran; our contract draft was wrong, not the code
zhanglab-aim/lingo/peftnew/tuners/lora.py
pointer only (licence: GPL-3.0) · get_code("4236f53faf916aa2")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zhanglab-aim/lingo, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_trainable_parameters Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hitz-zentroa/this-is-not-a-dataset/load_model.py
code served (permissive licence) · get_code("96cb172b7d428b13")
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 tuple, 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 torch
import torch.nn as nn
from transformers import PreTrainedModel

torch.manual_seed(0)

class SimplePreTrainedModel(PreTrainedModel):
    """Minimal PreTrainedModel subclass for testing."""
    
    def __init__(self):
        # Create a minimal config
        from transformers import AutoConfig
        config = AutoConfig.for_model("gpt2")
        super().__init__(config)
        
        # Add some parameters with different requires_grad settings
        self.layer1 = nn.Linear(4, 8)
        self.layer2 = nn.Linear(8, 3)
        
        # Make some parameters non-trainable
        self.layer2.weight.requires_grad = False
    
    def forward(self, input_ids):
        return self.layer1(input_ids)

# Create a simple model instance
model = SimplePreTrainedModel()

ARGS = {
    "model": model,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
interpret_image_size Ran
ran, honoured the contract we drafted
hellokevin07/elastictrainer/vit_utils.py
code served (permissive licence) · get_code("a6d5b89d9b7d3d00")
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, 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 typing

ImageSizeArg = typing.Union[typing.Tuple[int, int], int]

def interpret_image_size(image_size_arg: ImageSizeArg) -> typing.Tuple[int, int]:
    """Process the image_size argument whether a tuple or int."""
    if isinstance(image_size_arg, int):
        return (image_size_arg, image_size_arg)
    if isinstance(image_size_arg, tuple) and len(image_size_arg) == 2 and all(map(lambda v: isinstance(v, int), image_size_arg)):
        return image_size_arg
    raise ValueError(f'The image_size argument must be a tuple of 2 integers or a single integer. Received: {image_size_arg}')

# Test case 1: single integer
ARGS = {
    "image_size_arg": 256
}
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 tuple, ndim 1, dtype family int — a tuple 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_auto_gptq_available Ran
ran on a synthesized input
zhanglab-aim/lingo/peftnew/tuners/lora.py
pointer only (licence: GPL-3.0) · get_code("9027fb9844632cf2")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zhanglab-aim/lingo, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

is_bnb_4bit_available Ran
ran on a synthesized input
zhanglab-aim/lingo/peftnew/tuners/lora.py
pointer only (licence: GPL-3.0) · get_code("7d44a88878819ef3")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zhanglab-aim/lingo, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

list_linear_layers Ran
ran on a synthesized input
chenlicodebank/lora_on_analog_hardware/hardware_aware_training/related_functions.py
code served (permissive licence) · get_code("8bf57961090630be")
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 torch
import torch.nn as nn
from torch.nn import Linear

torch.manual_seed(0)

# Build a module with nested Linear layers
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = Linear(4, 3)
        self.linear2 = Linear(3, 2)
        self.submodule = nn.Sequential(
            Linear(2, 5),
            nn.ReLU(),
            Linear(5, 1)
        )
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        x = self.submodule(x)
        return x

module = SimpleModel()

ARGS = {
    'module': module,
    'parent_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 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
my_bool Ran
ran on a synthesized input
hellokevin07/elastictrainer/utils.py
code served (permissive licence) · get_code("e9b9102ba2736955")
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)

def my_bool(s):
    return s != 'False'

ARGS = {
    's': 'True'
}
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
parse_param Ran
ran on a synthesized input
h2oai/h2o-llmstudio/llm_studio/prompt.py
code served (permissive licence) · get_code("1db3631aa8a1aa75")
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 Config. 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

class Config:
    def __init__(self):
        self.prediction = PredictionConfig()

class PredictionConfig:
    def __init__(self):
        self.learning_rate = 0.001
        self.batch_size = 32
        self.epochs = 10
        self.threshold = 0.5

torch.manual_seed(0)

cfg = Config()
prompt = "--learning_rate 0.002 --batch_size 64 --epochs 20 --threshold 0.7"

ARGS = {
    "cfg": cfg,
    "prompt": prompt
}
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 Config — a Config output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Config 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
print_trainable_parameters Ran
ran on a synthesized input
ikergarcia1996/sequence-labeling-llms/seq2seq.py
code served (permissive licence) · get_code("14548ec0148ab8ec")
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, 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 torch
import torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 8)
        self.linear2 = nn.Linear(8, 3)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    "model": model
}
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, ndim 1, dtype family float — a tuple 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
read_data_from_tfboard_logs Ran
ran on a synthesized input
hellokevin07/elastictrainer/plot_curves.py
code served (permissive licence) · get_code("b0ef8d0623af5966")
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, ndim 2, 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 tempfile
import os
import tensorflow as tf
import numpy as np
from tensorboard.plugins.scalar import metadata as scalar_metadata
from tensorboard.compat.proto import summary_pb2
from tensorboard.compat.proto import event_pb2

# Create a temporary directory for tensorboard logs
tmpdir = tempfile.mkdtemp()

# Create a simple event file with scalar data
writer = tf.summary.create_file_writer(tmpdir)

with writer.as_default():
    for step in range(5):
        tf.summary.scalar('train/accuracy', 0.7 + step * 0.05, step=step)
        tf.summary.scalar('train/classification_loss', 0.5 - step * 0.05, step=step)

writer.flush()
writer.close()

# Verify the directory has event files
event_files = [f for f in os.listdir(tmpdir) if f.startswith('events.out')]
if not event_files:
    # Fallback: manually create event file with proper structure
    from tensorboard.compat.proto import event_pb2
    from tensorboard.compat.proto import summary_pb2
    import time
    
    event_file_path = os.path.join(tmpdir, 'events.out.tfevents.0')
    
    with tf.io.gfile.GFile(event_file_path, 'wb') as f:
        # Write file version event
        event = event_pb2.Event()
        event.file_version = 'brain.Event:2'
        f.write(event.SerializeToString())
        
        # Write scalar events
        base_time = time.time()
        for step in range(5):
            event = event_pb2.Event()
            event.wall_time = base_time + step * 10
            event.step = step
            
            value = summary_pb2.Summary.Value()
            value.tag = 'train/accuracy'
            value.simple_value = 0.7 + step * 0.05
            
            summary = summary_pb2.Summary()
            summary.value.append(value)
            event.summary.CopyFrom(summary)
            
            f.write(event.SerializeToString())

ARGS = {
    'path': tmpdir,
    'x_tag': 'step',
    'y_tag': 'train/accuracy'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorboard, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple 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
run_model Ran
ran on a synthesized input
ikergarcia1996/sequence-labeling-llms/constrained_generation.py
code served (permissive licence) · get_code("6704486d6cc51ef0")
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
from typing import Dict, List, Union

torch.manual_seed(0)

# Create a minimal mock model that implements the required interface
class MockEncoderDecoderModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 5)  # vocab_size = 5
        
    def prepare_inputs_for_generation(self, input_ids, **kwargs):
        # Return a dict with input_ids and any other kwargs
        return {"input_ids": input_ids, **kwargs}
    
    def forward(self, input_ids, return_dict=True, **kwargs):
        # Mock forward pass
        batch_size = input_ids.shape[0]
        seq_len = input_ids.shape[1]
        
        # Create mock logits output
        logits = torch.randn(batch_size, seq_len, 5)
        
        # Return a mock output object with logits attribute
        class MockOutput:
            def __init__(self, logits):
                self.logits = logits
        
        return MockOutput(logits)
    
    def _update_model_kwargs_for_generation(self, decoder_outputs, model_kwargs, is_encoder_decoder=False):
        # Return updated model_kwargs (can be the same or modified)
        return model_kwargs

# Set up the arguments
model = MockEncoderDecoderModel()
input_ids = torch.randint(0, 5, (2, 4))  # batch_size=2, seq_len=4
decoder_args = {
    "attention_mask": torch.ones((2, 4), dtype=torch.long),
    "max_length": 10
}
is_encoder_decoder = True

ARGS = {
    "model": model,
    "input_ids": input_ids,
    "decoder_args": decoder_args,
    "is_encoder_decoder": is_encoder_decoder
}
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 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
selection_DP Ran
ran on a synthesized input
hellokevin07/elastictrainer/selection_solver_DP.py
code served (permissive licence) · get_code("5f63441b43fd9611")
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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create small test data
N = 5  # number of layers
t_dy = np.array([2, 3, 1, 2, 1], dtype=np.int16)  # downscaled t_dy
t_dw = np.array([1, 2, 1, 3, 2], dtype=np.int16)  # downscaled t_dw
I = np.array([0.5, 0.8, 0.3, 0.9, 0.4], dtype=np.float32)  # per-layer contribution to loss drop
rho = 0.3  # backprop timesaving ratio

ARGS = {
    't_dy': t_dy,
    't_dw': t_dw,
    'I': I,
    'rho': rho
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
split_sentence Ran
ran on a synthesized input
ikergarcia1996/sequence-labeling-llms/evaluate.py
code served (permissive licence) · get_code("02c2c36a57cb4648")
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 re

tag_regex = re.compile(r'<[^>]+>')
sentence = "This is a <tag>test</tag> sentence with <another>tags</another> in it."
recursion_limit = 100

ARGS = {
    'tag_regex': tag_regex,
    'sentence': sentence,
    'recursion_limit': recursion_limit,
}
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
to_bilou_encoding Ran
ran on a synthesized input
ikergarcia1996/sequence-labeling-llms/tag_encoding.py
code served (permissive licence) · get_code("d7678113426bdefa")
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 torch
import numpy as np
from typing import List

# The function to_bilou_encoding takes a List[str] of tags and converts them
# to BILOU (Begin, Inside, Last, Outside, Unit) encoding format.
# The function modifies tags in-place and returns the modified list.

# Create a valid tags list for testing
tags = [
    'B-PER',      # Begin Person
    'I-PER',      # Inside Person
    'O',          # Outside
    'B-LOC',      # Begin Location
    'I-LOC',      # Inside Location
    'I-LOC',      # Inside Location
    'O',          # Outside
    'B-ORG',      # Begin Organization
]

ARGS = {
    'tags': tags
}
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 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
to_iob2_encoding Ran
ran on a synthesized input
ikergarcia1996/sequence-labeling-llms/tag_encoding.py
code served (permissive licence) · get_code("60b66de5aeee97ce")
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.

# Setup code for to_iob2_encoding function

ARGS = {
    'tags': [
        'B-PER',
        'I-PER',
        'O',
        'B-LOC',
        'I-LOC',
        'B-ORG',
        'O',
        'U-MISC'
    ]
}
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
to_iob_encoding Ran
ran on a synthesized input
ikergarcia1996/sequence-labeling-llms/tag_encoding.py
code served (permissive licence) · get_code("2ec748940a02967a")
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.

from typing import List

def to_iob_encoding(tags: List[str]) -> List[str]:
    prev_tag_b: str = 'O'
    prev_tag_t: str = ''
    for i in range(len(tags)):
        tag = tags[i]
        if tag == 'O':
            prev_tag_b = 'O'
            prev_tag_t = ''
        else:
            try:
                b, t = tag.split('-')
            except ValueError:
                print(f'Error tag {tag}, unable to split the tag in 2 fields.')
                continue
            if (b == 'B' or b == 'U') and prev_tag_b != 'O' and (prev_tag_t == t):
                tags[i] = f'B-{t}'
            else:
                tags[i] = f'I-{t}'
            prev_tag_b = b
            prev_tag_t = t
    return tags


ARGS = {
    'tags': ['B-PER', 'I-PER', 'O', 'B-LOC', 'B-PER', 'I-ORG']
}
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
BaseTuner Not yet run
unverified (harvested, no recorded run)
zhanglab-aim/lingo/peftnew/tuners/lora.py
pointer only (licence: GPL-3.0) · get_code("f877238ebdc262f1")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zhanglab-aim/lingo, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

BaseTunerLayer Not yet run
unverified (harvested, no recorded run)
zhanglab-aim/lingo/peftnew/tuners/lora.py
pointer only (licence: GPL-3.0) · get_code("0cf569603c64a959")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zhanglab-aim/lingo, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

LoRA_ViT_timm Not yet run
unverified (harvested, no recorded run)
lighterswang/biomedclip-lora/lora.py
pointer only (licence: NONE) · get_code("3dd0d78f6a42a263")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, lighterswang/biomedclip-lora when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

LoraArguments Not yet run
unverified (harvested, no recorded run)
flagai-open/aquila2/finetune/finetune.py
pointer only (licence: NONE) · get_code("a2a949d390f89698")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, flagai-open/aquila2 when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

LoraConfig Not yet run
unverified (harvested, no recorded run)
zhanglab-aim/lingo/peftnew/tuners/lora.py
pointer only (licence: GPL-3.0) · get_code("20fd5846de4854e1")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zhanglab-aim/lingo, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

LoraLayer Not yet run
unverified (harvested, no recorded run)
phoebussi/alpaca-cot/peft/src/peft/tuners/lora.py
code served (permissive licence) · get_code("4e130d790f7e7dcd")
How it ran

no invocation recorded.

LoraLinear Not yet run
unverified (harvested, no recorded run)
if001/rwkv-lm-lora-ja/RWKV-v4neo/src/model.py
code served (permissive licence) · get_code("399aed0da4b85280")
How it ran

no invocation recorded.

LoraModel Not yet run
unverified (harvested, no recorded run)
zhanglab-aim/lingo/peftnew/tuners/lora.py
pointer only (licence: GPL-3.0) · get_code("e9fa57bcc18e8142")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zhanglab-aim/lingo, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

LoraModel Not yet run
unverified (harvested, no recorded run)
phoebussi/alpaca-cot/peft/src/peft/tuners/lora.py
code served (permissive licence) · get_code("4e64816ecd5d8675")
How it ran

no invocation recorded.

Showing the first 60. An agent gets every one from get_harvested_code_for_paper("2106.09685").

Also present in other papers' code

Of 84 samples lifted from this paper's linked repositories, 84 carry a function identity and 0 do not. Of the 82 distinct functions with an identity, 20 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 19 later) and 62 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
LoRALayer
brick of this paper's assembly: entry
5 other papers
5 later · 3 only as an assembly brick
2310.04948 (2023-10)
TEMPO: Prompt-based Generative Pre-trained Transformer for Time Series Forecasting
2405.14791 (2024-05)
Recurrent Early Exits for Federated Learning with Heterogeneous Clients
2503.01419 (2025-03)
Parameter-Efficient Fine-Tuning of Large Language Models via Deconvolution in Subspace
and 2 more not named here
get_label_list 5 other papers
5 later
2403.11009 (2024-03)
DIALECTBENCH: A NLP Benchmark for Dialects, Varieties, and Closely-Related Languages
2405.00467 (2024-05)
Harnessing the Power of Multiple Minds: Lessons Learned from LLM Routing
2407.11770 (2024-07)
Robust Utility-Preserving Text Anonymization Based on Large Language Models
and 2 more not named here
postprocess_qa_predictions_with_beam_search 5 other papers
5 later
2205.01068 (2022-05)
OPT: Open Pre-trained Transformer Language Models
2023.acl-short.31 (2023 (year only))
PLUE: Language Understanding Evaluation Benchmark for Privacy Policies in English
2310.14709 (2023-10)
Once Upon a $\textit{Time}$ in $\textit{Graph}$: Relative-Time Pretraining for Complex Temporal Reasoning
and 2 more not named here
postprocess_qa_predictions 4 other papers
4 later
2023.acl-short.31 (2023 (year only))
PLUE: Language Understanding Evaluation Benchmark for Privacy Policies in English
2310.14709 (2023-10)
Once Upon a $\textit{Time}$ in $\textit{Graph}$: Relative-Time Pretraining for Complex Temporal Reasoning
2602.08351 (2026-02)
The Chicken and Egg Dilemma: Co-optimizing Data and Model Configurations for LLMs
and 1 more not named here
ModulesToSaveWrapper
brick of this paper's assembly: helper
3 other papers
3 later · 3 only as an assembly brick
2402.13717 (2024-02)
Neeko: Leveraging Dynamic LoRA for Efficient Multi-Character Role-Playing Agent
2408.10159 (2024-08)
Customizing Language Models with Instance-wise LoRA for Sequential Recommendation
2503.12897 (2025-03)
Federated Continual Instruction Tuning
is_bnb_4bit_available
brick of this paper's assembly: helper
3 other papers
3 later · 3 only as an assembly brick
2402.13717 (2024-02)
Neeko: Leveraging Dynamic LoRA for Efficient Multi-Character Role-Playing Agent
2408.10159 (2024-08)
Customizing Language Models with Instance-wise LoRA for Sequential Recommendation
2503.12897 (2025-03)
Federated Continual Instruction Tuning
mark_only_lora_as_trainable
brick of this paper's assembly: update_rule
3 other papers
3 later · 1 only as an assembly brick
2503.12897 (2025-03)
Federated Continual Instruction Tuning
2507.02302 (2025-07)
DoMIX: An Efficient Framework for Exploiting Domain Knowledge in Fine-Tuning
2603.01526 (2026-03)
Scalable Multi-Task Low-Rank Model Adaptation
find_all_linear_names
brick of this paper's assembly: entry
2 other papers
2 later
2411.14522 (2024-11)
GMAI-VL &amp; GMAI-VL-5.5M: A Large Vision-Language Model and A Comprehensive Multimodal Dataset Towards General Medical AI
2505.14640 (2025-05)
VideoEval-Pro: Robust and Realistic Long Video Understanding Evaluation
Conv2d
brick of this paper's assembly: model
1 other paper
1 later
2503.12897 (2025-03)
Federated Continual Instruction Tuning
Embedding
brick of this paper's assembly: model
1 other paper
1 later
2503.12897 (2025-03)
Federated Continual Instruction Tuning
Linear
brick of this paper's assembly: model
1 other paper
1 later
2503.12897 (2025-03)
Federated Continual Instruction Tuning
LoraLayer
brick of this paper's assembly: model
1 other paper
1 later
2503.12897 (2025-03)
Federated Continual Instruction Tuning
TaskType
brick of this paper's assembly: helper
1 other paper
1 later
2605.05676 (2026-05)
Decomposing the Basic Abilities of Large Language Models: Mitigating Cross-Task Interference in Multi-Task Instruct-Tuning
find_all_linear_names
brick of this paper's assembly: helper
1 other paper
1 later
2310.03668 (2023-10)
GoLLIE: Annotation Guidelines improve Zero-Shot Information-Extraction
get_device_map 1 other paper
1 later
2310.03668 (2023-10)
GoLLIE: Annotation Guidelines improve Zero-Shot Information-Extraction
get_trainable_parameters
brick of this paper's assembly: helper
1 other paper
1 later
2310.03668 (2023-10)
GoLLIE: Annotation Guidelines improve Zero-Shot Information-Extraction
interpret_image_size 1 other paper
1 dated earlier
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
label2name 1 other paper
1 later
2025.findings-acl.931 (2025 (year only))
The Devil Is in the Word Alignment Details: On Translation-Based Cross-Lingual Transfer for Token Classification Tasks
name2label 1 other paper
1 later
2025.findings-acl.931 (2025 (year only))
The Devil Is in the Word Alignment Details: On Translation-Based Cross-Lingual Transfer for Token Classification Tasks
smart_tokenizer_and_embedding_resize
brick of this paper's assembly: helper
1 other paper
1 later
2408.17003 (2024-08)
Safety Layers in Aligned Large Language Models: The Key to LLM Security

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

More are linked than shown here.

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

Abstract

An important paradigm of natural language processing consists of large-scale pretraining on general domain data and adaptation to particular tasks or domains. As we pre-train larger models, full fine-tuning, which retrains all model parameters, becomes less feasible. Using GPT-3 175B as an example -deploying independent instances of fine-tuned models, each with 175B parameters, is prohibitively expensive. We propose Low-Rank Adaptation, or LoRA, which freezes the pretrained model weights and injects trainable rank decomposition matrices into each layer of the Transformer architecture, greatly reducing the number of trainable parameters for downstream tasks. Compared to GPT-3 175B fine-tuned with Adam, LoRA can reduce the number of trainable parameters by 10,000 times and the GPU memory requirement by 3 times. LoRA performs on-par or better than finetuning in model quality on RoBERTa, DeBERTa, GPT-2, and GPT-3, despite having fewer trainable parameters, a higher training throughput, and, unlike adapters, no additional inference latency. We also provide an empirical investigation into rank-deficiency in language model adaptation, which sheds light on the efficacy of LoRA. We release a package that facilitates the integration of LoRA with PyTorch models and provide our implementations and model checkpoints for RoBERTa, DeBERTa, and GPT-2 at https://github.com/microsoft/LoRA. * Equal contribution. 0 Compared to V1, this draft includes better baselines, experiments on GLUE, and more on adapter latency. 1 While GPT-3 175B achieves non-trivial performance with few-shot learning, fine-tuning boosts its performance significantly as shown in Appendix A.

For agents

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

get_harvested_code_for_paper("2106.09685")
get_code_for_paper("2106.09685")
have("2106.09685")

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

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

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

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

Connect an agent — have() is free.