# karpathy/minbpe

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

Canonical: https://starboard.codevetter.com/explore/karpathy/minbpe

[Back to Discover](https://starboard.codevetter.com/discover)

![karpathy](https://avatars.githubusercontent.com/u/241138?v=4&s=40)

karpathy

# minbpe

[View on GitHub
](https://github.com/karpathy/minbpe)

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

11k stars

Python

Updated 21h ago

Created Feb 16, 2024

## Star history

\+568 stars
5\.4% growth


## Detected tools

No detected tools yet\.

## Similar projects

[![karpathy](https://avatars.githubusercontent.com/u/241138?v=4&s=24)

karpathy/ nanoGPT

The simplest, fastest repository for training/finetuning medium\-sized GPTs\.

Python 65k 67%](https://starboard.codevetter.com/explore/karpathy/nanoGPT)[![karpathy](https://avatars.githubusercontent.com/u/241138?v=4&s=24)

karpathy/ arxiv\-sanity\-preserver

Web interface for browsing, search and filtering recent arxiv submissions

Python 5\.8k 66%](https://starboard.codevetter.com/explore/karpathy/arxiv-sanity-preserver)[![huggingface](https://avatars.githubusercontent.com/u/25720743?v=4&s=24)

huggingface/ nanoVLM

The simplest, fastest repository for training/finetuning small\-sized VLMs\.

Python 5\.1k 65%](https://starboard.codevetter.com/explore/huggingface/nanoVLM)[![OpenCoder\-llm](https://avatars.githubusercontent.com/u/186387526?v=4&s=24)

OpenCoder\-llm/ OpenCoder\-llm

The Open Cookbook for Top\-Tier Code Large Language Model

Python 2\.1k 62%](https://starboard.codevetter.com/explore/OpenCoder-llm/OpenCoder-llm)[![sgl\-project](https://avatars.githubusercontent.com/u/147780389?v=4&s=24)

sgl\-project/ mini\-sglang

A compact implementation of SGLang, designed to demystify the complexities of modern LLM serving systems\.

Python 5\.6k 63%](https://starboard.codevetter.com/explore/sgl-project/mini-sglang)[![vyperlang](https://avatars.githubusercontent.com/u/57152025?v=4&s=24)

vyperlang/ vyper

Pythonic Smart Contract Language for the EVM

Python 5\.2k 63%](https://starboard.codevetter.com/explore/vyperlang/vyper)[![karpathy](https://avatars.githubusercontent.com/u/241138?v=4&s=24)

karpathy/ build\-nanogpt

Video\+code lecture on building nanoGPT from scratch

Python 5\.7k 63%](https://starboard.codevetter.com/explore/karpathy/build-nanogpt)[![stanfordnlp](https://avatars.githubusercontent.com/u/3046006?v=4&s=24)

stanfordnlp/ dspy

DSPy: The framework for programming—not prompting—language models

Python 39k 62%](https://starboard.codevetter.com/explore/stanfordnlp/dspy)
