5 unstable releases

0.3.2 Aug 14, 2024
0.3.0 Aug 13, 2024
0.2.1 Feb 28, 2024
0.2.0 Feb 18, 2024
0.1.0 Dec 16, 2023

#1082 in Machine learning

Download history 13/week @ 2024-08-01 179/week @ 2024-08-08 93/week @ 2024-08-15 17/week @ 2024-08-22 29/week @ 2024-08-29 8/week @ 2024-09-05 125/week @ 2024-09-12 170/week @ 2024-09-19 132/week @ 2024-09-26 96/week @ 2024-10-03 47/week @ 2024-10-10 79/week @ 2024-10-17 51/week @ 2024-10-24 58/week @ 2024-10-31 30/week @ 2024-11-07 29/week @ 2024-11-14

180 downloads per month
Used in 4 crates (via kalosm-language)

MIT/Apache

345KB
8K SLoC

RPhi

RPhi is a Rust implementation of the quantized Phi 1.5 language model.

Phi-1.5 is a very small but performant language model that can be easily run on your local machine.

This library uses Quantized Mixformer from Candle to run Phi-1.5.

Usage

use rphi::prelude::*;
#[tokio::main]
async fn main() {
    let mut model = Phi::v2().await.unwrap();
    let prompt = "The capital of France is ";
    let mut result = model.stream_text(prompt).await.unwrap();

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

Dependencies

~35–56MB
~1M SLoC