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

Can RTX 4090 run DeepSeek R1 Distill 8B?

S

Yes — runs locally

~96 tok/sec · Instant — feels like typing. No noticeable delay.

Your VRAM
24 GB
Model size
8B
Best quant
Q8_0
VRAM needed
8.4 GB

The verdict

The RTX 4090 (24 GB VRAM) handles DeepSeek R1 Distill 8B comfortably using the Q8_0 quantization, which fits in 8.4 GB. Expected throughput is around 96 tokens/second, which feels Instant — feels like typing. No noticeable delay. in interactive use. Compact reasoning model. Good reasoning capabilities in a small package.

Setup tutorial: DeepSeek R1 Distill 8B on RTX 4090

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

TL;DR

The DeepSeek R1 Distill 8B model runs at Grade S on an NVIDIA GeForce RTX 4090 with Q8_0 quantization, achieving ~116 tok/sec.

Prerequisites

Before starting, ensure you have at least 10GB of free disk space, a 64-bit version of Windows or Linux, NVIDIA driver version 510.47 or later, and CUDA 11.4 or later installed.

Expected performance

With the Q8_0 quantization, the model should achieve ~116 tok/sec, using approximately 8.4GB of VRAM. This leaves about 15.6GB of VRAM for context, allowing for a practical context window of up to 131072 tokens.

1. Install runtimeOllama

pip install ollama
ollama init

2. Download the model

Download the Q8_0 quantized version of the model, which is 8.0GB in size.

ollama pull bartowski/DeepSeek-R1-Distill-Llama-8B-GGUF:DeepSeek-R1-Distill-Llama-8B-Q8_0.gguf

3. Run it

ollama run DeepSeek-R1-Distill-Llama-8B-Q8_0.gguf --n-gpu-layers 48 --flash-attn --tensor-parallelism 1

4. Optimize for RTX 4090

For optimal performance on the NVIDIA GeForce RTX 4090 with 24GB VRAM, set --n-gpu-layers to 48 to utilize most of the GPU memory. Enable --flash-attn for faster attention computation and set --tensor-parallelism to 1 to avoid unnecessary overhead. This configuration will allow the model to run efficiently while leaving enough VRAM for a large context window.

Troubleshooting

Out of memory errors during inference

Reduce the number of --n-gpu-layers or increase the batch size.

Slow inference speed

Ensure that --flash-attn is enabled and that the CUDA drivers are up to date.

Model fails to load

Check the integrity of the downloaded model file and try re-downloading it.

Alternative runtimes

Alternative runtimes include LM Studio for a more user-friendly interface, llama.cpp for more control over quantization and optimization, and Jan for distributed training. Use these alternatives if you need specific features not supported by Ollama or if you encounter performance issues with Ollama on your GPU.

Other models that run great on RTX 4090

FAQ (20)

What GPU do I need to run DeepSeek R1 Distill 8B?

To run DeepSeek R1 Distill 8B, you need a GPU with at least 5.1 GB of VRAM for the lowest quantization level, up to 8.4 GB for the highest. NVIDIA GPUs like the RTX 3060 or higher are recommended.

Is DeepSeek R1 Distill 8B good for coding?

DeepSeek R1 Distill 8B is well-suited for coding tasks due to its strong reasoning capabilities and compact size, making it efficient for code generation and debugging.

DeepSeek R1 Distill 8B vs Llama 3.1 8B?

DeepSeek R1 Distill 8B offers better reasoning capabilities in a smaller package compared to Llama 3.1 8B, which may have a larger context length but is generally less efficient in terms of resource usage.

Can I run DeepSeek R1 Distill 8B on a Mac?

Yes, you can run DeepSeek R1 Distill 8B on a Mac with an M1 or M2 chip, but performance will be better on a Mac with a dedicated GPU like the RTX 3060 or higher.

How much VRAM does DeepSeek R1 Distill 8B need?

DeepSeek R1 Distill 8B requires between 5.1 GB and 8.4 GB of VRAM, depending on the quantization level used.

Is DeepSeek R1 Distill 8B censored?

DeepSeek R1 Distill 8B is not inherently censored, but it adheres to ethical guidelines and may filter out inappropriate content based on the training data and configuration settings.

Is DeepSeek R1 Distill 8B commercial-use allowed?

Yes, DeepSeek R1 Distill 8B is licensed under the MIT License, which allows for commercial use without restrictions.

DeepSeek R1 Distill 8B context length?

DeepSeek R1 Distill 8B has a context length of 131,072 tokens, allowing it to handle very long sequences of text.

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