SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2004.10964 · Annual Meeting of the Association for Computational Linguistics · 2020

Don't Stop Pretraining: Adapt Language Models to Domains and Tasks

Swabha Swayamdipta, Ana Marasović, Kyle Lo, Iz Beltagy, Suchin Gururangan, Doug Downey, Noah A. Smith

arXiv · PDF · Open in the Atlas

Code that ran

13 of 14 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 3 have no contract verdict; 9 failures of our instrument; 1 no recorded run); 2 of them were also run on the host, not in the jail, by the peer-agreement lane that set their level, measured 2026-11-21; 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/2004.10964.json · badge: /api/ran/2004.10964.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
shizhediao/t-dna community (classifier label)
classifier basis not recorded on the link
11 ran · 1 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
SUSTechBruce/G-MAP reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
swish Ran
ran; our contract draft was wrong, not the code
shizhediao/t-dna/TDNA/util.py
code served (permissive licence) · get_code("0f786c407fb1ee4c")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T22:33:52Z). If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function swish takes a single parameter 'x' which is used with:
# - torch.sigmoid(x) - requires a tensor
# - x * ... - requires a tensor that supports multiplication
# So x should be a tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
to_list Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from AI-secure/InfoBERT
pointer only; the stored copy get_code serves, from AI-secure/InfoBERT, is pointer only (licence: NONE) · get_code("9df40357afea56cc")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

default_compute_objective Ran
ran on a synthesized input
shizhediao/t-dna/TDNA/trainer.py
code served (permissive licence) · get_code("ada7a524687a5b73")
How it ran

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

import torch

torch.manual_seed(0)

ARGS = {
    "metrics": {
        "eval_loss": 0.5,
        "accuracy": 0.95,
        "f1_score": 0.92
    }
}
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 float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_pruneable_heads_and_indices Ran
ran; our contract draft was wrong, not the code
shizhediao/t-dna/TDNA/modeling.py
code served (permissive licence) · get_code("1b4bc5e6ef0e9288")
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

torch.manual_seed(0)

ARGS = {
    "heads": [0, 2, 4],
    "n_heads": 8,
    "head_size": 64,
    "already_pruned_heads": {1, 3}
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
gelu_new Ran
ran; our contract draft was wrong, not the code
shizhediao/t-dna/TDNA/util.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ypw0102/gdr, is pointer only (licence: NONE) · get_code("aef07bb1e2787431")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ypw0102/gdr, and GitHub detected no licence in that repository 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.

get_constant_schedule Ran
ran; our contract draft was wrong, not the code
shizhediao/t-dna/TDNA/optimization.py
code served (permissive licence) · get_code("0cfd32e6d6d4419a")
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 LambdaLR. 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 torch.optim import SGD

torch.manual_seed(0)

# Create a minimal model
model = nn.Linear(4, 3)

# Create an optimizer
optimizer = SGD(model.parameters(), lr=0.01)

# Define arguments for get_constant_schedule
ARGS = {
    "optimizer": optimizer,
    "last_epoch": -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 LambdaLR — a LambdaLR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LambdaLR 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_constant_schedule_with_warmup Ran
ran; our contract draft was wrong, not the code
shizhediao/t-dna/TDNA/optimization.py
code served (permissive licence) · get_code("2eeaa920a743dccc")
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 LambdaLR. 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 torch.optim import SGD

torch.manual_seed(0)

# Create a minimal model
model = nn.Linear(4, 3)

# Create an optimizer
optimizer = SGD(model.parameters(), lr=0.1)

# Define arguments for get_constant_schedule_with_warmup
ARGS = {
    'optimizer': optimizer,
    'num_warmup_steps': 100,
    'last_epoch': -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 LambdaLR — a LambdaLR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LambdaLR 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_linear_schedule_with_warmup Ran
ran; our contract draft was wrong, not the code
shizhediao/t-dna/TDNA/optimization.py
code served (permissive licence) · get_code("5bf56e40b4301199")
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 LambdaLR. 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 torch.optim import SGD

torch.manual_seed(0)

# Create a simple model
model = nn.Linear(4, 3)

# Create an optimizer
optimizer = SGD(model.parameters(), lr=0.1)

# Define schedule parameters
num_warmup_steps = 100
num_training_steps = 1000
last_epoch = -1

ARGS = {
    "optimizer": optimizer,
    "num_warmup_steps": num_warmup_steps,
    "num_training_steps": num_training_steps,
    "last_epoch": last_epoch,
}
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 LambdaLR — a LambdaLR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LambdaLR 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_pairs Ran
ran; our contract draft was wrong, not the code
shizhediao/t-dna/TDNA/tokenization.py
code served (permissive licence) · get_code("b50994ad24f6d583")
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 set. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

def get_pairs(word):
    pairs = set()
    prev_char = word[0]
    for char in word[1:]:
        pairs.add((prev_char, char))
        prev_char = char
    return pairs

ARGS = {
    "word": "hello"
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
hf_bucket_url Ran
ran on a synthesized input
shizhediao/t-dna/TDNA/modeling.py
code served (permissive licence) · get_code("3cbbdc1cef27d05d")
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.

ARGS = {
    'model_id': 'bert-base-uncased',
    'filename': 'pytorch_model.bin',
    'use_cdn': True,
    'mirror': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_remote_url Ran
ran, violated the contract we drafted
shizhediao/t-dna/TDNA/modeling.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from vis-nlp/ChartQA, is pointer only (licence: GPL-3.0) · get_code("899d1e2736236351")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from vis-nlp/ChartQA, and GPL-3.0, as GitHub detects it on that repository, 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.

nested_concat Ran
ran on a synthesized input
shizhediao/t-dna/TDNA/trainer.py
code served (permissive licence) · get_code("8c6f5dccbea60d03")
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

torch.manual_seed(0)

# Test case 1: nested tensors as tuple
tensors = (
    torch.randn(2, 4),
    torch.randn(2, 3)
)
new_tensors = (
    torch.randn(2, 4),
    torch.randn(2, 3)
)
dim = 0

ARGS = {
    "tensors": tensors,
    "new_tensors": new_tensors,
    "dim": dim
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
set_output_dir Ran
ran; our contract draft was wrong, not the code
SUSTechBruce/G-MAP/domain_qa_ner/mem_roberta/run_finetune_qa_medication.py
code served (permissive licence) · get_code("bbc63fe66d3ee4d0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) 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 datetime

class Args:
    def __init__(self):
        self.loc_layer = "layer_5"
        self.domain = "squad"
        self.seed = 42

args = Args()

ARGS = {"args": args}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_logger Not yet run
unverified (harvested, no recorded run)
shizhediao/t-dna/TDNA/util.py
code served (permissive licence) · get_code("925a37d315d717fb")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 10 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 1 the same month, 10 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_pairs 258 other papers
9 dated earlier, 248 later, 1 undated · 4 only as an assembly brick
1802.06474 (2018-02)
A Closed-form Solution to Photorealistic Image Stylization
1803.01128 (2018-03)
Seq2Sick: Evaluating the Robustness of Sequence-to-Sequence Models with Adversarial Examples
1809.00125 (2018-09)
Simple Fusion: Return of the Language Model
and 255 more not named here
swish 206 other papers
28 dated earlier, 6 the same month, 171 later, 1 same year, order not determinable · 44 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1805.12114 (2018-05)
Deep Reinforcement Learning in a Handful of Trials using Probabilistic Dynamics Models
1809.01357 (2018-09)
Zero Shot Learning for Code Education: Rubric Sampling with Deep Learning Inference
and 203 more not named here
to_list 41 other papers
4 dated earlier, 37 later
1902.01718 (2019-02)
End-to-End Open-Domain Question Answering with BERTserini
1910.06188 (2019-10)
Q8BERT: Quantized 8Bit BERT
1911.02984 (2019-11)
The TechQA Dataset
and 38 more not named here
gelu_new 24 other papers
24 later
2104.08066 (2021-04)
Effect of Visual Extensions on Natural Language Understanding in Vision-and-Language Models
2104.08400 (2021-04)
Structure-Aware Abstractive Conversation Summarization via Discourse and Action Graphs
2106.00420 (2021-06)
Dialogue-oriented Pre-training
and 21 more not named here
get_linear_schedule_with_warmup 21 other papers
21 later
2011.07430 (2020-11)
Audio-Visual Event Recognition through the lens of Adversary
2109.04912 (2021-09)
ReasonBERT: Pre-trained to Reason with Distant Supervision
2203.12122 (2022-03)
On Adversarial Robustness of Large-scale Audio Visual Learning
and 18 more not named here
is_remote_url 14 other papers
2 dated earlier, 12 later
1905.00641 (2019-05)
RetinaFace: Single-stage Dense Face Localisation in the Wild
1910.13461 (2019-10)
BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension
2104.08066 (2021-04)
Effect of Visual Extensions on Natural Language Understanding in Vision-and-Language Models
and 11 more not named here
get_constant_schedule 13 other papers
13 later
2204.13902 (2022-04)
Fast Sampling of Diffusion Models with Exponential Integrator
2305.15328 (2023-05)
Visual Programming for Text-to-Image Generation and Evaluation
2306.08553 (2023-06)
Noise Stability Optimization for Finding Flat Minima: A Hessian-based Regularization Approach
and 10 more not named here
get_constant_schedule_with_warmup 13 other papers
13 later
2204.13902 (2022-04)
Fast Sampling of Diffusion Models with Exponential Integrator
2305.15328 (2023-05)
Visual Programming for Text-to-Image Generation and Evaluation
2306.08276 (2023-06)
TryOnDiffusion: A Tale of Two UNets
and 10 more not named here
get_logger 12 other papers
12 later
2305.01938 (2023-05)
Doc2SoarGraph: Discrete Reasoning over Visually-Rich Table-Text Documents via Semantic-Oriented Hierarchical Graphs
2406.05478 (2024-06)
Revisiting Non-Autoregressive Transformers for Efficient Image Synthesis
2410.01679 (2024-10)
VinePPO: Refining Credit Assignment in RL Training of LLMs
and 9 more not named here
find_pruneable_heads_and_indices 11 other papers
11 later
2021.emnlp-main.154 (2021 (year only))
Reconstruction Attack on Instance Encoding for Language Understanding
2104.08066 (2021-04)
Effect of Visual Extensions on Natural Language Understanding in Vision-and-Language Models
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 8 more not named here

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

Repositories linked to this paper

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

Abstract

Language models pretrained on text from a wide variety of sources form the foundation of today’s NLP. In light of the success of these broad-coverage models, we investigate whether it is still helpful to tailor a pretrained model to the domain of a target task. We present a study across four domains (biomedical and computer science publications, news, and reviews) and eight classification tasks, showing that a second phase of pretraining in-domain (domain-adaptive pretraining) leads to performance gains, under both high- and low-resource settings. Moreover, adapting to the task’s unlabeled data (task-adaptive pretraining) improves performance even after domain-adaptive pretraining. Finally, we show that adapting to a task corpus augmented using simple data selection strategies is an effective alternative, especially when resources for domain-adaptive pretraining might be unavailable. Overall, we consistently find that multi-phase adaptive pretraining offers large gains in task performance.

For agents

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

get_harvested_code_for_paper("2004.10964")
get_code_for_paper("2004.10964")
have("2004.10964")

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

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

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

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

Connect an agent — have() is free.