← All guides AI Release
RU Subscribe to @ai_releaseorg

How to install DeepSeek on your PC and work offline: from 8 GB of RAM to 128 GB

Updated: 02.12.2026 · AI Release · @ai_releaseorg
How to install DeepSeek on your PC and work offline: from 8 GB of RAM to 128 GB

Guide passport

---

What you get

1. A working DeepSeek chat on your own machine — no subscription, no limits, no internet. The model is picked for your hardware: from 1.5B on an old laptop to 32B on a box with 24 GB of VRAM.

2. A script, deepseek-local.sh (Linux/macOS) or deepseek-local.ps1 (Windows) — it reads your RAM and VRAM, installs Ollama, pulls the right size, starts the service and prints tokens per second. One command instead of ten steps.

3. A test, test-local.py — 6 tasks (code generation, bug hunting, JSON extraction, text compression, arithmetic, Russian-language editing) checked automatically, with a report. It answers “does this model actually solve my tasks or just write nicely” with a number, not a feeling.

4. A ready system prompt and 5 task presets, so the local model works as an assistant from minute one instead of being a demo.

Quick start

Two commands and you have a local DeepSeek. The first installs the engine, the second pulls a model and opens the chat.

Windows (PowerShell):

irm https://ollama.com/install.ps1 | iex
ollama run deepseek-r1:8b

Linux / macOS:

curl -fsSL https://ollama.com/install.sh | sh
ollama run deepseek-r1:8b

deepseek-r1:8b is the right size for a laptop with 16 GB of RAM and 8 GB of VRAM. Different hardware needs a different model — see the table in Step 2. To leave the chat: /bye.

Optional accelerator. Three files ship with this guide and remove the guesswork:

bash deepseek-local.sh                          # Linux/macOS
powershell -ExecutionPolicy Bypass -File .\deepseek-local.ps1   # Windows
python3 test-local.py --model deepseek-r1:8b    # task check

Read on for how it all works, which model fits your machine, and how to verify it on your own tasks.

How it works under the hood

Local inference is three independent layers, and confusing them causes 90% of the problems.

1. Model weights — a file of numbers (GGUF format). It is downloaded once and then read locally. The file size decides whether the model fits in memory.

2. Inference engine — the program that does the math: Ollama (a wrapper around llama.cpp), llama.cpp directly, LM Studio, vLLM. It keeps the model in RAM/VRAM and streams tokens back.

3. Client — what you actually use: a terminal, a browser, VS Code, a script. It talks to the engine over HTTP on 127.0.0.1:11434, including the OpenAI-compatible /v1 path.

The internet is needed only to download the weights. After that, packets go nowhere: 127.0.0.1 is loopback, traffic never leaves the machine. That is where “free” (you pay for electricity) and “no limits” come from.

The honest part, without which this guide is useless. “DeepSeek on a laptop” and “DeepSeek V4.1” are different things:

What you pullWhat it really isFits in
`deepseek-r1:1.5b`–`32b`distills: Qwen2.5/Qwen3 models trained on R1 reasoning traces, under their base licencesan ordinary laptop
`deepseek-r1:70b`a Llama 3.3 distill, Llama licence48 GB of VRAM or a 64 GB Mac
`deepseek-r1:671b`the real DeepSeek-R1-0528 (MoE 671B/37B), MIT, ~404 GBa 512 GB server
`DeepSeek-V4.1-Flash-1017`the current open model, MIT, 552B backbone, 1M context128 GB of RAM + fast NVMe
`deepseek-v4.1-flash:cloud`not local: requests go to Ollama servers, account and payment required—

So on budget hardware you get not the frontier model but its compressed student. An 8B distill writes code, extracts data and holds a conversation reliably, but loses to the cloud V4.1-Flash on hard multi-step tasks. The rest of this guide is about squeezing the most out of what actually fits, and measuring it.

Local stack: model weights, engine, client — no cloud
Local stack: model weights, engine, client — no cloud

Step 1. Install the engine and a model in one command

What to do: run the script from the quick start. It does five things:

1. reads RAM (/proc/meminfo, hw.memsize, Win32_ComputerSystem) and VRAM (nvidia-smi; on Apple Silicon, 70% of unified memory);

2. picks the closest model size using the table in Step 2;

3. installs Ollama if it is missing;

4. starts the service on 127.0.0.1:11434 and pulls the weights;

5. sends a test request and computes tokens per second from eval_count/eval_duration.

How to verify it worked:

ollama list                 # the model is listed and its size is not zero
ollama ps                   # PROCESSOR: 100% GPU is good, CPU is bad
curl -s http://127.0.0.1:11434/api/tags | head -c 200

ollama ps is the main diagnostic. If the PROCESSOR column contains CPU, some layers did not fit into VRAM and speed drops 5–20×. That is not a failure, it is a signal to pick a smaller size.

Critical parameters worth knowing up front:

ParameterValueWhy
`num_ctx`4096–8192context length; every extra 8K costs 0.5–1.5 GB of VRAM
`num_predict`2048+on reasoning models the “thinking” eats the budget and the answer gets cut off
`OLLAMA_KEEP_ALIVE``30m`keeps the model in memory between requests, otherwise every call pays 5–15 s of loading
`OLLAMA_HOST``127.0.0.1:11434`do not expose the service to the LAN unless you must
`OLLAMA_FLASH_ATTENTION``1`less memory for context on supported GPUs
`temperature``0` for code and data extractionrepeatability; `0.6–0.8` for prose

On Linux Ollama uses CUDA for NVIDIA, Metal on macOS, ROCm on AMD (the supported card list is limited; old AMD and Intel parts fall back to CPU, which is slow).

Step 2. Which model fits your hardware

The table is based on file sizes in the Ollama library (Q4_K_M quantisation) and memory requirements. The rule is simple: the weights must fit entirely in VRAM, otherwise speed collapses.

HardwareModel (`ollama pull …`)FileWhat you get
8 GB RAM, no GPU`deepseek-r1:1.5b`1.1 GBdrafts, short answers, simple questions; confused on anything hard
16 GB RAM + 6–8 GB VRAM`deepseek-r1:8b`5.2 GBthe workhorse: code, text, data extraction
24 GB RAM + 12 GB VRAM`deepseek-r1:14b`9.0 GBnoticeably better at following instructions and long documents
32 GB RAM + 24 GB VRAM`deepseek-r1:32b`20 GBthe ceiling for a single consumer card
64 GB (Mac) / 48 GB VRAM`deepseek-r1:70b`43 GBtop of the distills, slow on a laptop
96–128 GB RAM + NVMe`V4-Flash-0731` UD-IQ1_S82.5 GBthe full DeepSeek architecture at 1-bit quantisation
128 GB RAM + fast NVMe`V4.1-Flash-1017` UD-IQ1_S233 GB (122 GB resident)the newest open DeepSeek, 5–10 tok/s
512 GB and up`deepseek-r1:671b`404 GBthe real R1, server only

Three conclusions that save you an evening:

If you have 96–128 GB: full V4.1-Flash via llama.cpp

Ollama offers V4.1-Flash only as a cloud tag. Locally it runs under llama.cpp, with the Engram table (196.6B parameters) staying on the SSD instead of taking memory:

# 1) build llama.cpp b11870 or newer (deepseek41 architecture support)
git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp
cmake -B build -DGGML_CUDA=ON && cmake --build build -j

# 2) download the 1-bit quant (233 GB)
pip install -U "huggingface_hub[cli]"
hf download unsloth/DeepSeek-V4.1-Flash-1017-GGUF \
  --include "UD-IQ1_S/*" --local-dir ~/models/v41-flash

# 3) run with the Engram table memory-mapped from disk
./build/bin/llama-cli \
  --model ~/models/v41-flash/UD-IQ1_S/*-00001-of-00005.gguf \
  --temp 1.0 --top-p 1.0 --top-k 0 --min-p 0.0 \
  --chat-template-kwargs '{"reasoning_effort":75}' \
  --load-mode mmap --lazy-mode on \
  --override-tensor "per_layer_token_embd.weight=CPU"

reasoning_effort (1–100) is the cheapest speed knob you have: on weak hardware, 40–60 instead of 100 shortens the “thinking” without wrecking quality. --override-tensor ... =CPU keeps the Engram table in system memory rather than VRAM. If that is still too much, use V4-Flash-0731 (82.5 GB at IQ1_S): same architecture, less quality, half the requirements.

Hardware → model size → memory zone matrix
Hardware → model size → memory zone matrix

Step 3. Test the model on your tasks

What to do: run test-local.py and look at two numbers instead of “I like it / I don’t”: how many tasks passed and how many tokens per second you get.

python3 test-local.py --model deepseek-r1:8b

The script asks six tasks and checks the answers automatically:

TaskWhat is checked
Code generationa `chunk(items, size)` function exists and returns
Bug huntingthe empty-list case is found (`len(xs) == 0` and similar)
JSON extractionthe answer parses as JSON and the numbers match: −18, 6, −3
Text compression≤ 40 words (the prompt asks for 25) with all three numbers kept
Multi-step arithmeticarrival time 18:25
Russian-language editingno anglicisms (“апдейт”, “пайплайн”, “фича”…)

A sample report — measured on a laptop (RTX 4060 Laptop 8 GB, 22 GB RAM, Ollama 0.34, num_ctx=4096, temperature=0), two models on the same hardware:

Task`deepseek-r1:1.5b` (1.1 GB)`deepseek-r1:8b` (5.2 GB)
Code generationFAIL — looped for 40,960 tokens, returned nothingOK, 23.5 s (including model load)
Bug huntingFAIL — same loopOK, 30.2 s
JSON extractionFAIL — numbers as strings `"-18%"` instead of `-18`OK, 12.1 s
Text compressionFAIL — 40 words instead of 25, anglicism in the answerOK, 14.3 s
Multi-step arithmeticFAIL — 18:40 instead of 18:25OK, 10.1 s
Russian-language editingOKOK, 16.1 s
**Total****1/6****6/6**
Average speed162 tok/s on short answers, but two requests took 4.5 minutes31.3 tok/s

That is the answer to “is DeepSeek worth installing on a laptop”: 8B closes all six tasks in under two minutes, 1.5B closes one and falls into endless “thinking” twice.

How to read the result. 5–6 out of 6 — good enough for daily work: code, documents, data extraction. 3–4 — partial: keep it for drafts and check facts. 0–2 — the size is too small for your tasks; go bigger or keep the local model for private text only. Speed below 8 tok/s on 8B means the model fell back to CPU: check ollama ps and the troubleshooting section below.

The measurements matter because “DeepSeek R1 is bad” is usually said by people who tried 1.5B at a low quant: on six typical tasks it scores 1/6, and the whole family gets blamed for it.

Ready task presets

Paste into ollama run <model> or into the API. All verified on the 8B distill.

You are a code reviewer. Inspect the snippet and return: (1) the bug, (2) why it shows up, (3) the fixed line. No praise, no restating the code. If there is no bug, say "no bugs found".

[insert code]
Compress the document into 7 bullets. One sentence per bullet, 20 words max. Keep every number, date and name. Do not add anything of your own. End with one line "Risks:" listing what the text does not say but the numbers imply.

[insert text]
Extract data strictly as JSON, no markdown fence, no commentary. Schema: {"counterparty": str, "amount": number, "currency": "USD"|"EUR"|"RUB", "date": "YYYY-MM-DD", "items": [str]}. If a field is absent, use null. Do not invent anything.

[insert contract or email text]
Rewrite the text in plain language without jargon or legalese. Keep the meaning and every fact. Length no longer than the original. Return only the rewritten text.

[insert text]
You are a planner. Break the task into steps of 30 minutes or less. For each step give: the action, the result, and how to verify the step is done. If the task needs external data, make that a separate step. Do not invent deadlines that are not in the input.

Task: [describe the task]

Step 4. Go offline and verify

What to do: turn off Wi-Fi/Ethernet (or enable airplane mode) and repeat a request. This is not a formality: without the check you can stay on a cloud tag and never notice.

# 1) the model answers without a network
ollama run deepseek-r1:8b "What is 17*23? Number only."

# 2) the service listens on loopback only
ss -tlnp | grep 11434          # Linux: 127.0.0.1:11434, not 0.0.0.0
netstat -ano | findstr 11434   # Windows

# 3) no outbound connections while answering
ss -tpn | grep ollama          # Linux: local sockets only

The “really offline” checklist:

Updating Ollama and pulling new models obviously need the network — but those are separate actions, not the model working.

Offline check: loopback, checklist, cloud comparison
Offline check: loopback, checklist, cloud comparison

Prompt to copy

A system prompt for a local assistant. Built for reasoning models (R1 distills): it demands the answer without the “thinking” in the output, admits uncertainty and does not ramble.

PromptCopy the whole block — this is the ready-to-use system prompt
You are a local AI assistant running on my computer. You work without internet, so never cite websites, never invent sources and never suggest "googling". If data is missing, say exactly what is missing and what to paste.

Answer rules:
1. Result first, explanation second. 120 words max unless asked for more.
2. Code must be working and complete, no "..." and no pseudocode. State the language.
3. Copy numbers, dates and names from the input unchanged. Do not round or recompute unless asked.
4. If you do not know, say "I don't know" plus one sentence on what to verify. Do not guess.
5. No flattery, no restating the task. No openers like "Great question".
6. If the task is ambiguous, ask one clarifying question, but first give the best answer under a reasonable assumption and name that assumption.
7. Formatting: plain text and lists. Markdown tables only for comparisons. No headings.

Answer in English unless asked for another language.

What to replace before use:

For code tasks, append: Environment: Python 3.12, standard library only — the model stops suggesting pandas where csv would do.

Troubleshooting

1. “It answers at 2–3 tokens per second, the fan is screaming”

Cause: the model did not fit in VRAM and layers moved to RAM. Check:

ollama ps
# NAME              SIZE     PROCESSOR    UNTIL
# deepseek-r1:14b   11 GB    62%/38% CPU  4 minutes from now

Fix in this order: drop a size (14b → 8b); lower num_ctx to 2048; close the browser and games that hold VRAM; on 8 GB cards keep OLLAMA_NUM_PARALLEL at 1. If CPU still appears, that is the hardware limit, not a setting.

2. `CUDA error: out of memory` or a hang on the first request

Cause: context plus weights exceed VRAM. 8B at Q4 is 5.2 GB of weights, but with num_ctx=32768 and the KV cache it easily passes 8 GB. Fix:

OLLAMA_CONTEXT_LENGTH=4096 ollama serve

and "options": {"num_ctx": 4096} in the request. OLLAMA_FLASH_ATTENTION=1 helps on supported GPUs. Do not set a huge context “just in case”: you pay for it in memory and in speed on every token.

3. “The model is dumb, mixes up instructions, makes up numbers”

Most likely you pulled 1.5b or 7b and expect a cloud chatbot. Check ollama list: if it says deepseek-r1:1.5b, this is normal behaviour for 1.1 GB of weights. Two options: go up to 8b/14b (needs 16–24 GB of RAM), or keep the small one for drafts and send hard tasks to the cloud. Third option: lower your format expectations — small models do better with short instructions and one example than with a long rulebook.

4. The model “thinks” for 4 minutes and returns nothing

In our measurements 1.5B looped twice: 40,960 reasoning tokens and an empty answer. That is not an Ollama bug, it is how a small reasoning distill behaves. Constrain it:

ollama run deepseek-r1:8b
>>> /set parameter num_predict 2048

Through the API use "options": {"num_predict": 2048, "temperature": 0.3} and add to the prompt: Think for no more than 150 words, then answer. If the answer is still empty, check message.thinking — reasoning models sometimes put the final text there and leave content blank. Above all: loops are a sign the model is too small; 8B answers the same prompts immediately.

5. `pull` crawls at 300 KB/s and keeps breaking

That is the network, not the model. Ollama resumes: a repeated ollama pull continues where it stopped. For large quants (80 GB+) hf download --resume plus a GGUF import via Modelfile is more reliable. Check free space: df -h on Linux/macOS, Get-PSDrive on Windows — 233 GB of V4.1-Flash will not fit on a disk with 100 GB free.

6. Windows: `ollama` is not found after installation

The installer updates PATH, but the current terminal does not see it. Close and reopen PowerShell, or run:

$env:Path = [Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [Environment]::GetEnvironmentVariable("Path","User")

What next

import json, urllib.request

body = json.dumps({
    "model": "deepseek-r1:8b",
    "messages": [{"role": "user", "content": "Say one word: working"}],
}).encode()

req = urllib.request.Request(
    "http://127.0.0.1:11434/v1/chat/completions",
    data=body, headers={"Content-Type": "application/json", "Authorization": "Bearer ollama"},
)
print(json.load(urllib.request.urlopen(req))["choices"][0]["message"]["content"])

More on the site: how much RAM and VRAM a local model needs, VRAM measurements on an RTX 4060, llama.cpp vs vLLM, downloading a model from Hugging Face, a local server on Strix Halo.

Glossary

🤖 AI summary

AI Release Knowledge Layer
Machine-readable description · Version 1.0

Status: practical guide. Some statements come from vendors; verify in your environment.

1. Summary

Run DeepSeek locally: pick a model for your hardware, install Ollama, test it on 6 tasks, verify offline mode and fix common errors. Script and test included.

Inside: direct answers, key facts, entities, context, reliability, unknowns and sources.

Machine data: Citation Map JSON · JSON-LD · Semantic Embeddings — separate stage.

Full Knowledge Layer: sections 2–8

2. Direct answers

What is this guide about?
Run DeepSeek locally: pick a model for your hardware, install Ollama, test it on 6 tasks, verify offline mode and fix common errors. Script and test included. → details (AR-GUIDE-DEEPSEEKLO-001)
How to do it?
Step 1. Install the engine and a model in one command → Step 2. Which model fits your hardware → Step 3. Test the model on your tasks → Step 4. Go offline and verify → details (AR-GUIDE-DEEPSEEKLO-004)
Which topics does it cover?
DeepSeek, локальная модель, Ollama, офлайн, GGUF, без интернета → details (AR-GUIDE-DEEPSEEKLO-002)

3. Key facts

  1. 1. A working DeepSeek chat on your own machine — no subscription, no limits, no internet. The model is picked for your hardware: from 1.5B on an old laptop to 32B on a box with 24 GB of VRAM. — evidence; status: анализ AI Release.
  2. 2. A script, deepseek-local.sh (Linux/macOS) or deepseek-local.ps1 (Windows) — it reads your RAM and VRAM, installs Ollama, pulls the right size, starts the service and prints tokens per second. One command instead of ten steps. — evidence; status: анализ AI Release.
  3. 3. A test, test-local.py — 6 tasks (code generation, bug hunting, JSON extraction, text compression, arithmetic, Russian-language editing) checked automatically, with a report. It answers “does this model actually solve my tasks or just… — evidence; status: анализ AI Release.
  4. 4. A ready system prompt and 5 task presets, so the local model works as an assistant from minute one instead of being a demo. — evidence; status: анализ AI Release.

4. Entities

EntityTypeRole
DeepSeekкомпанияупоминается в заголовке, TL;DR или разделах гайда
локальная модельтема/инструментупоминается в заголовке, TL;DR или разделах гайда
Ollamaтема/инструментупоминается в заголовке, TL;DR или разделах гайда
офлайнтема/инструментупоминается в заголовке, TL;DR или разделах гайда
GGUFтема/инструментупоминается в заголовке, TL;DR или разделах гайда
без интернетатема/инструментупоминается в заголовке, TL;DR или разделах гайда
Windowsплатформа/технологияупоминается в заголовке, TL;DR или разделах гайда
Linuxплатформа/технологияупоминается в заголовке, TL;DR или разделах гайда
macOSплатформа/технологияупоминается в заголовке, TL;DR или разделах гайда
Pythonплатформа/технологияупоминается в заголовке, TL;DR или разделах гайда

5. Context

  • Guide — describes → How to install DeepSeek on your PC and work offline: from 8 GB of RAM to 128 GB (AR-GUIDE-DEEPSEEKLO-001).
  • Guide — includes step → Step 1. Install the engine and a model in one command (AR-GUIDE-DEEPSEEKLO-001).

6. Reliability

Confirmed

No independent confirmation is provided; source claims and editorial conclusions are separated below.

Source claims

  • Product features, versions, prices and limits come from vendors and the guide.
  • Commands and steps are recommendations, not guaranteed results.

AI Release analysis

  • Structure, comparison and selection criteria are editorial.
  • The guide does not replace an independent audit or legal advice.

7. Unknowns

  • Current versions, prices and limits.
  • Independent benchmarks and quality checks.
  • Terms of use and data policy.

8. Sources

SourceTypeRole
ollama.comвнешний источникссылка из тела гайда
ollama.comвнешний источникссылка из тела гайда
github.comвнешний источникссылка из тела гайда

Cite as: AI Release. Как установить DeepSeek на свой ПК и работать без интернета: от 8 ГБ ОЗУ до 128 ГБ. ai-release.org.