# How to Install & Run DeepSeek R1 Locally with GUI on Windows, Linux, and macOS | Step-by-Step Guide

## What is Deepseek R1 model?

DeepSeek-R1 is an advanced open-source artificial intelligence model developed by the Chinese startup DeepSeek. It is designed to excel in complex reasoning tasks, including mathematics, coding, and logical problem-solving. Notably, DeepSeek-R1 achieves performance comparable to leading models like OpenAI's o1, but with significantly lower development costs and computational requirements.

**Significance of DeepSeek-R1:**

* **Cost Efficiency:** Developed with a budget of less than $6 million, DeepSeek-R1 challenges the high-cost approaches of competitors, making advanced AI more accessible.
    
* **Open-Source Accessibility:** By open-sourcing DeepSeek-R1, DeepSeek promotes transparency and collaboration, allowing researchers and developers worldwide to study, modify, and enhance the model.
    
* **Technological Impact:** The model's emergence has prompted a reevaluation of AI development strategies, emphasizing efficiency and innovation over sheer computational power.
    

**Advantages of Running DeepSeek-R1 Locally:**

* **Data Privacy:** Processing data on local machines ensures that sensitive information remains secure, mitigating risks associated with transmitting data to external servers.
    
* **Customization:** Running the model locally allows for tailored modifications to meet specific project requirements, facilitating experimentation and optimization.
    
* **Reduced Latency:** Local deployment eliminates the need for internet-based API calls, resulting in faster response times crucial for real-time applications.
    
* **Cost Savings:** Operating the model on local hardware can reduce expenses related to cloud-based services and data transfer.
    

---

## **Key Considerations for Running DeepSeek-R1 Locally**

Before proceeding, keep the following DeepSeek-R1 models and their corresponding sizes in mind:

| Parameters (B) | Size (GB) |
| --- | --- |
| 1.5B | 1.1 GB |
| 7B | 4.7 GB |
| 8B | 4.9 GB |
| 14B | 9.0 GB |
| 32B | 20 GB |
| 70B | 43 GB |
| 671B | 404 GB |

When running DeepSeek-R1 locally on your computer, you should consider the following factors:

### **1\. Hardware Requirements**

* **VRAM (GPU Memory):**
    
    * The different model sizes range from **1.1GB (1.5B model)** to **404GB (671B model)**.
        
    * If you have a consumer-grade GPU (e.g., RTX 3060, 3070, 4080), you should opt for the **7B model (4.7GB VRAM required)** or the **8B model (4.9GB VRAM required)**.
        
    * Larger models (14B, 32B, 70B) require more powerful GPUs with at least **10GB+ VRAM**.
        
* **CPU and RAM:**
    
    * A powerful CPU (e.g., **AMD Ryzen 9 / Intel i9**) is recommended for inference.
        
    * You will need **at least double the VRAM size in system RAM**. For example, if you run the **7B model (4.7GB VRAM)**, you should have **at least 16GB RAM** for smooth performance.
        
* **Storage:**
    
    * Ensure you have enough disk space. The 7B model alone requires **4.7GB**, while the larger models (70B+) need **hundreds of gigabytes**.
        
    * An **NVMe SSD** is preferable for faster model loading.
        

### **2\. Software Requirements**

* **CUDA / ROCm (for GPU Acceleration)**
    
    * If you have an **NVIDIA GPU**, install the latest **CUDA** and **cuDNN**.
        
        * When you install the NVIDIA GeForce driver, it typically includes the **CUDA runtime libraries**—the components needed to run CUDA-accelerated applications.
            
    * For **AMD GPUs**, you will need **ROCm**.
        
    * If you use **CPU-only inference**, performance will be **significantly slower**.
        

### **3\. Model Selection**

* Choose a model that balances **performance and hardware limitations**:
    
    * **1.5B:** Very lightweight, suitable for older GPUs or CPU-only.
        
    * **7B / 8B:** Good for mid-range GPUs with **6GB+ VRAM**.
        
    * **14B+:** Requires **high-end GPUs (e.g., RTX 3090, A100, H100)**.
        

### **4\. Optimization & Performance**

* **Quantization**: Reducing precision (e.g., **GGUF 4-bit, 8-bit quantization**) helps reduce VRAM usage.
    
* **Batch Size / Context Length**: Adjust to balance response quality and speed.
    
* **Multi-GPU**: If you have multiple GPUs, some inference frameworks support model sharding.
    

---

## Ollama and Deekseek Installation

Before starting with the installation process make sure that if you are using windows, your nvidia graphic card is up to date. you can download and install the latest version of the graphic card from here: [https://www.nvidia.com/en-us/geforce/drivers/](https://www.nvidia.com/en-us/geforce/drivers/)

To find out whether Ollama supports your GPU you can visit: [https://github.com/ollama/ollama/blob/main/docs/gpu.md](https://github.com/ollama/ollama/blob/main/docs/gpu.md)

First, install Ollama and let it run in the background:

* For Windows: [https://ollama.com/download/windows](https://ollama.com/download/windows)
    
* For macOS: [https://ollama.com/download/mac](https://ollama.com/download/mac)
    
* For Linux:
    

```bash
curl -fsSL https://ollama.com/install.sh | sh
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738404798332/4df14a0c-efce-42c9-bd2a-7a2893ecb454.png align="center")

Next, download and install the model version that best fits your needs based on the explanation above.

To do this:

1. Visit Ollama’s DeepSeek-R1 Library: [https://ollama.com/library/deepseek-r1](https://ollama.com/library/deepseek-r1)
    
2. Choose your preferred model version (e.g., **8B**).
    
3. Copy the provided command and paste it into your terminal.
    

This installation process is the same for **Windows, macOS, and Linux**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738404494643/eb3c46a9-6dc8-4a36-91de-44db8a3dee89.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738405162788/224932c7-a329-42a5-b006-444f1cb06510.png align="center")

At this stage, you can start using DeepSeek-R1 directly from the command line. However, to create a more **ChatGPT-like experience**, we will install **AnythingLLM** for an enhanced user interface.

---

## AnythingLLM Installation and Configuration

* Visit AnythingLLM Desktop: [https://anythingllm.com/desktop](https://anythingllm.com/desktop)
    
* Download and install the appropriate version for **Windows, Linux, or macOS**.
    

Configure AnythingLLM:

* Open **AnythingLLM** after installation.
    
* Follow the configuration steps as shown in the screenshots below to set it up properly.
    

This setup will enhance your experience by providing a **ChatGPT-like interface** for interacting with DeepSeek-R1 locally. 🚀

Go to settings:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738405537309/e5b41746-dea8-421f-88fc-0ab5b7d739b7.png align="center")

Configure your LLM provider and then go back to its main page:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738405685111/8e4e5cb0-2a60-4cff-b7b0-fd2adbc81c8a.png align="center")

Create a new workspace, give it a name, and save it:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738405732270/242f3186-3980-46f5-903c-94a792b4e7c5.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738405782013/fc0b6280-abae-4545-b9a7-ada74fa74105.png align="center")

Go to the settings of your workspace and configure it according to the screenshot:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738405960297/27f2b32e-c369-475e-968a-146893110cce.png align="center")

After that choose default or new thread to start a new conversation:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738406171202/db08a211-e8be-49f7-a1d4-bc1193557144.png align="center")

Congratulations! You now have a powerful **OpenAI-O1-like model** running locally on your machine! 🚀

---

## AnythingLLM Alternative

If you're looking for an alternative to **AnythingLLM**, you can also use **LM Studio**. One key advantage of **LM Studio** is that you can **install models directly from within the app**, eliminating the need for manual downloads or additional setup.

#### How to Get Started with LM Studio

1. **Install LM Studio** – Download and install the software from [https://lmstudio.ai/](https://lmstudio.ai/)
    
2. **Search for Your Model** – Use the built-in search feature to find **DeepSeek R1** or any other model.
    
3. **Install & Run** – Click to install the model directly from the app and start chatting instantly.
    

This makes LM Studio a **convenient and user-friendly** option for running local AI models with minimal hassle. 🚀

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738428990062/d54a009a-48eb-4d2b-bfce-6d1bfe138bc0.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738429631252/5cfe0051-9334-4aa5-923b-456ba30986f4.png align="center")

Then start asking questions:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738429755780/a3b216da-583d-4fcb-b87f-19cd384292ca.png align="center")

---

## Ollama commands

To see the version of Ollama installed on your system:

```bash
ollama -v
```

To see a list of installed models with Ollama:

```plaintext
ollama list
```

To see how Deepseek is performing on your system:

```plaintext
# First run deepseek in teminal:
ollama run deepseek-r1:8b --verbose
# To exit chat mode:
/bye
```

Ask a question and check the stats at the end.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738407347421/1ca8e67a-1cd2-4740-967b-2de42fb8a033.png align="center")

To determine if the model is running on your **CPU or GPU**, use the following command:

```bash
ollama ps
```

Output:

```bash
NAME              ID              SIZE      PROCESSOR          UNTIL
deepseek-r1:8b    28f8fd6cdc67    6.3 GB    26%/74% CPU/GPU    28 seconds from now
```

<div data-node-type="callout">
<div data-node-type="callout-emoji">💡</div>
<div data-node-type="callout-text">The larger the model, the more VRAM it requires. If your GPU runs out of available memory, the system may offload part of the workload to the CPU, resulting in slower performance.</div>
</div>

To make sure that your system has detected your GPU, you can check the server.log located at `C:\Users\<username>\AppData\Local\Ollama`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1738408116020/8e78d84c-7c3a-492e-8010-dc940b74f710.png align="center")

Feel free to drop any questions in the comments section—I’m happy to help! 😊
