floneum

Library Listed

A simple interface for pretrained AI models

Downloads
649
Dependents
7
Stars
2,236
Forks
135
Contributors
19
Commits
1,559
Latest release
0.4.0 ·

About

From the project README ·

Kalosm

Kalosm is an ecosystem of crates that make it easy to develop applications that use local or remote AI models. There are two main projects in this repo:

  • Kalosm: A simple interface for pre-trained models in rust
  • Fusor: A compiler-backed runtime for quantized ML inference on CPUs and WebGPU accelerators

Kalosm

Kalosm is a simple interface for pre-trained models in Rust. It makes it easy to interact with pre-trained, language, audio, and image models.

Model Support

Kalosm supports a variety of models. Here is a list of the models that are currently supported:

ModelModalitySizeDescriptionQuantizedGPU AcceleratedExample
LlamaText1b-70bGeneral purpose language model✅✅llama 3 chat
MistralText7-13bGeneral purpose language model✅✅mistral chat
PhiText2b-4bSmall reasoning focused language model✅✅phi 3 chat
WhisperAudio20MB-1GBAudio transcription model✅✅live whisper transcription
Segment AnythingImage50MB-400MBImage segmentation model✅✅Image Segmentation
BertText100MB-1GBText embedding model✅✅Semantic Search
Utilities

Kalosm also supports a variety of utilities around pre-trained models. These include:

Read the full README
Structured Generation

Kalosm supports structured generation with arbitrary parsers. It uses a custom parser engine and sampler and structure-aware acceleration to make structure generation even faster than uncontrolled text generation. You can take any rust type and add #[derive(Parse, Schema)] to make it usable with structured generation:

use kalosm::language::*;

/// A fictional character
#[derive(Parse, Schema, Clone, Debug)]
struct Character {
    /// The name of the character
    #[parse(pattern = "[A-Z][a-z]{2,10} [A-Z][a-z]{2,10}")]
    name: String,
    /// The age of the character
    #[parse(range = 1..=100)]
    age: u8,
    /// A description of the character
    #[parse(pattern = "[A-Za-z ]{40,200}")]
    description: String,
}

#[tokio::main]
async fn main() {
    // First create a model. Chat models tend to work best with structured generation
    let model = Llama::phi_3().await.unwrap();
    // Then create a task with the parser as constraints
    let task = model.task("You generate realistic JSON placeholders for characters")
        .typed();
    // Finally, run the task
    let mut stream = task(&"Create a list of random characters", &model);
    stream.to_std_out().await.unwrap();
    let characters: [Character; 10] = stream.await.unwrap();
    println!("{characters:?}");
}

https://github.com/user-attachments/assets/8900f57d-55c8-4d4a-a67b-73beab1e5155

In addition to regex, you can provide your own grammar to generate structured data. This lets you constrain the response to any structure you want including complex data structures like JSON, HTML, and XML.

Kalosm Quickstart!

This quickstart will get you up and running with a simple chatbot. Let's get started!

A more complete guide for Kalosm is available on the Kalosm website, and examples are available in the examples folder.

  1. Install rust
  2. Create a new project:
cargo new kalosm-hello-world
cd ./kalosm-hello-world
  1. Add Kalosm as a dependency
cargo add kalosm --features llama
cargo add tokio --features full
  1. Add this code to your main.rs file
use kalosm::language::*;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
  let model = Llama::phi_3().await?;
  let mut chat = model.chat()
    .with_system_prompt("You are a pirate called Blackbeard");

  loop {
    chat(&prompt_input("\n> ")?)
      .to_std_out()
      .await?;
  }
}
  1. Run your application with:
cargo run --release

chat bot demo

Fusor

⚠️ Fusor is still early in development and is not ready for production use. It is the local inference backend used by Kalosm's model crates.

Fusor is a compiler-backed CPU and WebGPU runtime for quantized ML inference. It loads GGUF models and uses an e-graph compiler to fuse operation chains into optimized kernels without requiring model authors to write shader code. For example, this expression can compile into one kernel:

fn exp_add_one(tensor: Tensor<2, f32>) -> Tensor<2, f32> {
  1. + (-tensor).exp()
}

Community

If you are interested in either project, you can join the discord to discuss the project and get help.

Contributing

  • Report issues on our issue tracker.
  • Help other users in the discord
  • If you are interested in contributing, feel free to reach out on discord
Runs on
CUDA, Metal
What shows it
  • CUDA: kalosm feature cuda, kalosm-llama feature nccl (dependency cudarc), kalosm-ocr feature nccl (dependency cudarc), kalosm-parse-macro feature cuda, kalosm-sound feature cuda, rbert feature nccl (dependency cudarc), rmistral feature nccl (dependency cudarc), rphi feature nccl (dependency cudarc), rwhisper feature nccl (dependency cudarc), rwuerstchen feature nccl (dependency cudarc), segment-anything-rs feature nccl (dependency cudarc)
  • Metal: kalosm feature metal, kalosm-common feature metal (dependency metal), kalosm-language feature metal, kalosm-learning feature metal, kalosm-llama feature metal, kalosm-ocr feature metal, kalosm-parse-macro feature metal, kalosm-sound feature metal, kalosm-vision feature metal, rbert feature metal (dependency metal), rphi feature metal, rwhisper feature metal, rwuerstchen feature metal, segment-anything-rs feature metal
Native code
Required
  • Binds native code: alsa-sys, lmdb-master-sys, accelerate-src (feature accelerate), intel-mkl-src (feature mkl), ort-sys (feature voice_detection) and 1 more
Python bindings
No Python binding crate found
License
Apache-2.0 OR MIT

Compare with similar projects

Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.

floneum beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
floneum This page Listed

A simple interface for pretrained AI models

649 downloads over 30 days 7 2,236 0.4.0 CUDA, Metal Binds native code: alsa-sys, lmdb-master-sys, accelerate-src (feature accelerate), intel-mkl-src (feature mkl), ort-sys (feature voice_detection) and 1 more Apache-2.0 OR MIT
autoagents Listed

Agent Framework for Building Autonomous Agents

8,627 downloads over 30 days 4 779 0.4.0 CUDA, WebGPU, Metal, ROCm, Vulkan Binds native code: llama-cpp-sys-2, ort-sys, alsa-sys (feature audio-capture), intel-mkl-src (feature full), rquickjs-sys (feature codeact) Apache-2.0 OR MIT
adk-rust Listed

Rust Agent Development Kit - Build AI agents in Rust with modular components for models, tools, memory, and more.

5,419 downloads over 30 days 25 743 2.3.0 CUDA, Metal Binds native code: alsa-sys (feature desktop-audio), audiopus_sys (feature openai-webrtc), cxx (feature livekit), espeak-rs-sys (feature kokoro), libsqlite3-sys (feature sqlite) and 4 more Apache-2.0
llm-chain Listed Dormant

A library for running chains of LLMs (such as ChatGPT) in series to complete complex tasks, such as text summation.

2,575 downloads over 30 days 1 1,602 0.13.0 CUDA Binds native code: llm-chain-llama-sys. Build uses a native toolchain: bindgen MIT
autogpt Listed

🦀 A Pure Rust Framework For Building AGIs.

2 downloads over 30 days 0 117 0.4.5 GPU support unknown Binds native code: ring, zstd-sys, libgit2-sys (feature git), libz-sys (feature git) MIT
axp App Listed

An open protocol that gives AI agents a secure, sandboxed place to run code and use tools — with lean context usage. AXP works alongside MCP

Not measured Not applicable 3 Not measured Not measured Not measured Apache-2.0
codewhale App New

Terminal UI for open-source and open-weight coding models

19,483 binary downloads per release Not applicable 41,158 0.10.2 GPU support unknown Binds native code: aws-lc-rs, ring, liblzma-sys, libsqlite3-sys, rquickjs-sys and 1 more MIT
Why ListedNo archive, New or Featured rule places it, so it is Listed.

What it lacks for Featured

  • It has 3 active dependents and 3 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 2,236 stars, 135 forks and 19 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.

What else the check found

  • The last activity is on 11 Oct 2026, 29 days ago. The rules expect an update within 365 days. Dormancy rule

Check notes

  • the latest release was packaged from a dirty working tree

Exact rules: Listed, Featured library. The check on applied thresholds version 9.

Every rule outcome, as the check records it
  • expected-interval: version 0.4.0 base 140, raised to the 365-day floor: E = 365 days
  • dormancy: last activity 2026-10-11, 29 days ago, E = 365: active
  • featured: not featured: active_users 3 < 11 and new_adopters 3 < 9 and repository route stars 2236 (needs 4539), forks 135 (needs 434), contributors 19 (needs 79)
  • listed: listed: no archive, new or featured rule applies
Crates19 crates

Measurements and sources

Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.

Sources6 sources
Adoption3 active dependents, 3 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents3crates.io database dumpYes
New dependents (365 days)3crates.io database dumpYes
Peak active dependents3crates.io database dumpYes
Active dependents as a share of the peak1crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 29 days ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2026-10-11GitHub repositoryYes
Latest release2026-09-27crates.io database dumpYes
First release2023-12-16crates.io database dumpYes
Latest version0.4.0crates.io database dumpYes
Days the oldest outside issue waits for a reply656GitHub repositoryYes
Maintainer replies over 365 days12GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageYes
Published docstruecrates.io database dumpYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityUnpatched vulnerabilities: none
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windownoneRustSec advisory databaseYes
RustSec unmaintained advisorynoneRustSec advisory databaseYes
Deprecation noticenonecrates.io database dumpYes
Deprecated requirementnonecrates.io database dumpYes
Distribution8 releases, 649 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases8crates.io database dumpYes
Downloads over 30 days649crates.io database dumpYes
Binary downloads over the last 3 releasesNot measuredYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedfalsecrates.io database dumpYes
Crate deleted from crates.iofalsecrates.io database dumpYes
Repository2,236 stars, 135 forks, 19 contributors, 1,559 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars2236GitHub repositoryYes — one part of the repository route
GitHub forks135GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account19GitHub contributorsYes — one part of the repository route
Commits on the default branch1559GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseApache-2.0 OR MITcrates.io database dumpNo
Runs on, from listed crates and their direct dependenciesCUDA, Metalcrates.io database dumpNo
What shows each backendCUDA: kalosm feature cuda, kalosm-llama feature nccl (dependency cudarc), kalosm-ocr feature nccl (dependency cudarc), kalosm-parse-macro feature cuda, kalosm-sound feature cuda, rbert feature nccl (dependency cudarc), rmistral feature nccl (dependency cudarc), rphi feature nccl (dependency cudarc), rwhisper feature nccl (dependency cudarc), rwuerstchen feature nccl (dependency cudarc), segment-anything-rs feature nccl (dependency cudarc); Metal: kalosm feature metal, kalosm-common feature metal (dependency metal), kalosm-language feature metal, kalosm-learning feature metal, kalosm-llama feature metal, kalosm-ocr feature metal, kalosm-parse-macro feature metal, kalosm-sound feature metal, kalosm-vision feature metal, rbert feature metal (dependency metal), rphi feature metal, rwhisper feature metal, rwuerstchen feature metal, segment-anything-rs feature metalcrates.io database dumpNo
Native code, from listed crates and their dependenciesBinds native code: alsa-sys, lmdb-master-sys, accelerate-src (feature accelerate), intel-mkl-src (feature mkl), ort-sys (feature voice_detection) and 1 morecrates.io database dumpNo
Python bindings, from direct dependencies of listed cratesNo Python binding crate foundcrates.io database dumpNo
Crates that depend on a listed crate directly7crates.io database dumpNo

Corrections and review history

Report a correction

No correction applies to this entry.

Judgments

A judgment enters only through an approved issue and a merged pull request.

No judgment applies to this entry.