mlsanityData to 7 Oct 2026

MiniGPT: Rebuilding GPT from First Principles

arXiv 2605.17398 ↗First posted 17 May 2026cs.CL cs.LGcited by 0

Not on the map. Why?

Abstract (arXiv)

This paper presents MiniGPT, a compact from-scratch implementation of GPT-style autoregressive language modeling in PyTorch. The aim is to rebuild the core GPT pipeline from first principles after studying the design of nanoGPT by Andrej Karpathy, while keeping the model and training code independently written in a single notebook. MiniGPT implements token and positional embeddings, causal multi-head self-attention, pre-LayerNorm Transformer blocks, residual connections, feed-forward MLP layers, next-token cross-entropy training (teacher forcing), validation tracking, checkpoint selection, and autoregressive text generation. This paper evaluates the implementation on Tiny Shakespeare dataset using character-level tokenization. A baseline 0.83M-parameter model reaches a validation loss of 1.7236 after 3000 training iterations. A stronger 10.77M-parameter configuration, using a larger context length and improved training settings, reaches a best validation loss of 1.4780 and generates text with recognizable Shakespeare-style dialogue structure. MiniGPT does not introduce a new language-model architecture. Instead, it documents a clear and reproducible implementation path from raw text to trained character-level generation, including design choices, training behavior, generation quality, and practical limitations.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 16 of its 31 references that are in the map. First posted on arXiv 17 May 2026.

Builds on

16 of 31 references.

References · 16

  1. 2017Attention Is All You Needcited by 59,932
  2. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
  5. 2020Scaling Laws for Neural Language Modelscited by 6,411
  6. 2016Layer Normalizationcited by 5,579
  7. 2016SGDR: Stochastic Gradient Descent with Warm Restartscited by 4,993
  8. 2016Gaussian Error Linear Units (GELUs)cited by 3,431
  9. 2022Training Compute-Optimal Large Language Modelscited by 2,927
  10. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
  11. 2019The Curious Case of Neural Text Degenerationcited by 2,881
  12. 2017Mixed Precision Trainingcited by 1,135
4 more
  1. 2020On Layer Normalization in the Transformer Architecturecited by 906
  2. 2014Deep Learning in Neural Networks: An Overviewcited by 765
  3. 2016Using the Output Embedding to Improve Language Modelscited by 266
  4. 2018Character-Level Language Modeling with Deeper Self-Attentioncited by 138

Built on by

Not cited yet.