Back to directory

Kalosm

A Rust ecosystem of crates for running local and remote pre-trained language, audio and image models, with structured generation that constrains model output to a Rust type, regex or custom grammar.

Kalosm

Kalosm is an ecosystem of Rust crates for developing applications around pre-trained AI models. The core Kalosm crate provides a simple interface to models such as Llama, Mistral and Phi for text, Whisper for audio transcription, Segment Anything for image segmentation and Bert for text embeddings, each available quantized and with GPU acceleration. A companion project, Fusor, is a compiler-backed runtime for quantized ML inference on CPUs and WebGPU accelerators.

Beyond running models, it includes utilities for extracting and chunking context from text, HTML, DOCX, Markdown and PDF files with vector database integration for semantic search, transcribing audio from a microphone or file, and crawling and scraping web pages. Its structured generation feature uses a custom parser engine and sampler so a Rust type annotated with derive macros, a regex, or a hand-written grammar can constrain a model's output to valid JSON, HTML, XML or other structured formats, faster than unconstrained generation.

It is written in Rust and released under the Apache-2.0 license.

More in Inference

See all 770
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • Lifeboat

    iterate.ai

    A local inference server that puts an OpenAI- and Anthropic-compatible API in front of open-weight language models running on hardware you control, from a laptop to a GPU cluster.

  • Claude S40

    github.com

    An unofficial Claude chat client for 2007-era Nokia Series 40 phones, built as a Java ME app plus a small Go relay server, with web search, reading mode and saved chats.