Minimal, clean code for the Byte Pair Encoding (BPE) algorithm commonly used in LLM tokenization.
karpathy/minbpe 的主要功能包括:Toolkits, Tokenizer Persisters, Byte Level Encodings, Byte Pair Encodings, Greedy Merge Encoding, Training, Byte-Level Vocabulary Trainers, Text Tokenization。
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,…
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
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
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
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