What it is and how to install and run locally the LLM AI: mistral

Mistral

Introduction to Mistral AI

Mistral AI is a French artificial intelligence startup founded in April 2023 by Arthur Mensch, Guillaume Lample, and Timothée Lacroix. Headquartered in Paris, the company specializes in developing large language models (LLMs) with a focus on open-source accessibility and high performance. As of 2025, Mistral AI has achieved a valuation exceeding 14 billion, reflecting its significant impact in the AI industry. [Source]

Key Features and Capabilities

Mistral AI has introduced several notable models, each designed to address specific needs:

  • Mistral 7B: A 7-billion parameter model that outperforms larger counterparts like LLaMA 2 13B and LLaMA 1 34B on various benchmarks, demonstrating efficiency and effectiveness in language tasks. [Source]
  • Mixtral 8x7B: Utilizing a Sparse Mixture of Experts (SMoE) architecture, this model activates only two out of eight expert groups per token, effectively managing 46.7 billion parameters while using just 12.9 billion per token. This design enhances efficiency without compromising performance, surpassing LLaMA 2 70B and matching or exceeding GPT-3.5 in most benchmarks. [Source]
  • Magistral Medium: A frontier-class reasoning model built on Mistral Medium 3, offering state-of-the-art reasoning capabilities for enterprise applications. [Source]

These models are characterized by:

  • Multilingual Proficiency: Supporting languages such as English, French, Italian, German, and Spanish, catering to a diverse user base.
  • Extended Context Windows: Handling contexts up to 32,000 tokens, facilitating the processing of extensive documents and complex tasks.
  • Code Generation Capabilities: Demonstrating strong performance in code-related tasks, making them suitable for programming applications.

Comparison with Other LLMs

When evaluating Mistrals performance against other leading LLMs, several benchmarks highlight its strengths:

Model MMLU (Multitask Language Understanding) GSM8K (Math) HumanEval (Coding)
Mistral Large 2 84.0% 93.0% 92.0%
DeepSeek-V2.5 80.4% 95.1% 89.0%
GPT-4 88.7% Not specified Not specified

[Source]

These results indicate that Mistral Large 2 excels in coding tasks and maintains strong performance in language understanding and mathematical reasoning, positioning it as a competitive choice among contemporary LLMs.

In summary, Mistral AIs commitment to open-source development and its focus on efficiency and multilingual capabilities have established its models as formidable contenders in the LLM landscape, offering versatile solutions for a wide range of applications.

Usage License

Mistral AI offers a range of models under different licenses to accommodate various use cases:

  • Apache 2.0 License: Models such as Mistral 7B, Mixtral 8x7B, and Pixtral 12B are released under the Apache 2.0 License. This permissive license allows users to freely use, modify, and distribute these models without restrictions.
  • Mistral AI Non-Production License (MNPL): Certain models, like Codestral, are available under the MNPL. This license permits usage for testing, research, personal, or evaluation purposes in non-production environments. Commercial use is prohibited without obtaining a separate license from Mistral AI.
  • Mistral Research License: Models such as Mistral Large and Pixtral Large are distributed under the Mistral Research License, intended for research purposes. Commercial deployment requires a commercial license.

For commercial applications or uses beyond the scope of these licenses, please contact Mistral AI to discuss obtaining the appropriate commercial license.

Advantages and Disadvantages of Running Mistral Locally

Deploying Mistral models on local hardware offers several benefits and drawbacks:

Advantages Disadvantages
  • Privacy: Processing data locally ensures sensitive information remains within your infrastructure, reducing exposure to external threats.
  • Offline Operation: Local deployment allows for uninterrupted use without reliance on internet connectivity, ensuring consistent performance in remote or restricted environments.
  • Portability: Running models on laptops or portable devices enables usage without external power sources, providing flexibility in various settings.
  • Customization: Local control allows for tailored configurations and optimizations specific to your needs.
  • Resource Intensive: High-performance hardware is required to run large models efficiently, which can be costly and may not be feasible for all users.
  • Maintenance Overhead: Managing and updating local deployments necessitates technical expertise and ongoing maintenance efforts.
  • Scalability Limitations: Scaling operations locally can be challenging compared to cloud-based solutions that offer dynamic resource allocation.
  • Initial Setup Complexity: Setting up and configuring models locally can be complex and time-consuming, especially for users without specialized knowledge.

Careful consideration of these factors is essential when deciding between local deployment and cloud-based solutions for Mistral models.

OllamaRun mistral with Ollama

Run the mistral model locally with Ollama to work in private, offline and with low latency. Model page: mistral on Ollama.

Windows Install Ollama on Windows and run mistral

  1. Install Ollama with Winget:
winget install Ollama.Ollama
  1. Open PowerShell or Terminal and run the model:
ollama run mistral

Compatible with Windows 10 and Windows 11. Ideal for professional desktops, content creation, and local workflows without internet.

macOSInstall Ollama on MacOS and run mistral

  1. Install Ollama with Homebrew (Intel or Apple Silicon):
brew install ollama
  1. Run the model:
ollama run mistral

On macOS Monterey, Ventura and Sonoma, mistral performs very well on Apple Silicon (M1/M2/M3) for writing, development and study totally offline.

LinuxLinux: install Ollama and run mistral

Install the LLM mistral on Ubuntu, Debian, Fedora, Kali Linux, openSUSE, Linux Mint, Pop!_OS, Arch and Manjaro with a single command:

curl -fsSL [https://ollama.com/install.sh](https://ollama.com/install.sh)  sh
  1. Run the model on your distro (Ubuntu/Debian/Fedora/Kali/openSUSE/Mint/Pop!_OS/Arch/Manjaro):
ollama run mistral

Perfect for Linux servers and laptops: automate workflows with scripts, draft content and test prompts without relying on the internet.

BSDBSD (FreeBSD, OpenBSD, NetBSD): run mistral with Ollama in a container

The simplest way on BSD is to use a container (Docker/Podman) to isolate the environment:

docker run -d --name ollama -p 11434:11434 -v ollama:/root/.ollama ollama/ollama docker exec -it ollama ollama run mistral

Valid for FreeBSD, OpenBSD and NetBSD in labs and security environments with local AI.

How to remove the model in Ollama

ollama rm mistral

Delete the model files to free up disk space when you no longer need it.

Available models and tags

  • Model name: mistral
  • Tags (Model): mistral:latest mistral:7b

LM Run mistral in LM Studio

LM Studio offers a graphical interface to download and run local models. Download the app according to your system from the official website: LM Studio (official download). Then search for mistral, download and click Run.

WindowsInstall LM Studio on Windows and run mistral

  1. Download LM Studio for Windows from lmstudio.ai and install it (compatible with Windows 10 and Windows 11).
  2. In Models, search for mistral and click Download.
  3. Start the model with Run to chat locally without connection.

LM Studio on Windows simplifies model management and private sessions for productivity tasks, technical blogging, and prompt testing.

macOSInstall LM Studio on MacOS to run mistral

  1. Download LM Studio for macOS from lmstudio.ai (Intel or Apple Silicon).
  2. Open the app, search for mistral, download and click Run.

Smooth experience on Monterey, Ventura and Sonoma, with outstanding performance on Apple Silicon chips for creative and technical work without internet.

LinuxInstall LM Studio on Linux and run mistral

  1. Download LM Studio (AppImage/package) from lmstudio.ai and follow the instructions for your distro.
  2. Open the app, search for mistral, download and click Run.

Works on Ubuntu, Debian, Fedora, Kali Linux, openSUSE, Linux Mint, Pop!_OS, Arch and Manjaro, enabling local and private AI sessions for desktops and workstations.

Install LM Studio on BSD and its variants to run mistral

Run LM Studio via compatibility or a container. Once inside the app, search for mistral, download and click Run to start the local session.

In FreeBSD, OpenBSD and NetBSD, it is a practical approach for labs and audits where local AI is a requirement.

How to delete the model in LM Studio

  1. Go to Models > Installed.
  2. Find mistral and click Delete to remove the downloaded files.

Hardware Required to Run the LLM Mistral

Model Required Memory Optimal Memory Compatible GPUs Alternative CPU RAM Setup
mistral:7b 6 GB VRAM 12 GB VRAM RTX 3060, RTX 4060 Ti, RTX 4070 16 GB RAM with a modern multi-core CPU
mistral:latest 24 GB VRAM 32 GB VRAM RTX 3090, RTX 4090 Not recommended due to size exceeding 16B parameters

Understanding Quantization in LLMs

Quantization is a technique used in large language models (LLMs) to reduce the precision of the models parameters, such as weights and activations, from high-precision formats like 32-bit floating-point numbers to lower-precision formats like 8-bit integers. This process decreases the models memory footprint and accelerates inference, making it more efficient for deployment on resource-constrained devices.

How Quantization Works

Quantization involves mapping a range of continuous values to a smaller set of discrete values. In the context of LLMs, this means converting the models parameters to a lower bit-width representation. For example, converting 32-bit floating-point weights to 8-bit integers reduces the memory required to store these weights by 75%. This reduction allows the model to run on hardware with limited resources without significant loss in performance.

Quantization in Mistral Models

Applying quantization to Mistral models enables them to operate on less powerful hardware while maintaining acceptable performance levels. For instance, quantizing the Mistral 7B model to 4-bit precision can reduce its memory requirements, allowing it to run efficiently on GPUs with lower VRAM capacities. However, its important to note that while quantization reduces memory usage and increases inference speed, it may introduce slight accuracy degradation, depending on the quantization method and bit precision used.

Optimal Setup for Running Mistral Models Locally

For optimal performance when running Mistral models locally, the following hardware configurations are recommended:

  • mistral:7b: A GPU with at least 12 GB of VRAM, such as the NVIDIA RTX 3060, coupled with a modern multi-core CPU and 16 GB of RAM.
  • mistral:latest: A high-end GPU with 24 GB of VRAM, like the NVIDIA RTX 3090 or RTX 4090, along with a robust CPU and 32 GB of RAM.

These setups ensure that the models run efficiently, providing faster inference times and smoother operation.

Minimum Cost-Effective Setup

For users seeking a more budget-friendly setup to run the Mistral 7B model, the following configuration is suggested:

  • A GPU with at least 6 GB of VRAM, such as the NVIDIA GTX 1660 or RTX 2060.
  • A modern multi-core CPU, like an Intel Core i5 or AMD Ryzen 5.
  • 16 GB of RAM.

While this setup may result in slower inference times compared to higher-end hardware, it provides a cost-effective solution for running the Mistral 7B model locally.

Potential Applications of Mistral Models

Mistral models can be utilized in a variety of applications, including:

  • Natural Language Understanding: Enhancing chatbots and virtual assistants to comprehend and respond to user queries more effectively.
  • Content Generation: Assisting in drafting articles, generating creative writing, or producing code snippets.
  • Language Translation: Providing accurate translations between different languages.
  • Sentiment Analysis: Analyzing customer feedback to gauge sentiment and improve services.
  • Summarization: Condensing lengthy documents into concise summaries for quick information retrieval.

These applications demonstrate the versatility and utility of Mistral models across various domains.

Like

Be the first to leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *