SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2003.02249 · ACL · 2020

jiant: A Software Toolkit for Research on General-Purpose Text Understanding Models

Ian Tenney, Alex Wang, Jason Phang, Samuel Bowman, Yada Pruksachatkun, Haokun Liu, Phu Htut, Phil Yeres

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 2 failures of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2003.02249.json · badge: /api/ran/2003.02249.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
nyu-mll/jiant community
Papers with Code archive
6 ran · 2 no recorded run
FunctionStatusWhere it lives
JiantModel Ran
ran on a synthesized input · constructed an object; no result was computed
nyu-mll/jiant/jiant/proj/main/modeling/primary.py
code served (permissive licence) · get_code("3997e054e9e65f4a")
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, JiantModel: 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 numpy as np
from dataclasses import dataclass
from typing import Dict

torch.manual_seed(0)

# Define the ExtendedDataClassMixin and BatchMixin classes
class ExtendedDataClassMixin:
    @classmethod
    def get_fields(cls):
        return list(cls.__dataclass_fields__)

    @classmethod
    def get_annotations(cls):
        return cls.__annotations__

    def to_dict(self):
        return {k: getattr(self, k) for k in self.get_fields()}

    @classmethod
    def from_dict(cls, kwargs):
        return cls(**kwargs)

    def new(self, **new_kwargs):
        from dataclasses import replace
        return replace(self, **new_kwargs)

@dataclass
class TestBatch(ExtendedDataClassMixin):
    input_ids: torch.Tensor
    attention_mask: torch.Tensor

class BatchMixin(ExtendedDataClassMixin):
    def to(self, device, non_blocking=False, copy=False):
        return self.__class__(**{k: self._val_to_device(v=v, device=device, non_blocking=non_blocking, copy=copy) for k, v in self.to_dict().items()})

    @classmethod
    def _val_to_device(cls, v, device, non_blocking=False, copy=False):
        if isinstance(v, torch.Tensor):
            return v.to(device=device, non_blocking=non_blocking, copy=copy)
        else:
            return v

    def __len__(self):
        return len(getattr(self, self.get_fields()[0]))

# Define Task class
class Task:
    Example = NotImplemented
    TokenizedExample = NotImplemented
    DataRow = NotImplemented
    Batch = TestBatch
    TASK_TYPE = NotImplemented

    def __init__(self, name: str, path_dict: dict):
        self.name = name
        self.path_dict = path_dict

    @property
    def train_path(self):
        return self.path_dict['train']

    @property
    def val_path(self):
        return self.path_dict['val']

    @property
    def test_path(self):
        return self.path_dict['test']

# Define Taskmodel class
class Taskmodel(nn.Module):
    def __init__(self, task, encoder, head):
        super().__init__()
        self.task = task
        self.encoder = encoder
        self.head = head

    def forward(self, batch, tokenizer, compute_loss: bool = False):
        raise NotImplementedError

# Create minimal encoder
class SimpleEncoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.embedding = nn.Embedding(100, 4)
        self.linear = nn.Linear(4, 4)

    def forward(self, input_ids):
        x = self.embedding(input_ids)
        return self.linear(x)

# Create minimal head
class SimpleHead(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)

    def forward(self, x):
        return self.linear(x)

# Create minimal tokenizer
class SimpleTokenizer:
    def __call__(self, text):
        return {"input_ids": torch.tensor([1, 2, 3]), "attention_mask": torch.tensor([1, 1, 1])}

# Build arguments
encoder = SimpleEncoder()
head = SimpleHead()
tokenizer = SimpleTokenizer()

task1 = Task("task1", {"train": "/path/train", "val": "/path/val", "test": "/path/test"})
task2 = Task("task2", {"train": "/path/train2", "val": "/path/val2", "test": "/path/test2"})

taskmodel1 = Taskmodel(task1, encoder, head)
taskmodel2 = Taskmodel(task2, encoder, head)

task_dict = {
    "task1": task1,
    "task2": task2,
}

taskmodels_dict = {
    "taskmodel1": taskmodel1,
    "taskmodel2": taskmodel2,
}

task_to_taskmodel_map = {
    "task1": "taskmodel1",
    "task2": "taskmodel2",
}

ARGS = {
    "task_dict": task_dict,
    "encoder": encoder,
    "taskmodels_dict": taskmodels_dict,
    "task_to_taskmodel_map": task_to_taskmodel_map,
    "tokenizer": tokenizer,
}
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 JiantModel — 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 JiantModel 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
Task Ran
ran on a synthesized input · constructed an object; no result was computed
nyu-mll/jiant/jiant/proj/main/modeling/primary.py
code served (permissive licence) · get_code("3cc8da16c18465bd")
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, Task: 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 numpy as np
from typing import Mapping, Sequence, Dict, Any
from dataclasses import dataclass, fields

torch.manual_seed(0)

# Define a minimal DataRow class with required methods
class DataRow:
    def __init__(self, field1, field2):
        self.field1 = field1
        self.field2 = field2
    
    def to_dict(self):
        return {'field1': self.field1, 'field2': self.field2}

# Define a minimal Batch class with required class method
@dataclass
class Batch:
    field1: torch.FloatTensor
    field2: torch.FloatTensor
    
    @classmethod
    def get_annotations(cls):
        return {
            'field1': torch.FloatTensor,
            'field2': torch.FloatTensor,
        }

# Define a minimal Task class
class Task:
    Example = NotImplemented
    TokenizedExample = NotImplemented
    DataRow = DataRow
    Batch = Batch
    TASK_TYPE = NotImplemented
    
    def __init__(self, name: str, path_dict: dict):
        self.name = name
        self.path_dict = path_dict
    
    @property
    def train_path(self):
        return self.path_dict['train']
    
    @property
    def val_path(self):
        return self.path_dict['val']
    
    @property
    def test_path(self):
        return self.path_dict['test']
    
    @classmethod
    def collate_fn(cls, batch):
        elem = batch[0]
        if isinstance(elem, Mapping):
            assert set(elem.keys()) == {'data_row', 'metadata'}
            data_rows = [x['data_row'] for x in batch]
            metadata = [x['metadata'] for x in batch]
            collated_data_rows = {key: [getattr(d, key) for d in data_rows] for key in data_rows[0].to_dict()}
            collated_metadata = {k: [d[k] for d in metadata] for k in metadata[0].keys()}
            combined = {**collated_data_rows, **collated_metadata}
            batch_dict = {}
            for field, field_type in cls.Batch.get_annotations().items():
                batch_dict[field] = torch.tensor(combined.pop(field)).float()
            out_batch = cls.Batch(**batch_dict)
            remainder = combined
            return (out_batch, remainder)
        else:
            raise TypeError(f'Unknown type for collate_fn {type(elem)}')

ARGS = {
    'name': 'test_task',
    'path_dict': {
        'train': '/path/to/train',
        'val': '/path/to/val',
        'test': '/path/to/test'
    }
}
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 Task — 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 Task 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
Taskmodel Ran
ran on a synthesized input · constructed an object; no result was computed
nyu-mll/jiant/jiant/proj/main/modeling/primary.py
code served (permissive licence) · get_code("d92320e976b7c02b")
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, Taskmodel: 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)

# Stand-in task class
class Task:
    def __init__(self):
        self.name = "test_task"

# Minimal encoder module
class Encoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 8)
    
    def forward(self, x):
        return self.linear(x)

# Minimal head module
class Head(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(8, 2)
    
    def forward(self, x):
        return self.linear(x)

# Stand-in tokenizer
class Tokenizer:
    def __init__(self):
        self.vocab_size = 100
    
    def encode(self, text):
        return [1, 2, 3]

# Create instances
task = Task()
encoder = Encoder()
head = Head()
tokenizer = Tokenizer()

ARGS = {
    "task": task,
    "encoder": encoder,
    "head": head
}
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 Taskmodel — 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 Taskmodel 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
combine_dicts Ran
ran; our contract draft was wrong, not the code
nyu-mll/jiant/jiant/proj/main/modeling/primary.py
code served (permissive licence) · get_code("620e0842afad21c1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from collections import OrderedDict

torch.manual_seed(0)

# Create test dictionaries
dict1 = {
    'a': 1,
    'b': 'hello',
    'c': torch.tensor([1.0, 2.0, 3.0, 4.0])
}

dict2 = {
    'd': 42,
    'e': [1, 2, 3],
    'f': np.array([1, 2, 3, 4])
}

dict3 = {
    'g': {'nested': 'dict'},
    'h': 3.14
}

# Test with strict=True (no collisions)
dict_ls_no_collision = [dict1, dict2, dict3]

# Test with strict=False (allows collision with overwrite)
dict_collision_1 = {'x': 1, 'y': 2}
dict_collision_2 = {'y': 99, 'z': 3}
dict_ls_with_collision = [dict_collision_1, dict_collision_2]

# Custom dict class for testing
class CustomDict(dict):
    pass

ARGS = {
    'dict_ls': dict_ls_no_collision,
    'strict': True,
    'dict_class': dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
flat_collate_fn Ran
ran, honoured the contract we drafted
nyu-mll/jiant/jiant/proj/main/modeling/primary.py
code served (permissive licence) · get_code("8f7619b2828926ea")
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 int, 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 numpy as np
import torch.utils.data.dataloader as dataloader

torch_seed = 0

# Test case 1: numpy array batch
batch_numpy = [np.array([1, 2, 3]), np.array([4, 5, 6])]

# Test case 2: int batch
batch_int = [1, 2, 3]

# Test case 3: float batch
batch_float = [1.5, 2.5, 3.5]

# Test case 4: string batch
batch_str = ["hello", "world"]

# Test case 5: list batch (should return as-is)
batch_list = [[1, 2], [3, 4]]

# Test case 6: dict batch (should return as-is)
batch_dict = [{"a": 1}, {"b": 2}]

# Test case 7: set batch (should return as-is)
batch_set = [{"x", "y"}, {"z"}]

# We'll use the numpy array batch as the primary test
ARGS = {
    "batch": batch_numpy
}
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 Tensor, ndim 2, dtype family int, 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: none by the harness; any seed is in the setup block
metadata_collate_fn Ran
ran; our contract draft was wrong, not the code
nyu-mll/jiant/jiant/proj/main/modeling/primary.py
code served (permissive licence) · get_code("61ffc5549a75fe3c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function takes a list of dictionaries and collates them by grouping
# values for each key. We need to create a list of metadata dictionaries.

metadata = [
    {
        "id": 1,
        "name": "sample_1",
        "tensor": torch.randn(2, 4),
        "score": 0.95
    },
    {
        "id": 2,
        "name": "sample_2",
        "tensor": torch.randn(2, 4),
        "score": 0.87
    }
]

ARGS = {
    "metadata": metadata
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
BatchMixin Not yet run
unverified (harvested, no recorded run)
nyu-mll/jiant/jiant/proj/main/modeling/primary.py
code served (permissive licence) · get_code("706ec619ece7e0b9")
How it ran

no invocation recorded.

ExtendedDataClassMixin Not yet run
unverified (harvested, no recorded run)
nyu-mll/jiant/jiant/proj/main/modeling/primary.py
code served (permissive licence) · get_code("352497b6c2e47e4c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 6 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
metadata_collate_fn
brick of this paper's assembly: helper
4 other papers
1 dated earlier, 3 later
1804.07461 (2018-04)
GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding
2010.04762 (2020-10)
Counterfactually-Augmented SNLI Training Data Does Not Yield Better Generalization Than Unaugmented Data
2112.01753 (2021-12)
Probing Linguistic Information For Logical Inference In Pre-trained Language Models
and 1 more not named here
flat_collate_fn
brick of this paper's assembly: helper
3 other papers
1 dated earlier, 2 later
1804.07461 (2018-04)
GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding
2112.01753 (2021-12)
Probing Linguistic Information For Logical Inference In Pre-trained Language Models
2404.02827 (2024-04)
BAdam: A Memory Efficient Full Parameter Optimization Method for Large Language Models

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

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

Abstract

We introduce jiant, an open source toolkit for conducting multitask and transfer learning experiments on English NLU tasks. jiant enables modular and configuration-driven experimentation with state-of-the-art models and implements a broad set of tasks for probing, transfer learning, and multitask training experiments. jiant implements over 50 NLU tasks, including all GLUE and SuperGLUE benchmark tasks. We demonstrate that jiant reproduces published performance on a variety of tasks and models, including BERT and RoBERTa. jiant is available at https:// jiant.info. * Equal contribution. 1 The name jiant stands for "jiant is an NLP toolkit".

For agents

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

get_harvested_code_for_paper("2003.02249")
get_code_for_paper("2003.02249")
have("2003.02249")

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

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

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

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

Connect an agent — have() is free.