awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
marcelroed avatar

marcelroed/gigatoken

0
View on GitHub↗

Gigatoken

Gigatoken is a high-throughput tokenizer for language models. It converts raw text into token IDs at gigabytes per second using a parallel Rust core that is exposed to Python as a native extension. It also ships a command-line program that tokenizes, validates, and benchmarks text and Parquet datasets from the shell without any Python code.

It is designed as a drop-in stand-in for Hugging Face tokenizers and tiktoken encoders. It loads their formats, accepts model names from the Hugging Face hub, and is meant to produce token IDs that match the reference implementations, including SentencePiece models, so existing encoding code needs little change. A single command can check whether a given model's tokenizer is supported and report timing against the reference. Speed comes from parallel processing across CPU cores, direct file reading in native code that bypasses scripting overhead, and low-level pretokenization techniques such as first-byte dispatch, eight-bytes-at-a-time scanning, and paired parallel cursors.

Beyond encoding, it covers the surrounding data workflow. Input can be plain files, delimiter-separated text, JSON Lines, gzip, or Parquet, streamed without loading everything into memory. Output can be written to files or returned as NumPy and Awkward arrays. Documents can carry weights that influence pretoken frequency counts. Tokenizers can be assembled into input-to-output pipelines in Python, and a byte-pair-encoding trainer learns vocabularies and merge rules from a corpus and is checked against reference trainers.

The repository includes benchmark suites and a CPU profiling script for tracking throughput, along with a build script that packages release builds for several operating systems and processor types.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Features

  • Parallel Tokenizers - Tokenizes text for language models at gigabytes per second using a parallel native core with a Python interface.
  • Drop-In Tokenizer Replacements - Acts as a faster stand-in for Hugging Face tokenizers and tiktoken encoders, loading their formats and producing matching token IDs.
  • Hugging Face Tokenizer Compatibility - Loads tokenizers saved in Hugging Face format through a compatibility layer so existing pretrained definitions work without conversion.
  • Byte-Level Vocabulary Trainers - Includes a byte-pair-encoding trainer that learns vocabularies and merge rules from a corpus and is checked against reference trainers.
  • Text Tokenizers - Converts raw text, files, and large datasets into token ID sequences at high speed, including across multiple worker processes.
  • Tiktoken Encoding Compatibility - Works with tiktoken-style encodings through a compatibility layer so existing pipelines switch to a faster tokenizer with little change.
  • Python Native Extensions - Compiles a Rust tokenizer into a native extension that Python scripts import directly for fast tokenization during training and inference.
  • LLM Tokenizer Formats - Supports byte-pair encoding and related tokenizer families, including Hugging Face, tiktoken, and SentencePiece models, with comparison tools against popular libraries.
  • Pretrained Tokenizer Loaders - Builds tokenizers from Hugging Face repositories, hub model names, or tiktoken encodings so existing vocabularies are reused without conversion.
  • Tokenizer Validation and Benchmarking - Runs a command-line test that compares a hosted model's tokenizer output with the reference tokenizer and reports timing.
  • In-Wallet Token Swapping - Wraps an existing Hugging Face or tiktoken tokenizer and exposes the same interface so current code gets faster tokenization.
  • Command-Line Tokenizers - Ships a command-line program that tokenizes text and Parquet datasets from the shell, so tokenization can be scripted without Python.
  • Rust Python Extension Developers - Compiles a parallel Rust tokenizer core into a native Python extension, so scripts import it directly and get native speed without scripting overhead.
  • Tokenization Command-Line Tools - Ships a command-line program that tokenizes, validates, and benchmarks text and Parquet datasets from the shell without any Python code.
  • Tokenizer Asset Loading - Accepts a Hugging Face hub model name and loads the matching tokenizer vocabulary and merge rules without manual setup.
  • Tokenizer Output Parity Checks - Verifies that produced token IDs agree with Hugging Face tokenizers, tiktoken, and SentencePiece models so results are interchangeable.
4,152 stars·224 forks·Rust·MIT·3 views

Star history

Star history chart for marcelroed/gigatokenStar history chart for marcelroed/gigatoken

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

Projects sharing features with Gigatoken

These projects share indexed features with Gigatoken. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • google/sentencepiecegoogle avatar

    google/sentencepiece

    12,170View on 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
    View on GitHub↗12,170
  • karpathy/minbpekarpathy avatar

    karpathy/minbpe

    10,582View on GitHub↗

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

    Python
    View on GitHub↗10,582
  • dllxw/baby-llama2-chineseDLLXW avatar

    DLLXW/baby-llama2-chinese

    2,891View on GitHub↗

    This project is a training pipeline and framework for developing Chinese language models based on the Llama 2 architecture. It functions as a distributed GPU trainer and dataset preprocessing toolkit designed for both the initial pre-training of baseline models and subsequent supervised fine-tuning. The system distinguishes itself through a specialized workflow for Chinese text, incorporating a data curation pipeline that uses similarity hashing for deduplication and a tokenization process that converts raw text into memory-mapped binary files for efficient disk access. It implements a superv

    Python
    View on GitHub↗2,891
  • fastai/course22fastai avatar

    fastai/course22

    3,398View on GitHub↗

    This is a structured deep learning curriculum for programmers, delivered as a collection of Jupyter notebooks. It teaches the fundamentals of training neural networks for computer vision, natural language processing, tabular data analysis, and collaborative filtering using PyTorch and the fastai library. The course is designed to be hands-on, guiding learners from building a training loop from scratch to fine-tuning pretrained models for a variety of practical tasks. The curriculum distinguishes itself by covering the full lifecycle of a deep learning project, from data preparation and augmen

    Jupyter Notebookdeep-learningfastaijupyter-notebooks
    View on GitHub↗3,398
Compare all 30 related projects→

Frequently asked questions

What does marcelroed/gigatoken do?

Gigatoken is a high-throughput tokenizer for language models. It converts raw text into token IDs at gigabytes per second using a parallel Rust core that is exposed to Python as a native extension. It also ships a command-line program that tokenizes, validates, and benchmarks text and Parquet datasets from the shell without any Python code.

What are the main features of marcelroed/gigatoken?

The main features of marcelroed/gigatoken are: Parallel Tokenizers, Drop-In Tokenizer Replacements, Hugging Face Tokenizer Compatibility, Byte-Level Vocabulary Trainers, Text Tokenizers, Tiktoken Encoding Compatibility, Python Native Extensions, LLM Tokenizer Formats.

Which projects share features with marcelroed/gigatoken?

Projects with overlapping indexed features include: google/sentencepiece — SentencePiece is a text segmentation engine and tokenization library designed for machine learning workflows. It… karpathy/minbpe — Minimal, clean code for the Byte Pair Encoding (BPE) algorithm commonly used in LLM tokenization. dllxw/baby-llama2-chinese — This project is a training pipeline and framework for developing Chinese language models based on the Llama 2… fastai/course22 — This is a structured deep learning curriculum for programmers, delivered as a collection of Jupyter notebooks. It… huggingface/tokenizers — This project is a high-performance library for converting raw text into tokens and IDs for machine learning models. It… hankcs/hanlp — HanLP is a natural language processing library and deep learning framework specifically optimized for the Chinese…