# karpathy/makemore

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/karpathy-makemore).**

3,672 stars · 917 forks · Python · mit

## Links

- GitHub: https://github.com/karpathy/makemore
- awesome-repositories: https://awesome-repositories.com/repository/karpathy-makemore.md

## Description

makemore is a character-level language model and text generation engine. It serves as an educational implementation of the architecture and training processes used in large language models, built as a neural network using the PyTorch framework.

The system demonstrates sequence prediction by learning the probability distributions of characters within a dataset to generate novel text strings. It implements this through a progression of techniques, including n-gram probability modeling and the use of automatic differentiation for weight optimization.

The project covers the full machine learning lifecycle for sequence prediction, from processing text corpora during model training to producing output via probabilistic sampling. This includes the application of softmax normalization and multinomial sampling to convert model outputs into predictable character sequences.

## Tags

### Artificial Intelligence & ML

- [Character-Level Models](https://awesome-repositories.com/f/artificial-intelligence-ml/sequence-modeling/character-level-models.md) — Trains a model to predict the next character in a sequence to generate text mimicking a specific dataset.
- [Generative Model Sampling](https://awesome-repositories.com/f/artificial-intelligence-ml/inference-sampling-strategies/reproducible-sampling/probabilistic-generative-sampling/distribution-based-sampling/generative-model-sampling.md) — Generates novel text by sampling from the learned probability distributions of a trained model.
- [N-Gram Co-occurrence Models](https://awesome-repositories.com/f/artificial-intelligence-ml/natural-language-processing/word-embeddings/skip-gram-model-architectures/n-gram-co-occurrence-models.md) — Implements n-gram modeling to calculate the likelihood of subsequent characters based on preceding sequences.
- [Gradient Descent Algorithms](https://awesome-repositories.com/f/artificial-intelligence-ml/optimization-algorithms/gradient-descent-algorithms.md) — Optimizes model weights via gradient descent and automatic differentiation to minimize cross-entropy loss.
- [Neural Network Implementations](https://awesome-repositories.com/f/artificial-intelligence-ml/pytorch-training-frameworks/neural-network-implementations.md) — Builds a character-level neural network using the PyTorch framework for sequence prediction.
- [Autoregressive Text Generation](https://awesome-repositories.com/f/artificial-intelligence-ml/sequence-generation/autoregressive-text-generation.md) — Creates new character sequences by autoregressively predicting subsequent characters based on training patterns. ([source](https://github.com/karpathy/makemore#readme))
- [Text Generation Engines](https://awesome-repositories.com/f/artificial-intelligence-ml/text-generation-engines.md) — Provides an engine that generates novel character strings based on learned probability distributions.
- [Text Model Training](https://awesome-repositories.com/f/artificial-intelligence-ml/text-model-training.md) — Processes text corpora to build predictive models by learning character-level probability distributions. ([source](https://github.com/karpathy/makemore#readme))
- [Bigram Frequency Tables](https://awesome-repositories.com/f/artificial-intelligence-ml/bigram-frequency-tables.md) — Implements a lookup table to track character pairs and determine the statistical probability of transitions.

### Education & Learning Resources

- [LLM Education](https://awesome-repositories.com/f/education-learning-resources/llm-education.md) — Provides a step-by-step educational implementation of the architecture and training processes used in LLMs.

### Scientific & Mathematical Computing

- [Multinomial Samplers](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/statistics-probability/probability-distributions/multinomial-samplers.md) — Generates text by drawing characters from a probability distribution using multinomial sampling.
- [Softmax Normalization](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/statistics-probability/probability-distributions/softmax-normalization.md) — Converts raw model outputs into normalized probability distributions using the softmax function.
- [Maximum Likelihood Estimators](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/statistics-probability/statistical-estimation/maximum-likelihood-estimators.md) — Uses maximum likelihood estimation to calculate model parameters by optimizing based on observed training data.
