1 Repo
Producing output tokens one at a time and calling a user-defined callback for each token, enabling custom streaming or early termination.
Distinct from Text Tokenizers: Distinct from Text Tokenizers: focuses on generating tokens from a prompt with per-token callbacks, not on segmenting text into tokens.
Explore 1 awesome GitHub repository matching artificial intelligence & ml · Callback-Based Generators. Refine with filters or upvote what's useful.
gemma.cpp is a C++ inference engine for Gemma, PaliGemma, and Griffin language models, designed to run directly on-device without Python dependencies. It provides a self-contained runtime that loads quantized model weights and performs text generation on CPU or GPU, along with a model checkpoint converter that transforms PyTorch or Keras checkpoints into a compact binary format for fast loading. The engine supports multiple model architectures, including the Griffin recurrent architecture with gated linear recurrent layers and sliding-window attention for efficient long-sequence handling, as
Accept a tokenized prompt and produce output tokens one at a time, calling a user-defined callback for each token.