TopGit
GitHub Repo Review

makemore character-level language model guide

karpathy/makemore
MTopGit review image for karpathy/makemore
Review by Topgit.dev for karpathy/makemore, with GitHub repository stats and README context.
Quick verdict

makemore is a small Python command-line program for learning how autoregressive character models generate new text from examples. It is worth using for education and experimentation because one script exposes bigram, neural-network, and Transformer approaches without packaging overhead. Skip it when you need a maintained library, pretrained models, or production-serving features.

Stars
โ˜… 4.5k
Forks
โ‘‚ 1.1k
Contributors
๐Ÿ‘ฅ 2
Language
Python
License
MIT
Topic
โ€”
Updated
Jun 2024
Homepage
โ€”

A minimal character-level language model

makemore is a Python command-line program that learns an autoregressive character-level language model from a plain text file. Each line becomes a training item, and the learned model generates name-like or word-like strings. It is a deliberately compact teaching codebase, not a production text service.

Supported model architectures

  • โœ“The model choices span bigram, MLP, RNN, LSTM, GRU, and Transformer architectures.
  • โœ“Character-level modeling generates each next token one character at a time rather than starting from whole words.
  • โœ“A CNN implementation is included but remains marked as in progress in the README.
  • โœ“PyTorch is the only stated software requirement.
  • โœ“The default configuration uses a small 200K-parameter Transformer.
  • โœ“Training progress and generated samples are printed while the model is learning.
  • โœ“Saved logs and model files are written to the output directory.
  • โœ“The included names.txt file provides a ready-made example corpus.
How this repository's GitHub stars have grown over time. Source: star-history.com.View the star history โ†—

Training and sampling names

Train with one item per line in the input file: bash python makemore.py -i names.txt -o names Training progress, logs, and the model are written to the `names` directory. Samples appear during training. To load the best saved model and request more output, run this in another terminal: bash python makemore.py -i names.txt -o names --sample-only Then sample again.

Strengths

  • โœ“The one-file design keeps the complete training and sampling workflow close enough to read in one sitting.
  • โœ“PyTorch is the only stated dependency, and a GPU is optional rather than mandatory.
  • โœ“Architecture choices make it possible to compare a simple bigram with MLP, recurrent, convolutional, and Transformer approaches.
  • โœ“Samples are visible during training, while the saved best model can generate more output later.
  • โœ“MIT licensing gives users broad permission to study, modify, and reuse the code.
  • โœ“The included name dataset makes the basic command usable without preparing an external corpus first.

Designed for learning, not production

  • โ–ณThe project is explicitly designed for education, so it omits the packaging, controls, and production behavior expected from a maintained library.
  • โ–ณCharacter-level generation works from line-separated examples; it is not intended to model rich document structure or long prose formatting.
  • โ–ณThe CNN model is still described as being implemented in progress.
  • โ–ณGeneration quality depends on the training corpus and hyperparameters, so useful results may require tuning the available settings.
  • โ–ณThere is no documented API, service layer, or deployment workflow.

Choosing a model architecture

Frequently asked questions

Is makemore a library or a command-line program?

makemore is a command-line program, not a library meant for import into another application. The README describes it as one hackable file, with PyTorch as its only stated requirement.

What model architectures does makemore implement?

makemore includes bigram, MLP, CNN, RNN, LSTM, GRU, and Transformer architectures. The README marks the CNN implementation as still in progress, while the other listed models describe the intended range from count tables to GPT-style modeling.

How do I generate new names with makemore?

Provide a text file containing one name per line, then run `python makemore.py -i names.txt -o names`. Training prints generated candidates and writes the model, logs, and progress into the `names` output directory.

How do I load the best saved model and request more samples?

Run `python makemore.py -i names.txt -o names --sample-only` from the project directory. The command loads the best model saved so far and prints additional samples on demand.

Does makemore require a GPU to train?

No. makemore can train on ordinary hardware without special acceleration, although the README notes that a GPU will make training faster.

Can makemore be used commercially?

Yes. makemore is distributed under the MIT license, which permits commercial use subject to the license terms. The code is compact and educational, so production suitability still depends on your own testing and deployment needs.

Best use cases

  • โ€ขTurn a collection of names into new name candidates while learning how autoregressive generation works at character level.
  • โ€ขExplore the differences between bigram, MLP, RNN, LSTM, GRU, and Transformer training approaches through source code that users can modify.
  • โ€ขGenerate company-name ideas from a line-based list of existing company names.
  • โ€ขCreate English-like babble from a list of valid Scrabble words.
  • โ€ขTeach neural-network language modeling with examples that progress from character counts to a GPT-style Transformer.

How to install / try

Install from the repository source. The README does not document a package-manager installation command; it states that PyTorch is the only requirement. Clone the repository, ensure PyTorch is available in the Python environment, then run `python makemore.py` from the project directory.

Who should try it โ€” and who should skip

Try makemore if you are learning autoregressive modeling, want a readable PyTorch implementation across several architectures, or need a quick experiment with name and word generation. Skip it if you need pretrained models, stable APIs, scalable text generation, or production support.

Source & attribution

Based on the GitHub repository karpathy/makemore at https://github.com/karpathy/makemore and its README.

GitHub data ยท last synced Oct 25, 2026Reviewed by Henry
โ† Back to TopGit

Is makemore worth your time?

ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of makemore.

GitHub