Mojourney

ratulb / mbpe

mbpe — A BPE tokenizer engine in Mojo, generic over a compile-time pre-tokenizer. Trains vocabularies from scratch, reads/writes the standard .tiktoken format, and reproduces OpenAI's GPT-2/GPT-4/GPT-4o vocabularies byte-for-byte. Outperforms tiktoken-rs (Rust) on every benchmark.

GitHub ↗ · first seen in GH Archive 2026-07-26 (description / language) · 6,251 lines of Mojo in 20 files at the last of 191 commits (2026-07-23 to 2026-10-28)

Stars9as of 2026-11-23
Forks7as of 2026-11-23
Depends on0Mojo libraries, of 6 declared
Used by1census repos that depend on it
Second degree1more that depend on those
Open issues1
Watchers0
Created2026-07-264 months ago
Lines of Mojo6,25120 files
Commits1912026-07-23 to 2026-10-28
Contributors2commit authors, bots left out
Mojo version1.2.0from lock file
CategoryML and inferenceapproximate
Toolingpixi
Packagingrattler
LicenseMIT

Over time

2026-07-23 to 2026-10-28; peak 7,931 lines

Dependencies

Used by ratulb/tenmo.

Through those (second degree): ratulb/chargpt.

Declared in its manifests at HEAD (toolchain left out): gcc, pytest, pytest-cov, python, regex, tiktoken.

Similar repos

RepoDescriptionSimilarity
olaflaitinen/knapA byte level BPE tokenizer written from scratch in pure Mojo. Implements the seven encodings OpenAI models use, runs with no Python interpreter in the process, and publishes its evidence: 191.7 million tokens and every token id checked against the reference implementation.84%
ratulb/simple_bpeA simple BPE tokenizer implementation Mojo83%
mempirate/mojobagBPE tokenizer in Mojo81%
mikeleppane/mojo-tiktokenPure-Mojo rewrite of OpenAI's tiktoken - byte-level BPE with hand-compiled Unicode scanners instead of a regex engine, golden-tested byte-for-byte against the reference.80%
amarbaro/mojo-tokenizersHugging Face tokenizer.json runtime for Mojo: byte-level BPE (GPT-2, Llama 3, Qwen)79%

By the cosine of the embeddings of each repo's name, description and topics: bge-small-en-v1.5 at bbddccb7, from snapshot 3454761910736014829 of mojo.repo_embeddings, which mojo_embed writes.

Stars per month

Stars (WatchEvents) and forks per month in GH Archive, 2023-01 to 2026-10012023-012023-052023-092024-012024-052024-092025-012025-052025-092026-012026-052026-09
  • stars
  • forks

0 stars over the months of GH Archive loaded so far (47; months in between aren't loaded yet), counted from its events.

Contributors per month

People with a commit each month, and the ones with their first, 2026-07 to 2026-10022026-072026-082026-092026-10
  • contributors
  • new

2 people authored or co-authored its commits (every commit reachable from HEAD, Co-authored-by trailers included, bots left out), counted by email.

Releases and tags

DateTagNameFromMojo versionCommit
2026-07-27mbpe–git tag1.0.0d35dfb4b97

Issues and pull requests

1 open and 1 closed issues; 0 open, 9 merged and 0 closed pull requests, from GitHub by mojo_issues.

Open issues

#TitleUpdatedLabelsComments
11Mojo 1.2.0 detected (pinned 1.1.0) — migration needed2026-10-26 toolchain0

Pull requests

#TitleOpenedStateComments
10Benchmark image location and pypi release version automation2026-09-20merged0
8Build recipe with Mojo 1.1.02026-09-19merged0
7Migrate to Mojo 1.1.0; bump version to 0.1.102026-09-19merged0
6Integration2026-09-19merged0
5Integration2026-09-15merged0
4Zero-warning Mojo 1.0.0 sweep, public Tokenizer trait, refreshed benc…2026-09-10merged0
3Update tokenizer toolchain, benchmarks, and packaging metadata2026-09-09merged0
2Merge Integration2026-08-07merged0
1Merge housekeeping to main2026-08-06merged0

Migrations

DateWhatFromToCommit
2026-07-23mojo_version–1.0.071a98eda31
2026-07-23toolingnonepixi71a98eda31
2026-07-28packagingnonerattlerc224022e45
2026-09-19mojo_version1.0.01.1.055e168bbcc
2026-10-28mojo_version1.1.01.2.09d36bb2d58

Commits

Commit types: Feature 12% · Fix 8% · Mojo version 1% · Migration 2% · Refactor 14% · Performance 2% · Docs 27% · Tests 2% · Build and chores 10% · Merge 10% · Other 14%

DateCommitTypeSubjectLines of MojoToolingMojo version
2026-10-281e7aa381f3Build and choresBump version from 0.1.10 to 0.1.116,251pixi1.2.0
2026-10-289d36bb2d58MigrationMigrate to Mojo 1.2.06,251pixi1.2.0
2026-10-08ca06186383Refactor +docsRename stale simple_bpe strings to mbpe; refresh benchmark chart6,257pixi1.1.0
2026-09-228cef990adbDocsUpdate README.md6,257pixi1.1.0
2026-09-21925da3a01fMojo versionUpdate Mojo version to 1.1.0 in README6,257pixi1.1.0
2026-09-2138edafe0ceDocsUpdate introduction in UNICODE_EVENT_POINTS.md6,257pixi1.1.0
2026-09-215c2ad578c3DocsRevise README for clarity and improved descriptions6,257pixi1.1.0
2026-09-21e7b7f9b397DocsUpdate README for clarity and performance claims6,257pixi1.1.0
2026-09-2126688bf097DocsUpdate README.md6,257pixi1.1.0
2026-09-2067b2780654FeatureEnhance README with badges and description6,257pixi1.1.0
2026-09-20b0b62d20c0Merge +docsMerge pull request #10 from ratulb/integration6,257pixi1.1.0
2026-09-2028dcb27cd1Build and choresunpin stale mojo version in echo6,257pixi1.1.0
2026-09-20aeeaaeb3eeFixFix empty build number6,257pixi1.1.0
2026-09-20753c05a5bdBuild and choresIgnore legacy 25.* releases6,257pixi1.1.0
2026-09-2065f9ec5bedBuild and choresEmpty build.number fix6,257pixi1.1.0
2026-09-20c60a6085c9FeatureAdd toolchain-watch and release-train automation6,257pixi1.1.0
2026-09-193e1ed1c48cMergeMerge pull request #8 from ratulb/integration6,257pixi1.1.0
2026-09-1955e168bbccMergeMerge pull request #7 from ratulb/integration6,257pixi1.1.0
2026-09-19c90ada3b2aBuild and choresBump version from 0.1.8 to 0.1.96,257pixi1.0.0
2026-09-1942d586808bMerge +docsMerge pull request #6 from ratulb/integration6,257pixi1.0.0
2026-09-15b2da942764Build and choresBump version from 0.1.7 to 0.1.86,268pixi1.0.0
2026-09-150207f008e6Merge +docsMerge pull request #5 from ratulb/integration6,268pixi1.0.0
2026-09-129745ad535dRefactorRemove benchmarking tables from README6,268pixi1.0.0
2026-09-12deeb1b365dDocsBenchmark chart6,268pixi1.0.0
2026-09-10c0dde361dfBuild and choresPackaging: [package] + rattler-build backend so mbpe is consumable as a pixi source dependency6,268pixi1.0.0
2026-09-10713b54e83cMergeMerge pull request #4 from ratulb/integration6,268pixi1.0.0
2026-09-09e67c4ca3dfBuild and choresBump version from 0.1.6 to 0.1.76,229pixi1.0.0
2026-09-09a6ae5075a3MergeMerge pull request #3 from ratulb/integration6,229pixi1.0.0
2026-08-09df8c710012DocsUpdate PyPI badge to include SVG format6,220pixi1.0.0
2026-08-096f88548cbbBuild and choresBump version from 0.1.5 to 0.1.66,220pixi1.0.0
2026-08-07c2c3868818RefactorClean up README by removing duplicate discovery line6,220pixi1.0.0
2026-08-0798c5710401FeatureAdd benchmarks section to README6,220pixi1.0.0
2026-08-074b3a3fed26MergeMerge pull request #2 from ratulb/integration6,220pixi1.0.0
2026-08-06606509737cDocsRefresh benchmark tables and replace support callout with star5,823pixi1.0.0
2026-08-06bc47e0b071RefactorSimplify support request in README5,823pixi1.0.0
2026-08-0650df7c930bDocsUpdate README.md5,823pixi1.0.0
2026-08-0632c748d202MergeMerge pull request #1 from ratulb/housekeeping5,823pixi1.0.0
2026-08-065d4e84138cRefactorRemove obsolete GPreTokenizer removal note from README7,585pixi1.0.0
2026-08-0698e1eee616MergeMerge branch 'dev'7,585pixi1.0.0
2026-08-06e662d5ff3bBuild and choresBump version from 0.1.4 to 0.1.57,575pixi1.0.0
2026-08-056d4470e291MergeMerge branch 'dev'7,575pixi1.0.0
2026-08-0515be30d221RefactorRemove unused import of Writer from shared.mojo7,930pixi1.0.0
2026-08-054983ea0234DocsUpdate README benchmark tables (5MB corpus run)7,931pixi1.0.0
2026-08-05b4e2ca710bRefactorTake care of warning message7,931pixi1.0.0
2026-08-0580030a5206Feature +testsReplace Unicode if-chains with generated lookup table; add pretokenize() and parity suite7,931pixi1.0.0
2026-08-0566f51b4221DocsRefresh README benchmarks and fix stale example ids and Mojo snippets7,664pixi1.0.0
2026-08-05cdfa22342dRefactorFormat O200K_BYTE_TO_ID table7,664pixi1.0.0
2026-08-05b126eb5296DocsLatest benchmark numbers7,713pixi1.0.0
2026-08-0591c3085eabRefactor +testsRefactor encode_ordinary into dispatcher + named merge strategies7,713pixi1.0.0
2026-08-04b66b09d067Other +docsfieldwise_init, renaming7,682pixi1.0.0

The latest 50 of 191 commits; all of them are in the JSON.