mistral.rs is a large language model inference engine for local deployment, focused on fast, flexible inference and multimodal support. The project is implemented in Rust and provides both Python and Rust SDKs. The repository description explicitly states that it is not affiliated with Mistral AI.
Main uses It is used to load and run supported Hugging Face models, GGUF files, and UQFF quantized models locally or on your own servers for tasks such as text generation, multimodal inference, speech generation, image generation, and embeddings, and can expose services through OpenAI-compatible or Anthropic-compatible interfaces.
Core capabilities
- Automatic model loading: For supported Hugging Face models and GGUF files, it automatically detects the model architecture, weight format, and chat template, and these can also be explicitly specified via parameters.
- Multimodal support: Text, vision, video, audio, speech generation, image generation, and embeddings are all handled within the same engine. The repository also lists Gemma 4 support for text, image, video, and audio input, as well as native text, image, and video inference for Muse Glimmer 30B.
- Quantization: Supports ISQ (in-situ quantization), GGUF (2-8 bit), GPTQ, AWQ, HQQ, FP8, and BNB, with layer-wise quantization adjustment and automatic selection of the fastest quantization method for the hardware.
- Service interfaces: mistralrs serve exposes both the OpenAI-compatible /v1 interface and the Anthropic-compatible /v1/messages and /v1/messages/count_tokens interfaces; it provides a Prometheus-format /metrics endpoint.
- Built-in Web UI: Provided by default at /ui, it can inline-display the reasoning process, code execution, charts, and files, allows editing messages and branching to run independent Python state, and can be disabled with --no-ui.
- Agent runtime: Supports web search, local Python code execution, shell execution, OpenAI-compatible Skills, session management, and custom tool hooks; supports integrated tool calling, grammar constraints, and strict schema mode, and provides MCP clients (Process, HTTP, WebSocket).
- Performance-related: Continuous batching by default, supports CUDA FlashAttention V2/V3, Metal, multi- GPU/distributed inference, PagedAttention, and prefix caching, supports LoRA and X-LoRA, AnyMoE, and runtime loading/unloading of multiple models.
- Hardware-aware: mistralrs tune can recommend quantization and device mapping based on the model configuration and detected hardware.
Usage How to use The repository provides quick start and CLI documentation. The CLI uses commands such as run, serve, and bench to handle model repositories, local directories, and GGUF files; local GGUF files can be loaded with -f, and available published artifacts can be selected with --quant. After the service starts, the web chat interface is located at http://localhost:1234/ui,OpenAI Compatible clients use http://localhost:1234/v1,Anthropic Compatible clients use http://localhost:1234。Windows(PowerShell)安装会下载自包含的预构建二进制(Apple Silicon uses Metal; Linux uses CUDA or CPU depending on the GPU; Windows uses CPU), and falls back to building from source when there is no match; standard acceleration does not require Rust or the CUDA toolkit, and the optional cuTile acceleration requires separately installing NVIDIA's tileiras tool. In-process inference is also possible through Python's Runner, or you can embed it in applications using the Rust mistralrs crate; official CPU and CUDA prebuilt images are also published to GHCR.
Applicable scenarios Suitable for developers who need to run large language models locally or in self-hosted environments, build chat services, agent applications, multimodal applications, batch inference, and benchmarking, or embed the inference engine into Python/Rust projects via the SDK.
Limitations and notes The range of supported models is subject to the official "Supported models" reference page, which lists 45+ architectures and can be used to check whether a model's config.json is supported. Specific fees, pricing, and commercial licensing information are not currently provided. Detailed content on documentation, quantization, multi-GPU and distributed, MCP integration, troubleshooting, and environment variables can be found in the repository's Documentation link.