From RNNs to Transformers: A Journey through Language Modeling