Home Projects minbpe
minbpe
Python

minbpe

Minimal, clean code for the Byte Pair Encoding (BPE) algorithm commonly used in LLM tokenization.

by karpathy · GitHub
Stars
Forks
License
Created
Last commit
Language
MITPython
View on GitHub
In plain words

Use simple code to convert text into tokens for processing in language models.

You maintain this project?

Claim its page: indexed whatever its rank, translated into six languages, and enriched with what you write yourself.

Claim this page →
minbpe — GitHub preview card
📈 Star history
10.7k10.6k
2026-07-122026-08-31
📈 Track minbpe

Get an email alert on its next release or when it starts trending — never miss the moment.

Free · no card · unsubscribe anytime
Get email alerts →
📄 About

Minimal, clean code for the Byte Pair Encoding (BPE) algorithm commonly used in LLM tokenization.

minbpe has 10.7k stars on GitHub. It has been forked 1.1k times. minbpe is written mainly in Python. It has been in active development since 2024. minbpe is available under the MIT license.

Frequently asked questions

What is minbpe?

Minimal, clean code for the Byte Pair Encoding (BPE) algorithm commonly used in LLM tokenization.

Is minbpe open source?

minbpe is an open-source project. It is released under the MIT license.

Is minbpe free?

Yes. minbpe is free and open source — you can use, modify and self-host it.

What license does minbpe use?

minbpe is available under the MIT license.

What language is minbpe written in?

minbpe is written mainly in Python.

🏅 Maintainer of this project?
olud.ai badge — minbpe

Add this live badge to your README — your GitHub stars and directory rank, refreshed daily.

[![olud.ai](https://olud.ai/badge.php?tool=karpathy-minbpe)](https://olud.ai/project/karpathy-minbpe.html)
More badge options →
🧬 Related projects