← Open Source
allenai

dont-stop-pretraining

Code associated with the Don't Stop Pretraining ACL 2020 paper.

Model DevelopmentFine-tuningPython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
545
Stars
72
Forks
+1
This week
2
Contributors
Created 2020-04-09 · Updated 2026-10-13 · #17321 today
Top developers
kernelmachineamarasovic

allenai/dont-stop-pretraining is ranked 17,321 with 545 stars.

Same-category comparison

allenai/dont-stop-pretraining is ranked 17,321 among these 8 peers; akanimax/T2F is ranked 17,320.

Same-category comparison
NameRankMetrics
PaddlePaddle/PaddleTS17,315
Language:
Python
Stars:
545
Forks:
124
Description:
Awesome Easy-to-Use Deep Time Series Modeling based on PaddlePaddle, including comprehensive functionality modules like TSDataset, Analysis, Transform, Models, AutoTS, and Ensemble, etc., supporting versatile tasks like time series forecasting, representation learning, and anomaly detection, etc., featured with quick tracking of SOTA deep models.
RLHFlow/Online-RLHF17,316
Language:
Python
Stars:
545
Forks:
48
Description:
A recipe for online RLHF and online iterative DPO.
Sohl-Dickstein/Diffusion-Probabilistic-Models17,319
Language:
Python
Stars:
545
Forks:
83
Description:
Reference implementation for Deep Unsupervised Learning using Nonequilibrium Thermodynamics.
akanimax/T2F17,320
Language:
Python
Stars:
545
Forks:
95
Description:
T2F: text to face generation using Deep Learning.
facebookresearch/odin17,324
Language:
Python
Stars:
545
Forks:
103
Description:
A simple and effective method for detecting out-of-distribution images in neural networks.
rowanz/neural-motifs17,332
Language:
Python
Stars:
545
Forks:
116
Description:
Code for Neural Motifs: Scene Graph Parsing with Global Context (CVPR 2018).
Gen-Verse/ReasonFlux17,334
Language:
Python
Stars:
544
Forks:
39
JayYip/m3tl17,336
Language:
Jupyter Notebook
Stars:
544
Forks:
122
Description:
BERT for Multitask Learning.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryModel Development
SubcategoryFine-tuning
KeywordsResearch
Stars545
Forks72
Contributors2
Created date2020-04-09
Updated date2026-10-13
Stars in 1 day0
Stars in 7 days1
Rank17,321
Previous rank17,103
Rank change-218
7-day stars rank11,404
Previous 7-day stars rank11,469
7-day stars rank change65
Total stars rank18,108
Previous total stars rank18,076
Total stars rank change-32
CountryUSA
README summary

dont-stop-pretraining Code associated with the Don't Stop Pretraining ACL 2020 paper Citation Installation Working with the latest allennlp version This repository works with a pinned allennlp version for reproducibility purposes. This pinned version of allennlp relies on , which requires you to manually download custom transformer models on disk. To run this code with the latest / version (and use the huggingface model repository to its full capacity) checkout the branch . Caution that we haven't tested out all models on

this branch, so your results may vary from what we report in paper. If you'd like to use this pinned allennlp version, read on. Available Pretrained Models We've uploaded and models to huggingface. DAPT models Available models: TAPT models Available models: The final numbers in each model above are the dataset sizes. Downloading Pretrained models You can download a pretrained model using the script. Just supply a model type and serialization directory, like so: This will output the model for

Citation Intent corpus in Downloading data All task data is available on a public S3 url; check . If you run the command (see next step), we will automatically download the relevant dataset(s) using the URLs in . However, if you'd like to download the data for use outside of this repository, you will have to each dataset individually: Example commands Run basic RoBERTa model The following command will train a RoBERTa classifier on the Citation Intent corpus. Check for other

datasets you can pass to the flag. You can supply other downloaded models to this script, by providing a path to the model: Perform hyperparameter search First, install : Modify accordingly.

Frequently asked questions

How many stars and forks are recorded?

allenai/dont-stop-pretraining has 545 stars and 72 forks.

What is the repository rank?

allenai/dont-stop-pretraining is ranked 17,321.

What language and category are recorded?

allenai/dont-stop-pretraining has 545 stars, uses Python and belongs to Model Development.

Which repository is closest in rank?

allenai/dont-stop-pretraining is compared with akanimax/T2F, ranked 17,320 with 545 stars.

README

dont-stop-pretraining

Code associated with the Don't Stop Pretraining ACL 2020 paper

Citation

@inproceedings{dontstoppretraining2020,
 author = {Suchin Gururangan and Ana Marasović and Swabha Swayamdipta and Kyle Lo and Iz Beltagy and Doug Downey and Noah A. Smith},
 title = {Don't Stop Pretraining: Adapt Language Models to Domains and Tasks},
 year = {2020},
 booktitle = {Proceedings of ACL},
}

Installation

conda env create -f environment.yml
conda activate domains

Working with the latest allennlp version

This repository works with a pinned allennlp version for reproducibility purposes. This pinned version of allennlp relies on pytorch-transformers==1.2.0, which requires you to manually download custom transformer models on disk.

To run this code with the latest allennlp/ transformers version (and use the huggingface model repository to its full capacity) checkout the branch latest-allennlp. Caution that we haven't tested out all models on this branch, so your results may vary from what we report in paper.

If you'd like to use this pinned allennlp version, read on. Otherwise, checkout latest-allennlp.

Available Pretrained Models

We've uploaded DAPT and TAPT models to huggingface.

DAPT models

Available DAPT models:

allenai/cs_roberta_base
allenai/biomed_roberta_base
allenai/reviews_roberta_base
allenai/news_roberta_base

TAPT models

Available TAPT models:

allenai/dsp_roberta_base_dapt_news_tapt_ag_115K
allenai/dsp_roberta_base_tapt_ag_115K
allenai/dsp_roberta_base_dapt_reviews_tapt_amazon_helpfulness_115K
allenai/dsp_roberta_base_tapt_amazon_helpfulness_115K
allenai/dsp_roberta_base_dapt_biomed_tapt_chemprot_4169
allenai/dsp_roberta_base_tapt_chemprot_4169
allenai/dsp_roberta_base_dapt_cs_tapt_citation_intent_1688
allenai/dsp_roberta_base_tapt_citation_intent_1688
allenai/dsp_roberta_base_dapt_news_tapt_hyperpartisan_news_5015
allenai/dsp_roberta_base_dapt_news_tapt_hyperpartisan_news_515
allenai/dsp_roberta_base_tapt_hyperpartisan_news_5015
allenai/dsp_roberta_base_tapt_hyperpartisan_news_515
allenai/dsp_roberta_base_dapt_reviews_tapt_imdb_20000
allenai/dsp_roberta_base_dapt_reviews_tapt_imdb_70000
allenai/dsp_roberta_base_tapt_imdb_20000
allenai/dsp_roberta_base_tapt_imdb_70000
allenai/dsp_roberta_base_dapt_biomed_tapt_rct_180K
allenai/dsp_roberta_base_tapt_rct_180K
allenai/dsp_roberta_base_dapt_biomed_tapt_rct_500
allenai/dsp_roberta_base_tapt_rct_500
allenai/dsp_roberta_base_dapt_cs_tapt_sciie_3219
allenai/dsp_roberta_base_tapt_sciie_3219

The final numbers in each model above are the dataset sizes. Larger dataset sizes (e.g. imdb_70000 vs. imdb_20000) are curated TAPT models. These only exist for imdb, rct, and hyperpartisan_news.

Downloading Pretrained models

You can download a pretrained model using the scripts/download_model.py script.

Just supply a model type and serialization directory, like so:

python -m scripts.download_model \
        --model allenai/dsp_roberta_base_dapt_cs_tapt_citation_intent_1688 \
        --serialization_dir $(pwd)/pretrained_models/dsp_roberta_base_dapt_cs_tapt_citation_intent_1688

This will output the allenai/dsp_roberta_base_dapt_cs_tapt_citation_intent_1688 model for Citation Intent corpus in $(pwd)/pretrained_models/dsp_roberta_base_dapt_cs_tapt_citation_intent_1688

Downloading data

All task data is available on a public S3 url; check environments/datasets.py.

If you run the scripts/train.py command (see next step), we will automatically download the relevant dataset(s) using the URLs in environments/datasets.py. However, if you'd like to download the data for use outside of this repository, you will have to curl each dataset individually:

curl -Lo train.jsonl https://allennlp.s3-us-west-2.amazonaws.com/dont_stop_pretraining/data/chemprot/train.jsonl
curl -Lo dev.jsonl https://allennlp.s3-us-west-2.amazonaws.com/dont_stop_pretraining/data/chemprot/dev.jsonl
curl -Lo test.jsonl https://allennlp.s3-us-west-2.amazonaws.com/dont_stop_pretraining/data/chemprot/test.jsonl

Example commands

Run basic RoBERTa model

The following command will train a RoBERTa classifier on the Citation Intent corpus. Check environments/datasets.py for other datasets you can pass to the --dataset flag.

python -m scripts.train \
        --config training_config/classifier.jsonnet \
        --serialization_dir model_logs/citation_intent_base \
        --hyperparameters ROBERTA_CLASSIFIER_SMALL \
        --dataset citation_intent \
        --model roberta-base \
        --device 0 \
        --perf +f1 \
        --evaluate_on_test

You can supply other downloaded models to this script, by providing a path to the model:

python -m scripts.train \
        --config training_config/classifier.jsonnet \
        --serialization_dir model_logs/citation-intent-dapt-dapt \
        --hyperparameters ROBERTA_CLASSIFIER_SMALL \
        --dataset citation_intent \
        --model $(pwd)/pretrained_models/dsp_roberta_base_dapt_cs_tapt_citation_intent_1688 \
        --device 0 \
        --perf +f1 \
        --evaluate_on_test

Perform hyperparameter search

First, install allentune: https://github.com/allenai/allentune

Modify search_space/classifier.jsonnet accordingly.

Then run:

allentune search \
            --experiment-name ag_search \
            --num-cpus 56 \
            --num-gpus 4 \
            --search-space search_space/classifier.jsonnet \
            --num-samples 100 \
            --base-config training_config/classifier.jsonnet  \
            --include-package dont_stop_pretraining

Modify --num-gpus and --num-samples accordingly.

Nearby in the ranking
Similar items