Expand description
§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}");
}
}Modules§
- prelude
- A prelude of commonly used items in RPhi.
Structs§
- Mistral
- A quantized Mistral language model with support for streaming generation.
- Mistral
Builder - A builder with configuration for a Mistral model.
- Mistral
Source - A source for the Mistral model.