Unidirectional Models: Predicting the Next Word's Reign
Prior to BERT's bidirectional Masked Language Model, most pre-trained language models, including early GPT versions, relied on unidirectional training, predicting the next word in a sequence based only on preceding text, which limited their ability to capture full context.
The top 3
- RNNs: Pioneering Next-Word Prediction's Foundation: Recurrent Neural Networks (RNNs) revolutionized language modeling by enabling models to process sequential data and predict the next word, leveraging a hidden state to retain context from previous inputs. However, they struggled with learning long-term dependencies due to the vanishing gradient problem.
- LSTM: Solving RNN's Long-Term Memory Problem: Long Short-Term Memory (LSTM) networks, introduced in 1997, were a major advancement, overcoming RNNs' vanishing gradient problem through a sophisticated 'cell state' and 'gates' (input, forget, output). This allowed them to learn and remember information over much longer sequences, crucial for complex NLP tasks.
- GRU: The Efficient Alternative to LSTM: Gated Recurrent Units (GRUs), introduced in 2014, offered a simplified and more computationally efficient alternative to LSTMs. By combining the input and forget gates into a single 'update gate' and lacking a separate cell state, GRUs achieved comparable performance on many tasks, especially shorter sequences, with fewer parameters and faster training.
Sources
Open the full topic