floneum/kalosm
Instant, controllable, local pre-trained AI models in Rust
What it solves
Kalosm provides a simplified, unified interface for integrating pre-trained AI models into Rust applications. It removes the complexity of managing different model architectures and hardware acceleration, allowing developers to easily deploy local or remote models for text, audio, and image processing.
How it works
The project consists of two primary components:
- Kalosm: A high-level interface that supports a variety of pre-trained models (such as Llama, Mistral, Phi, Whisper, and BERT) across different modalities. It includes utilities for context extraction from various file formats, web crawling, and structured generation using a custom parser engine that constrains model outputs to specific Rust types or grammars.
- Fusor: A compiler-backed runtime for quantized ML inference. It uses an e-graph compiler to fuse operation chains into optimized kernels for CPUs and WebGPU accelerators, enabling efficient local inference without requiring manual shader code.
Who it’s for
Rust developers who want to build AI-powered applications with local or remote models without needing to deep expertise in ML own hardware-specific optimization.
Highlights
- Multi-modal support: Integrated support for LLMs, audio transcription (Whisper), and image segmentation (SAM).
- Structured Generation: Ability to constrain model outputs to arbitrary Rust types using
#[derive(Parse, Schema)]or custom grammars. - JSON/HTML/XML support: Fast, structure-aware acceleration for generating complex data formats.
- Hardware Acceleration: Local inference optimized for CPUs and WebGPU via the Fusor runtime.
- RAG Utilities: Built-in tools for extracting, chunking, and retrieving context from PDF, HTML, and other documents.
Related
- Project
- Project
- Project
- Project
- Project