Model Card for GPT-BERT Mixed
2
26 commits
1 repos using this model
3 linked in READMEs
updated May 15, 2025
A 31M model trained on 100M (10M unique words) able to do both causal and masked inference.
This one of the three GPT-BERT baselines for the strict-small track of the 2025 BabyLM challenge. This specific model is trained with a equal number of examples being causal and masked.
This is a pre-trained language model. It can be used to evaluate tasks zero-shot in both a causal and masked setting. It can also be fine-tuned by adding a new head and dropping the language modeling head. It can be used for language generation but given its small size and low number of words trained on, do not expect LLM-level performance. It can also be used for mask infilling.
We used the BabyLM 10M (Strict-small) dataset to train the model. It is composed in the following way:
| Source | Weight | Domain | Citation | Website | License |
|---|---|---|---|---|---|
| BNC | 8% | Dialogue | BNC Consortium (2007) | link | link 1 |
| CHILDES | 29% | Dialogue, Child-Directed | MacWhinney (2000) | link | |
| Project Gutenberg | 26% | Fiction, Nonfiction | Gerlach & Font-Clos (2020) | link | link |
| OpenSubtitles | 20% | Dialogue, Scripted | Lison & Tiedermann (2016) | link | Open source |
| Simple English Wikipedia | 15% | Nonfiction | -- | link | link |
| Switchboard | 1% | Dialogue | Godfrey et al. (1992), Stolcke et al., (2000) | link | link |
1 Our distribution of part of the BNC Texts is permitted under the fair dealings provision of copyright law (see term (2g) in the BNC license).
| Hyperparameter | Value |
|---|---|
| % Causal Objective | 50.00% |
| % Masked Objective | 50.00% |
| Sequence Length | 128 β 512 |
| Batch Size (in tokens) | 16 384 |
| Learning Rate | 0.007 |
| Number of Steps | 9 914 |
| Warmup Ratio | 1.6% |
| Cooldown Ratio | 1.6% |
| Mask Ratio | 0.3 β 0.15 |
| Random Ratio | 0.1 |
| Keep Ratio | 0.1 |
| Weight Decay | 0.1 |
| Optimizer | LAMB |
| Optimizer Epsilon | 10-8 |
| Optimizer Beta_1 | 0.9 |
| Optimizer Beta_2 | 0.98 |
| Grdient Clipping | 2.0 |
| Z-Loss weight | 0.0001 |
During training we vary both the mask token percentage (linear decay from 30% to 15%), and the sequence length. For the sequence length we make sure to keep the total tokens per batch the same by reducing the batch size proportionally to the sequence length. We have three steps in the sequence length:
The model has 31M parameters. In total we train on around 100M words (or ten repetitions of the training set). We provide multiple checkpoints from the training. Specifically we provode:
This model is evaluated in three different fashions:
For the BLiMP, BLiMP supplement, and EWoK tasks, we use a filtered version of the dataset to only include examples with words found in the BabyLM dataset. For the Finetuning task, we both filter and sample down to a maximum 10 000 train examples.
Validation Data
1M words from the developement split of BabyLM. The evaluation is done using the Masked Next Token Prediction objective.
Zero-shot Tasks
Finetuning Tasks
2 https://www.quora.com/profile/Ricky-Riche-2/First-Quora-Dataset-Release-Question-Pairs
The metrics used to evaluate the model are the following:
The metrics were chosen based on the advice of the papers the tasks come from.
| Hyperparameter | MNLI, RTE, QQP, MRPC | BoolQ, MultiRC | WSC |
|---|---|---|---|
| Learning Rate | 3*10-5 | 3*10-5 | 3*10-5 |
| Batch Size | 32 | 16 | 32 |
| Epochs | 10 | 10 | 30 |
| Weight decay | 0.01 | 0.01 | 0.01 |
| Optimizer | AdamW | AdamW | AdamW |
| Scheduler | cosine | cosine | cosine |
| Warmup percentage | 6% | 6% | 6% |
| Dropout | 0.1 | 0.1 | 0.1 |
Validation (Loss)
Zero-shot
| Task | Metric | Causal Score | MNTP Score |
|---|---|---|---|
| BLiMP | Acc | 69.62 | 71.29 |
| BLiMP Supplement | Acc | 61.56 | 63.30 |
| EWoK | Acc | 50.23 | 49.93 |
| Eye Tracking | change in R^2 | 9.50 | 9.78 |
| Self-paced Reading | change in R^2 | 3.37 | 3.33 |
| Entity Tracking | Acc | 22.27 | 39.95 |
| WUGs | Acc | 45.00 | 16.00 |
Finetuning
| Task | Metric | Score |
|---|---|---|
| BoolQ | Acc | 66.67 |
| MNLI | Acc | 53.30 |
| MRPC | F1 | 84.56 |
| QQP | F1 | 76.56 |
| MultiRC | Acc | 67.04 |
| RTE | Acc | 55.40 |
| WSC | Acc | 63.46 |
The model architecture used is based on the GPT-BERT (Charpentier & Samuel, CoNLL-BabyLM 2024) architecture (based off the LTG-BERT (Samuel et al., Findings 2023) architecture). We train on two objectives Masked Next Token Prediction and Causal Language Modeling. During the training we had as many examples with the causal objective as the MNTP objective.
We use the LUMI supercomputer to train this model.
We acknowledge Norway for awarding this project access to the LUMI supercomputer, owned by the EuroHPC Joint Undertaking, hosted by CSC (Finland) and the LUMI consortium through Sigma2.
The computations were performed on resources provided by Sigma2 - the National Infrastructure for High-Performance Computing and Data Storage in Norway
PyTorch
The model took 40 minutes to train (which equates to 10.67 GPU-hours).
@misc{charpentier2025babylmturns3papers,
title={BabyLM Turns 3: Call for papers for the 2025 BabyLM workshop},
author={Lucas Charpentier and Leshem Choshen and Ryan Cotterell and Mustafa Omer Gul and Michael Hu and Jaap Jumelet and Tal Linzen and Jing Liu and Aaron Mueller and Candace Ross and Raj Sanjay Shah and Alex Warstadt and Ethan Wilcox and Adina Williams},
year={2025},
eprint={2502.10645},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2502.10645},
}
Lucas Georges Gabriel Charpentier
BERT or GPT: why not both? (Charpentier & Samuel, CoNLL-BabyLM 2024)
Trained on 100 million words and still in shape: BERT meets British National Corpus (Samuel et al., Findings 2023)
GLUE: A multi-task benchmark and analysis platform for natural language understanding (Wang et al., ICLR 2019)
SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systems (Wang et al., NeurIPS 2019)
BLiMP: The Benchmark of Linguistic Minimal Pairs for English (Warstadt et al., TACL 2020)
Findings of the BabyLM Challenge: Sample-Efficient Pretraining on Developmentally Plausible Corpora (Warstadt et al., CoNLL-BabyLM 2023)
π Elements of World Knowledge (EWoK): A cognition-inspired framework for evaluating basic world knowledge in language models (Ivanova et al., 2024)
Cloze probability, predictability ratings, and computational estimates for 205 English sentences, aligned with existing EEG and reading time data (de Varda et al., BRM 2024)
Entity Tracking in Language Models (Kim & Schuster, ACL 2023)
Derivational Morphology Reveals Analogical Generalization in Large Language Models (Hofmann et al., 2024)
Automatically Constructing a Corpus of Sentential Paraphrases (Dolan & Brockett, IJCNLP 2005)
A Broad-Coverage Challenge Corpus for Sentence Understanding through Inference (Williams et al., NAACL 2018)
The Winograd Schema Challenge (Levesque et al., PKRR 2012)
The PASCAL Recognising Textual Entailment Challenge (Dagan et al., Springer 2006)
The Second PASCAL Recognising Textual Entailment Challenge (Bar et al., 2006)
The Third PASCAL Recognizing Textual Entailment Challenge (Giampiccolo et al., 2007)
The Fifth PASCAL Recognizing Textual Entailment Challenge (Bentivogli et al., TAC 2009)
BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questions (Clark et al., NAACL 2019)
Looking Beyond the Surface: A Challenge Set for Reading Comprehension over Multiple Sentences (Khashabi et al., NAACL 2018)
Model Card for GPT-BERT Mixed
2
26 commits
1 repos using this model
3 linked in READMEs
updated May 15, 2025
A 31M model trained on 100M (10M unique words) able to do both causal and masked inference.
This one of the three GPT-BERT baselines for the strict-small track of the 2025 BabyLM challenge. This specific model is trained with a equal number of examples being causal and masked.
This is a pre-trained language model. It can be used to evaluate tasks zero-shot in both a causal and masked setting. It can also be fine-tuned by adding a new head and dropping the language modeling head. It can be used for language generation but given its small size and low number of words trained on, do not expect LLM-level performance. It can also be used for mask infilling.
We used the BabyLM 10M (Strict-small) dataset to train the model. It is composed in the following way:
| Source | Weight | Domain | Citation | Website | License |
|---|---|---|---|---|---|
| BNC | 8% | Dialogue | BNC Consortium (2007) | link | link 1 |
| CHILDES | 29% | Dialogue, Child-Directed | MacWhinney (2000) | link | |
| Project Gutenberg | 26% | Fiction, Nonfiction | Gerlach & Font-Clos (2020) | link | link |
| OpenSubtitles | 20% | Dialogue, Scripted | Lison & Tiedermann (2016) | link | Open source |
| Simple English Wikipedia | 15% | Nonfiction | -- | link | link |
| Switchboard | 1% | Dialogue | Godfrey et al. (1992), Stolcke et al., (2000) | link | link |
1 Our distribution of part of the BNC Texts is permitted under the fair dealings provision of copyright law (see term (2g) in the BNC license).
| Hyperparameter | Value |
|---|---|
| % Causal Objective | 50.00% |
| % Masked Objective | 50.00% |
| Sequence Length | 128 β 512 |
| Batch Size (in tokens) | 16 384 |
| Learning Rate | 0.007 |
| Number of Steps | 9 914 |
| Warmup Ratio | 1.6% |
| Cooldown Ratio | 1.6% |
| Mask Ratio | 0.3 β 0.15 |
| Random Ratio | 0.1 |
| Keep Ratio | 0.1 |
| Weight Decay | 0.1 |
| Optimizer | LAMB |
| Optimizer Epsilon | 10-8 |
| Optimizer Beta_1 | 0.9 |
| Optimizer Beta_2 | 0.98 |
| Grdient Clipping | 2.0 |
| Z-Loss weight | 0.0001 |
During training we vary both the mask token percentage (linear decay from 30% to 15%), and the sequence length. For the sequence length we make sure to keep the total tokens per batch the same by reducing the batch size proportionally to the sequence length. We have three steps in the sequence length:
The model has 31M parameters. In total we train on around 100M words (or ten repetitions of the training set). We provide multiple checkpoints from the training. Specifically we provode:
This model is evaluated in three different fashions:
For the BLiMP, BLiMP supplement, and EWoK tasks, we use a filtered version of the dataset to only include examples with words found in the BabyLM dataset. For the Finetuning task, we both filter and sample down to a maximum 10 000 train examples.
Validation Data
1M words from the developement split of BabyLM. The evaluation is done using the Masked Next Token Prediction objective.
Zero-shot Tasks
Finetuning Tasks
2 https://www.quora.com/profile/Ricky-Riche-2/First-Quora-Dataset-Release-Question-Pairs
The metrics used to evaluate the model are the following:
The metrics were chosen based on the advice of the papers the tasks come from.
| Hyperparameter | MNLI, RTE, QQP, MRPC | BoolQ, MultiRC | WSC |
|---|---|---|---|
| Learning Rate | 3*10-5 | 3*10-5 | 3*10-5 |
| Batch Size | 32 | 16 | 32 |
| Epochs | 10 | 10 | 30 |
| Weight decay | 0.01 | 0.01 | 0.01 |
| Optimizer | AdamW | AdamW | AdamW |
| Scheduler | cosine | cosine | cosine |
| Warmup percentage | 6% | 6% | 6% |
| Dropout | 0.1 | 0.1 | 0.1 |
Validation (Loss)
Zero-shot
| Task | Metric | Causal Score | MNTP Score |
|---|---|---|---|
| BLiMP | Acc | 69.62 | 71.29 |
| BLiMP Supplement | Acc | 61.56 | 63.30 |
| EWoK | Acc | 50.23 | 49.93 |
| Eye Tracking | change in R^2 | 9.50 | 9.78 |
| Self-paced Reading | change in R^2 | 3.37 | 3.33 |
| Entity Tracking | Acc | 22.27 | 39.95 |
| WUGs | Acc | 45.00 | 16.00 |
Finetuning
| Task | Metric | Score |
|---|---|---|
| BoolQ | Acc | 66.67 |
| MNLI | Acc | 53.30 |
| MRPC | F1 | 84.56 |
| QQP | F1 | 76.56 |
| MultiRC | Acc | 67.04 |
| RTE | Acc | 55.40 |
| WSC | Acc | 63.46 |
The model architecture used is based on the GPT-BERT (Charpentier & Samuel, CoNLL-BabyLM 2024) architecture (based off the LTG-BERT (Samuel et al., Findings 2023) architecture). We train on two objectives Masked Next Token Prediction and Causal Language Modeling. During the training we had as many examples with the causal objective as the MNTP objective.
We use the LUMI supercomputer to train this model.
We acknowledge Norway for awarding this project access to the LUMI supercomputer, owned by the EuroHPC Joint Undertaking, hosted by CSC (Finland) and the LUMI consortium through Sigma2.
The computations were performed on resources provided by Sigma2 - the National Infrastructure for High-Performance Computing and Data Storage in Norway
PyTorch
The model took 40 minutes to train (which equates to 10.67 GPU-hours).
@misc{charpentier2025babylmturns3papers,
title={BabyLM Turns 3: Call for papers for the 2025 BabyLM workshop},
author={Lucas Charpentier and Leshem Choshen and Ryan Cotterell and Mustafa Omer Gul and Michael Hu and Jaap Jumelet and Tal Linzen and Jing Liu and Aaron Mueller and Candace Ross and Raj Sanjay Shah and Alex Warstadt and Ethan Wilcox and Adina Williams},
year={2025},
eprint={2502.10645},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2502.10645},
}
Lucas Georges Gabriel Charpentier
BERT or GPT: why not both? (Charpentier & Samuel, CoNLL-BabyLM 2024)
Trained on 100 million words and still in shape: BERT meets British National Corpus (Samuel et al., Findings 2023)
GLUE: A multi-task benchmark and analysis platform for natural language understanding (Wang et al., ICLR 2019)
SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systems (Wang et al., NeurIPS 2019)
BLiMP: The Benchmark of Linguistic Minimal Pairs for English (Warstadt et al., TACL 2020)
Findings of the BabyLM Challenge: Sample-Efficient Pretraining on Developmentally Plausible Corpora (Warstadt et al., CoNLL-BabyLM 2023)
π Elements of World Knowledge (EWoK): A cognition-inspired framework for evaluating basic world knowledge in language models (Ivanova et al., 2024)
Cloze probability, predictability ratings, and computational estimates for 205 English sentences, aligned with existing EEG and reading time data (de Varda et al., BRM 2024)
Entity Tracking in Language Models (Kim & Schuster, ACL 2023)
Derivational Morphology Reveals Analogical Generalization in Large Language Models (Hofmann et al., 2024)
Automatically Constructing a Corpus of Sentential Paraphrases (Dolan & Brockett, IJCNLP 2005)
A Broad-Coverage Challenge Corpus for Sentence Understanding through Inference (Williams et al., NAACL 2018)
The Winograd Schema Challenge (Levesque et al., PKRR 2012)
The PASCAL Recognising Textual Entailment Challenge (Dagan et al., Springer 2006)
The Second PASCAL Recognising Textual Entailment Challenge (Bar et al., 2006)
The Third PASCAL Recognizing Textual Entailment Challenge (Giampiccolo et al., 2007)
The Fifth PASCAL Recognizing Textual Entailment Challenge (Bentivogli et al., TAC 2009)
BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questions (Clark et al., NAACL 2019)
Looking Beyond the Surface: A Challenge Set for Reading Comprehension over Multiple Sentences (Khashabi et al., NAACL 2018)