1 unstable release
0.1.0 | Dec 16, 2023 |
---|
#8 in #mistral
315KB
7.5K
SLoC
RMistral
RMistral is a Rust implementation of the quantized Mistral 7B language model.
Mistral 7B is a very small but performant language model that can be easily run on your local machine.
This library uses Candle to run Mistral.
Usage
use rmistral::prelude::*;
#[tokio::main]
async fn main() {
let mut model = Mistral::default();
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
~32–52MB
~1M SLoC