~/runthismodel
daemon okbuild 5a3c91d00:00:00Z

Can RTX 4090 run Mixtral 8x7B Instruct?

C

Yes — runs locally

~27 tok/sec · Good — slight pause, then text streams smoothly.

Your VRAM
24 GB
Model size
46.7B
Best quant
Q4_K_M
VRAM needed
25.1 GB

The verdict

The RTX 4090 (24 GB VRAM) handles Mixtral 8x7B Instruct comfortably using the Q4_K_M quantization, which fits in 25.1 GB. Expected throughput is around 27 tokens/second, which feels Good — slight pause, then text streams smoothly. in interactive use. The OG public MoE — 8 experts, 2 active per token, 47 B total / 13 B active. Apache-2.0.

Setup tutorial: Mixtral 8x7B Instruct on RTX 4090

AI-generated, GPU-specific. Verified commands for your exact hardware.

TL;DR

The Mixtral 8x7B Instruct model runs on an NVIDIA GeForce RTX 4090 with a grade C performance, using the Q4_K_M quantization, achieving approximately 24 tokens per second.

Prerequisites

Before starting, ensure you have at least 50GB of free disk space, a compatible operating system (Windows or Linux), the latest NVIDIA drivers (version 525.60.13 or later), and CUDA 11.8 installed.

Expected performance

With the recommended settings, you can expect the model to run at approximately 24 tokens per second, utilizing 25.1GB of VRAM. The remaining -1.1GB of VRAM means you can comfortably use a context window of up to 30K tokens, depending on the complexity of the input.

1. Install runtimeOllama

pip install ollama
ollama init

2. Download the model

Download the Q4_K_M quantized version of the Mixtral 8x7B Instruct model (24.6GB file size) from Hugging Face.

ollama pull TheBloke/Mixtral-8x7B-Instruct-v0.1-GGUF:mixtral-8x7b-instruct-v0.1.Q4_K_M.gguf

3. Run it

ollama run mixtral-8x7b-instruct-v0.1.Q4_K_M.gguf --n-gpu-layers 32 --flash-attn --context-length 32768

4. Optimize for RTX 4090

For optimal performance on the NVIDIA GeForce RTX 4090 with 24GB VRAM, set --n-gpu-layers to 32 to utilize the GPU efficiently. Enable --flash-attn for faster inference and better memory management. Given the 25.1GB VRAM requirement, you will have about -1.1GB of VRAM headroom, which limits the practical context window to around 30K tokens.

Troubleshooting

Out of memory errors during inference

Reduce the --n-gpu-layers parameter to 24 or lower and decrease the context length to 24K tokens.

Slow inference speed

Ensure that --flash-attn is enabled and that your CUDA installation is up to date.

Model fails to load

Verify that the model file has been downloaded correctly and that there are no file corruption issues.

Alternative runtimes

Alternative runtimes like LM Studio, llama.cpp, and Jan can be used for more advanced tuning options or if you encounter issues with Ollama. LM Studio is ideal for GUI-based model management, while llama.cpp offers more granular control over inference parameters. Jan is a lightweight alternative for quick prototyping and testing.

Other models that run great on RTX 4090

FAQ (20)

What GPU do I need to run Mixtral 8x7B Instruct?

To run Mixtral 8x7B Instruct, you need a GPU with at least 25.1 GB of VRAM, but 30.5 GB is recommended for optimal performance.

Is Mixtral 8x7B Instruct good for coding?

Mixtral 8x7B Instruct is well-suited for coding tasks due to its large context length of 32,768 tokens and strong language understanding capabilities.

Mixtral 8x7B Instruct vs Llama 3.1 8B?

Mixtral 8x7B Instruct has more parameters (46.7B vs 8B) and a longer context length (32,768 vs 2,048), making it more powerful for complex tasks but requiring more VRAM.

Can I run Mixtral 8x7B Instruct on a Mac?

Yes, you can run Mixtral 8x7B Instruct on a Mac, but you will need a Mac with an M1 or later chip and sufficient VRAM to handle the model's requirements.

How much VRAM does Mixtral 8x7B Instruct need?

Mixtral 8x7B Instruct requires between 25.1 GB and 30.5 GB of VRAM, depending on the quantization level used.

Is Mixtral 8x7B Instruct censored?

No, Mixtral 8x7B Instruct is not censored; it provides uncensored responses based on the input it receives.

Is Mixtral 8x7B Instruct commercial-use allowed?

Yes, Mixtral 8x7B Instruct is licensed under the Apache-2.0 license, which allows for commercial use.

Mixtral 8x7B Instruct context length?

The context length of Mixtral 8x7B Instruct is 32,768 tokens, allowing it to handle very long inputs and maintain context over extended conversations.

Want personalized recommendations for your exact setup? Detect my hardware →