Model Pipeline - N-gram language models
An N-gram language model predicts the next word in a sentence by looking at the previous N-1 words. It learns from text data by counting word sequences and uses these counts to guess what comes next.
An N-gram language model predicts the next word in a sentence by looking at the previous N-1 words. It learns from text data by counting word sequences and uses these counts to guess what comes next.
5.0 |*****
4.0 |****
3.0 |***
2.0 |**
1.0 |*
+-----
1 2 3 4 5 Epochs
| Epoch | Loss ↓ | Accuracy ↑ | Observation |
|---|---|---|---|
| 1 | 5.0 | 0.10 | Initial model with random-like predictions |
| 2 | 3.8 | 0.25 | Model starts learning common word sequences |
| 3 | 2.9 | 0.40 | Better prediction of next words |
| 4 | 2.3 | 0.55 | Model captures frequent N-grams well |
| 5 | 1.9 | 0.65 | Converging with improved next word guesses |