about
GPT or BERT: why not both? (arxiv.org)
2 points by woadwarrior01 on Nov 14, 2024 | hide | past | pdf | discuss on HN

In plain words: One model is trained both to fill in hidden words and to predict the next word, so it can be used either way. This hybrid training beat training on just one of the two tasks.

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.

Lucas Georges Gabriel Charpentier, David Samuel
arXiv:2410.24159 · cs.CL · submitted Oct 31, 2024 · updated Dec 29, 2024
abstract · pdf · html · 22 pages; submission to the BabyLM Challenge 2024

add comment on HN