Guide Sizes GPU Memory Needs for Running DeepSeek R1 Locally via Ollama
A DEV Community guide explains how to run DeepSeek R1 on local hardware with Ollama, citing benefits such as no per-token API fees, data staying on the user's machine, and no cloud rate limits. It warns that choosing an oversized parameter tier or the wrong quantization can trigger out-of-memory errors or slow generation under two tokens per second. The article gives a formula for total VRAM, combining model weights, KV-cache usage that grows with context length, and fixed overhead. A table maps each DeepSeek R1 size, from 1.5B to 671B, to its recommended quantization, approximate memory use at a 16K context, suitable GPU tiers, and the Ollama command to run it. It also recommends enabling Flash Attention and 8-bit KV-cache compression on 12GB to 24GB GPUs.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in