SuperAPIAI Directory

mistral-src

github.com · AI developer platforms

Mistral Inference is the official inference library provided by Mistral AI for running Mistral series models locally. This repository has been archived and is no longer maintained. It contains minimal code for running models, supports command-line and Python invocation, and enables interactive chat, code completion, function calling, and multimodal instruction following, among other things. Installation requires a GPU because it depends on xformers. The library is licensed under Apache 2.0, but some models have custom non-commercial licenses.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

Mistral Inference is the official inference library released by Mistral AI, designed to provide minimal code for running Mistral series models. The repository is currently archived and no longer actively maintained; the official team states that new libraries or major updates may be released in the future based on community demand.

Purpose: This library is mainly used to load and run Mistral models in a local environment, supporting both a command-line interface (CLI) and Python scripts. Users can use the mistral-demo command to test whether the model can run in the current environment, and use the mistral-chat command for interactive conversations.

Main capabilities: Supports a variety of Mistral models, including Mistral 7B, Mixtral 8x7B, Mixtral 8x22B, Codestral 22B, Codestral Mamba 7B, Mathstral 7B, Mistral NeMo, Mistral Large 2, Pixtral 12B, Mistral Small 3.1, and others. These models support tasks such as function calling, instruction following, multimodal instruction following (e.g., Mistral Small 3.1 can process images), and fill-in-the-middle (FIM) code completion. For large models (such as 8x7B and 8x22B), a multi-GPU environment is required, and they can be run using torchrun.

Usage: Users first need to create a local folder to store models, then download and extract the model files from the provided links. For model weights on Hugging Face, the example shows how to download Mistral Small 3.1 24B Instruct. Installing mistral-inference requires a GPU because it depends on xformers, and installing xformers requires a GPU. Models can be run by testing with mistral-demo or interacting using mistral-chat. For specific models such as Codestral, Codestral-Mamba, and Mathstral, the corresponding environment variables need to be set to point to the model path, and additional packages may need to be installed (e.g., Codestral-Mamba requires an additional package). In addition, the deploy folder contains code for building vLLM images for serving deployment.

Applicable scenarios: Suitable for running Mistral models in local or private environmentsfor inference by developers and researchers, and can be used for tasks such as chat, code generation, mathematical problem solving, and image understanding.

Limitations: The repository has been archived and is no longer maintained; installation requires a GPU; large models require a multi-GPU environment; some models (such as codestral-22B-v0.1 and mistral-large-instruct-2407) have custom non-commercial licenses (MNPL and MRL), and their terms must be followed when used; this library or the models must not be used in any way that infringes the rights of third parties.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools