9 unstable releases (3 breaking)

new 0.4.0 Feb 9, 2025
0.3.4 Oct 10, 2024
0.3.3 Aug 21, 2024
0.2.2 Feb 28, 2024
0.1.0 Dec 16, 2023

#1071 in Machine learning

Download history 38/week @ 2024-10-22 66/week @ 2024-10-29 36/week @ 2024-11-05 39/week @ 2024-11-12 49/week @ 2024-11-19 36/week @ 2024-11-26 63/week @ 2024-12-03 112/week @ 2024-12-10 49/week @ 2024-12-17 18/week @ 2024-12-24 72/week @ 2024-12-31 120/week @ 2025-01-07 93/week @ 2025-01-14 63/week @ 2025-01-21 40/week @ 2025-01-28 89/week @ 2025-02-04

300 downloads per month
Used in 2 crates (via kalosm-language)

MIT/Apache

565KB
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

~33–53MB
~1M SLoC