GPT or BERT: why not both?
Lucas Georges Gabriel Charpentier, David Samuel

TL;DR
This paper introduces GPT-BERT, a hybrid transformer model combining masked and causal language modeling, demonstrating improved pretraining performance and flexibility for various NLP tasks.
Contribution
It presents a novel hybrid training objective that merges masked and causal language modeling within a single transformer, enabling versatile use and better performance.
Findings
Hybrid pretraining outperforms masked-only models
Hybrid pretraining outperforms causal-only models
Models and code are openly released
Abstract
We present a simple way to merge masked language modeling with causal language modeling. This hybrid training objective results in a model that combines the strengths of both modeling paradigms within a single transformer stack: GPT-BERT can be transparently used like any standard causal or masked language model. We test the pretraining process that enables this flexible behavior on the BabyLM Challenge 2024. The results show that the hybrid pretraining outperforms masked-only or causal-only models. We openly release the models, training corpora and code.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
- 🤗HPLT/hplt_gpt_bert_base_3_0_ltz_Latnmodel· 3 dl3 dl
- 🤗HPLT/hplt_gpt_bert_base_3_0_nno_Latnmodel
- 🤗HPLT/hplt_gpt_bert_base_3_0_mlt_Latnmodel· 8 dl8 dl
- 🤗HPLT/hplt_gpt_bert_base_3_0_gle_Latnmodel· 3 dl3 dl
- 🤗HPLT/hplt_gpt_bert_base_3_0_eng_Latnmodel· 12 dl12 dl
- 🤗HPLT/hplt_gpt_bert_base_3_0_bel_Cyrlmodel· 4 dl4 dl
- 🤗HPLT/hplt_gpt_bert_base_3_0_ukr_Cyrlmodel· 3 dl· ♡ 13 dl♡ 1
- 🤗HPLT/hplt_gpt_bert_base_3_0_cmn_Hansmodel· 1 dl1 dl
- 🤗HPLT/hplt_gpt_bert_base_3_0_vie_Latnmodel· 1 dl1 dl
- 🤗HPLT/hplt_gpt_bert_base_3_0_por_Latnmodel· 5 dl5 dl
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsHealth and Medical Research Impacts
