10 unstable releases (3 breaking)

new 0.4.1 Mar 6, 2025
0.4.0 Feb 9, 2025
0.3.4 Oct 10, 2024
0.3.3 Aug 21, 2024
0.1.0 Dec 16, 2023

#1134 in Machine learning

Download history 56/week @ 2024-11-18 32/week @ 2024-11-25 61/week @ 2024-12-02 116/week @ 2024-12-09 49/week @ 2024-12-16 22/week @ 2024-12-23 46/week @ 2024-12-30 131/week @ 2025-01-06 102/week @ 2025-01-13 66/week @ 2025-01-20 33/week @ 2025-01-27 103/week @ 2025-02-03 146/week @ 2025-02-10 90/week @ 2025-02-17 58/week @ 2025-02-24 183/week @ 2025-03-03

518 downloads per month
Used in 3 crates (via kalosm-language)

MIT/Apache

570KB
13K SLoC

RLlama

RLlama is a Rust implementation of the quantized Llama 7B language model.

Llama 7B is a very small but performant language model that can be easily run on your local machine.

This library uses Candle to run Llama.

Usage

use kalosm_llama::prelude::*;

#[tokio::main]
async fn main() {
    let mut model = Llama::new().await.unwrap();
    let prompt = "The capital of France is ";
    let mut stream = model(prompt);

    print!("{prompt}");
    while let Some(token) = stream.next().await {
        print!("{token}");
    }
}

Dependencies

~32–56MB
~1M SLoC