Mistral-Small-3 24B represents a breakthrough in generative AI by balancing high performance with operational efficiency. The name might suggest that it is a “small” model, but originally, it is not small at all; instead, it is developed to match with larger models like Llama 3.3 70B and Qwen 32B. It delivers robust language and instruction-following capabilities while operating over three times faster on identical hardware. Designed with local deployment in mind, this model tackles the core 80% of generative tasks, offering rapid forward passes and low latency without compromising accuracy. Mistral-Small-3 24B stands out as an open, transparent alternative to close proprietary models, inviting developers and researchers to explore and customize its capabilities.
In this article, we’ll walk you through the steps to install Mistral-Small-3 24B locally, unlocking its potential for your AI projects.
Prerequisites
The minimum system requirements for this use case are:
- GPUs: H100 SXM or RTX 4090 (for smooth execution).
- Disk Space: 200 GB
- RAM: 48-64 GB.
- Jupyter Notebook installed.
Note: The prerequisites for this are highly variable across use cases. A high-end configuration could be used for a large-scale deployment.
Step-by-step process to install & run Mistral-Small 3
For the purpose of this tutorial, we’ll use a GPU-powered Virtual Machine by NodeShift since it provides high compute Virtual Machines at a very affordable cost on a scale that meets GDPR, SOC2, and ISO27001 requirements. Also, it offers an intuitive and user-friendly interface, making it easier for beginners to get started with Cloud deployments. However, feel free to use any cloud provider of your choice and follow the same steps for the rest of the tutorial.
Step 1: Setting up a NodeShift Account
Visit app.nodeshift.com and create an account by filling in basic details, or continue signing up with your Google/GitHub account.
If you already have an account, login straight to your dashboard.
Step 2: Create a GPU Node
After accessing your account, you should see a dashboard (see image), now:
- Navigate to the menu on the left side.
- Click on the GPU Nodes option.
- Click on Start to start creating your very first GPU node.
These GPU nodes are GPU-powered virtual machines by NodeShift. These nodes are highly customizable and let you control different environmental configurations for GPUs ranging from H100s to A100s, CPUs, RAM, and storage, according to your needs.
Step 3: Selecting configuration for GPU (model, region, storage)
- For this tutorial, we’ll be using the H100 SXM GPU; however, you can choose any GPU of your choice based on your needs.
- Similarly, we’ll opt for 500GB storage by sliding the bar. You can also select the region where you want your GPU to reside from the available ones.
Step 4: Choose GPU Configuration and Authentication method
- After selecting your required configuration options, you’ll see the available VMs in your region and according to (or very close to) your configuration. In our case, we’ll choose a 1x H100 SXM GPU node with 64vCPUs/129GB RAM/500GB SSD.
2. Next, you’ll need to select an authentication method. Two methods are available: Password and SSH Key. We recommend using SSH keys, as they are a more secure option. To create one, head over to our official documentation.
Step 5: Choose an Image
The final step would be to choose an image for the VM, which in our case is Jupyter Notebook, where we’ll deploy and run the inference of our model.
That’s it! You are now ready to deploy the node. Finalize the configuration summary, and if it looks good, click Create to deploy the node.
Step 6: Connect to active Compute Node using SSH
- As soon as you create the node, it will be deployed in a few seconds or a minute. Once deployed, you will see a status Running in green, meaning that our Compute node is ready to use!
- Once your GPU shows this status, navigate to the three dots on the right and click on Connect with SSH. This will open a new tab with a Jupyter Notebook session in which we can run our model.
Step 7: Setting up Python Notebook
Start by creating a .ipynb notebook by clicking on Python 3 (ipykernel).
Next, If you want to check the GPU details, run the following command in the Jupyter Notebook cell:
!nvidia-smi
Step 8: Install and set up dependencies
- Install the following dependency packages to run the model.
!pip install torch
!pip install git+https://github.com/huggingface/transformers
!pip install git+https://github.com/huggingface/accelerate
!pip install huggingface_hub
Output:
2. Login to Hugging Face CLI with your Write
access token.
(replace <HF_TOKEN>
with your token from the Hugging Face dashboard)
!huggingface-cli login --token <HF_TOKEN>
Output:
Step 9: Load and run the model
After completing the above setup, we can move forward with loading and importing the model. Note that the model is not as small as the name suggests, so it may take some time to download completely, depending on your compute resources.
- Here’s the code snippet for downloading and importing the model:
from transformers import pipeline
import torch
messages = [
{"role": "user", "content": "Give me 5 non-formal ways to say 'See you later' in French."},
]
chatbot = pipeline("text-generation", model="mistralai/Mistral-Small-24B-Instruct-2501", max_new_tokens=256, torch_dtype=torch.bfloat16)
chatbot(messages)
Output:
2. Once the model has finished downloading, it will automatically generate the output for the prompt in the above snippet.
This is the output generated by Mistral-Small for our prompt:
Conclusion
This article has guided you through the local installation of Mistral-Small-3 24B, a model that combines top-tier generative performance with impressive efficiency to handle the core 80% of AI tasks. By leveraging its open-source, fast-response design, developers can now harness powerful language capabilities without the overhead of larger models. Additionally, NodeShift offers an affordable, scalable infrastructure that complements your local setup, ensuring that you can easily transition from development to production while maintaining optimal performance and cost efficiency.