Skip to main content
The FastChunker uses chonkie-core for SIMD-accelerated boundary detection, enabling chunking speeds of 100+ GB/s.
Unlike other chunkers, FastChunker uses byte size limits instead of token counts. This tradeoff enables extreme performance for high-throughput pipelines.

Initialization

Parameters

int
default:"4096"
Target chunk size in bytes (not tokens)
str
default:"\\n.?"
Single-byte delimiter characters to split on
str
default:"None"
Multi-byte pattern to split on (overrides delimiters if set)
bool
default:"False"
If True, keep the delimiter/pattern at the start of the next chunk instead of the end of the current chunk
bool
default:"False"
If True, split at the START of consecutive delimiter runs instead of the middle
bool
default:"False"
If True, search forward for a delimiter when none is found in the backward search window

Basic Usage

Examples

Comparison with Other Chunkers

When to Use FastChunker

Use FastChunker when:
  • Processing large volumes of text (>100KB documents)
  • Building high-throughput pipelines
  • Byte-level precision is acceptable
  • You don’t need exact token counts
Use other chunkers when:
  • You need precise token counts for LLM context limits
  • Working with small documents (< 1KB)
  • Complex semantic boundaries are required

Return Type

FastChunker returns chunks as Chunk objects:
The token_count field is always 0 in FastChunker output. If you need token counts, use the tokenizer separately or choose a different chunker.