awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
karpathy avatar

karpathy/minbpe

0
View on GitHub↗
10,582 星标·1,071 分支·Python·MIT·6 次浏览

Minbpe

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

Features

  • Toolkits - Provides a complete toolkit for learning BPE merge rules and building a vocabulary from text corpora.
  • Tokenizer Persisters - Ships built-in serialization for saving and loading trained tokenizer models to disk.
  • Byte Level Encodings - Encodes UTF-8 text into byte-level token sequences using BPE merges for subword tokenization.
  • Byte Pair Encodings - Provides a clean implementation of the BPE algorithm used for subword tokenization in large language models.
  • Greedy Merge Encoding - Encodes text by greedily applying learned byte pair merges until no more merges apply.
  • Training - Trains a BPE tokenizer on text data to learn merge rules and build a vocabulary for subword tokenization.
  • Byte-Level Vocabulary Trainers - Trains byte-level BPE vocabularies and merge rules on text corpora for subword tokenization.
  • Text Tokenization - Converts raw text into integer token IDs using a trained BPE tokenizer for language model pipelines.
  • Byte-Level Tokenizers - Implements a byte-level tokenizer that maps integer IDs to raw byte sequences for full UTF-8 coverage.
  • Training - Provides a clean implementation of the BPE training algorithm to learn merge rules from text corpora.
  • Subword Tokenization - Provides a framework for splitting text into subword units with support for special tokens and regex pre-tokenization.
  • Byte-Level Encoders - Encodes raw text into integer token IDs using byte-level BPE merges for language model pipelines.
  • Token Decoders - Provides a decoder that reconstructs human-readable text from integer token IDs using the trained vocabulary.
  • Greedy Merge Application - Implements greedy merge application that repeatedly applies the highest-priority learned byte pair merge.
  • Merge Tables - Ships a priority-ordered merge table that stores learned byte pair rules for sequential application.
  • Category-Based Splitters - Splits text by character category before tokenization to prevent cross-category BPE merges.
  • Persistence - Saves and loads a trained BPE tokenizer's vocabulary and merge rules to disk for reuse across sessions.
  • Serialization - Provides a module for saving and loading trained tokenizer models with vocabulary and merge tables to disk.
  • Category-Based Splitters - Implements regex-based text splitting by category to prevent cross-category BPE merges during tokenization.
  • Pre-Tokenization Splitters - Ships a regex-based pre-splitter that segments text into categories before BPE merges.
  • Regex Column Splitting - Splits input text into categories like letters, numbers, and punctuation using a configurable regex pattern.
  • Special Token Registries - Provides a mechanism to register custom tokens with reserved IDs that are never split or merged.
  • Tokenizer State Persistence - Saves and restores the full tokenizer state including vocabulary, merge table, and special tokens to disk.

Star 历史

karpathy/minbpe 的 Star 历史图表karpathy/minbpe 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

常见问题解答

karpathy/minbpe 是做什么的?

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

karpathy/minbpe 的主要功能有哪些?

karpathy/minbpe 的主要功能包括:Toolkits, Tokenizer Persisters, Byte Level Encodings, Byte Pair Encodings, Greedy Merge Encoding, Training, Byte-Level Vocabulary Trainers, Text Tokenization。

karpathy/minbpe 有哪些开源替代品?

karpathy/minbpe 的开源替代品包括: google/sentencepiece — SentencePiece is a text segmentation engine and tokenization library designed for machine learning workflows. It… huggingface/tokenizers — This project is a high-performance library for converting raw text into tokens and IDs for machine learning models. It… datawhalechina/so-large-lm — This project is a comprehensive educational curriculum and structured learning path covering the full lifecycle of… huawei-noah/pretrained-language-model — Pretrained-Language-Model is a machine learning library and natural language processing toolkit designed for… facebookresearch/fairseq — Fairseq is a PyTorch toolkit for sequence-to-sequence modeling, specializing in neural machine translation, automatic… huggingface/transformers — Transformers is a comprehensive library for machine learning that provides a unified interface for training,…

Minbpe 的开源替代方案

相似的开源项目,按与 Minbpe 的功能重合度排序。
  • google/sentencepiecegoogle 的头像

    google/sentencepiece

    11,657在 GitHub 上查看↗

    SentencePiece is a text segmentation engine and tokenization library designed for machine learning workflows. It provides a comprehensive toolkit for transforming raw text into subword units or numerical identifiers, enabling consistent data representation for neural network training and inference. The library supports the training of segmentation models from raw text, allowing for the creation of custom vocabularies tailored to specific domain requirements. The project distinguishes itself through its byte-level encoding and fallback mechanisms, which ensure that every input can be represent

    C++natural-language-processingneural-machine-translationword-segmentation
    在 GitHub 上查看↗11,657
  • huawei-noah/pretrained-language-modelhuawei-noah 的头像

    huawei-noah/Pretrained-Language-Model

    3,163在 GitHub 上查看↗

    Pretrained-Language-Model is a machine learning library and natural language processing toolkit designed for pretraining, tokenizing, and compressing large language models using transformer architectures and specialized optimization techniques. It supports Chinese and multilingual natural language processing tasks, including text classification and conversational response generation. The framework provides specialized capabilities for training large-scale autoregressive and contextual language models, alongside model compression techniques like knowledge distillation and quantization to reduc

    Pythonknowledge-distillationlarge-scale-distributedmodel-compression
    在 GitHub 上查看↗3,163
  • datawhalechina/so-large-lmdatawhalechina 的头像

    datawhalechina/so-large-lm

    7,400在 GitHub 上查看↗

    This project is a comprehensive educational curriculum and structured learning path covering the full lifecycle of large language models. It provides a guided progression through the theory, architecture, training, and deployment of these models. The curriculum includes specialized guides on transformer architecture, model training tutorials, and frameworks for designing autonomous agents. It also provides dedicated resources for studying model safety and ethics. The material covers a wide range of technical capabilities, including distributed training strategies, parameter-efficient fine-tu

    在 GitHub 上查看↗7,400
  • huggingface/tokenizershuggingface 的头像

    huggingface/tokenizers

    10,825在 GitHub 上查看↗

    This project is a high-performance library for converting raw text into tokens and IDs for machine learning models. It functions as a fast text encoder and a text preprocessing pipeline designed to transform strings into numerical representations with high throughput for research and production. The library includes a subword tokenizer trainer used to analyze text datasets and create custom vocabularies using algorithms such as byte-pair encoding and wordpiece. It provides capabilities for subword vocabulary training and text alignment, allowing character offsets to be tracked during normaliz

    Rustbertgptlanguage-model
    在 GitHub 上查看↗10,825
  • 查看 Minbpe 的所有 30 个替代方案→