# Combinatorial BPE Tokenizer (factored variation/prefix/core/suffix embeddings)

- **ID:** 1054
- **Kind:** code
- **URL:** https://x.com/SwayStar123/status/2103328423506813059
- **Authors:** sway (@SwayStar123), Luma Labs AI
- **Venue:** GitHub / X (independent demo)
- **Publisher:** GitHub / X (independent demo)
- **Published:** 2026
- **Source:** x
- **Language:** en; multilingual (en/de/fr/ru/zh/ja + py/go/js/java/cpp)
- **Access:** https://github.com/SwayStar123/CombinatorialBPE ; X update https://x.com/SwayStar123/status/2103328423506813059 ; X intro https://x.com/SwayStar123/status/2102859076883632360 ; dump /workspace/curator/research/swaystar-combinatorial-bpe-2103328423506813059-20260925
- **License:** MIT (OpenCC-derived Han tables Apache-2.0 NOTICE)
- **License family:** Permissive (auto-classified)
- **Tags:** combinatorial-bpe, tokenization, bpe, swaystar123, luma, code-compression, bits-per-byte, multilingual, mit, factored-embeddings
- **Topics:** tokenization; BPE; multilingual LM; code compression; embedding factorization
- **Added:** 2026-09-25
- **Verified:** 2026-09-25
- **Research status:** done
- **Needs deep evaluation:** no
- **Page:** https://papers.projxon.ai/entries/1054

## Summary

Combinatorial BPE (SwayStar123, MIT repo; intro X 2026-09-23, scaled update 2026-09-25) factors each token into (variation, prefix, core, suffix) and embeds as the sum of four tables so capitalization, leading whitespace/punctuation, and trailing punctuation (plus Simplified/Traditional Chinese) share one core. On a single 32k-budget tokenizer and 8-layer GPT (42–45M, RoPE/SwiGLU/QK-norm/Muon) trained 22.5k steps×16k tokens on 6 Wikipedia langs + 5 code langs, README reports ~32% fewer tokens overall (22–25% NL, 42–50% code) and ~3.7% lower bits-per-byte vs GPT-2-style BPE (tweet chart: 4.1%), better on every source; gains strongest on code. Author notes flop-match vs data-match caveats; small-scale / one-seed / preliminary.

## Attributes

- **Purpose:** Spend vocab on cores instead of surface variants by factoring each token into variation+prefix+core+suffix with summed embeddings
- **Scale:** 32k embedding rows; 42–45M GPT; 22.5k steps×16k tok; 11 sources (6 NL + 5 code); tiny→3× scaled runs
- **Domain:** tokenization; BPE; multilingual LM; code compression; embedding factorization
- **Used for:** Tokenizer design for multilingual+code; fertility vs bpb tradeoffs; compare to factored MT vocab / inline case markers
- **Time period:** Intro X 2026-09-23T20:34:07Z; scaled update 2026-09-25T03:39:08Z; cataloged 2026-09-25
- **Author type:** independent / industry (Luma Labs; personal project)

## Research notes

- Hudson linked 2026-09-25 scaled update. Dedup clean (no prior CombinatorialBPE row). Mechanism from thread+README: 4-part token, sum embeddings, chained predict prefix→core→variation→suffix; camelCase split + fold_han. Tweet chart 4.1% bpb / README 3.7% — both noted. Prior art cited in README: Marian factored vocab, Wilken&Matusov 1910.03912, Land&Meister 2608.08847. No paper; code+X. Dump /workspace/curator/research/swaystar-combinatorial-bpe-2103328423506813059-20260925 (results.jpg, intro.jpg, notes.md).

## Similar entries

- [Tokenization: A Survey for Modern NLP](https://papers.projxon.ai/entries/818) (paper, #818)
- [SuperBPE: Space Travel for Language Models](https://papers.projxon.ai/entries/559) (paper, #559)
- [Decoupling the Benefits of Subword Tokenization for Language Model Training via Byte-level Simulation](https://papers.projxon.ai/entries/519) (paper, #519)
- [T-FREE: Tokenizer-Free Generative LLMs via Sparse Representations for Memory-Efficient Embeddings](https://papers.projxon.ai/entries/582) (paper, #582)
- [Cohere Embed 5 (Pro and Fast embeddings family)](https://papers.projxon.ai/entries/816) (model, #816)
- [deepswe-clm-train-embeddings-8k (DeepSWE CLM/PRM training embeddings)](https://papers.projxon.ai/entries/1023) (dataset, #1023)
