How to Download and Run DeepSeek R1 Locally

Anastasios Antoniadis

Updated on:

AI

The DeepSeek R1 model from a Chinese team has recently made waves in the AI industry. With claims of matching ChatGPT o1 in performance and a top ranking on the US App Store, DeepSeek R1 has even rattled the US tech stock market. While the model is available free of charge on its official website, privacy concerns arise from the fact that data processed by the model is stored in China. Many experts now prefer to run DeepSeek R1 locally to mitigate these concerns and gain full control over your interactions. In this guide, we explore how you can do so using two powerful platforms: LM Studio and Ollama.

Why Run DeepSeek R1 Locally?

Running DeepSeek R1 on your own PC or Mac brings several benefits:

  • Enhanced Privacy: Your data never leaves your machine, eliminating worries about cross-border data transfers.
  • Offline Functionality: Work with the model without the need for a continuous internet connection.
  • Improved Performance: Leverage your local hardware—especially with a dedicated GPU—for faster response times.
  • Full Customization: Tweak configurations and resource allocations according to your needs.

However, keep in mind that while DeepSeek R1’s free online access is enticing, local deployment can help alleviate privacy risks associated with data storage in foreign jurisdictions.

Prerequisites

Before diving into installation, verify that your system meets these requirements:

  • Operating System: Windows 10 (or later), macOS 10.15 (or later), or a compatible Linux distribution.
  • Processor: A multi-core CPU is recommended; a dedicated GPU will significantly enhance performance.
  • Memory: A minimum of 16 GB of RAM is advised, with 32 GB or more ideal for smoother operation.
  • Storage: At least 10 GB of free disk space for LM Studio, the DeepSeek‐R1 model files, and auxiliary data.
  • Internet Connection: Required initially for downloading the LM Studio software and model files.

Tip: Ensure that your system drivers—especially for your GPU—are up-to-date to maximize efficiency and compatibility.

How to Run DeepSeek R1 Locally with LM Studio

LM Studio offers a user-friendly interface for managing and running large language models on Windows, macOS, or Linux. Here’s how to get started:

Step 1: Download and Install LM Studio

  • Version Requirement: Ensure you download LM Studio version 0.3.8 or later.
  • Platform Compatibility: LM Studio is available for PC, Mac, and Linux.
  • Installation: Follow the installation instructions provided on the LM Studio download page.

Step 2: Launch LM Studio and Access the Model Catalog

Model Search - LM Studio
Image Credit: Beyond Tech Now
  • Once installed, launch the LM Studio.
  • In the left pane, press the “Discover” button to open the search window and type “DeepSeek R1” in the search bar.
  • Under “Model Search,” locate the “DeepSeek R1 Distill (Qwen 7B)” model.
  • Make sure your system has at least 5 GB of free storage.
  • Click the “Download” button. The download size can be significant, so a stable internet connection is recommended.

Step 3: Load and Configure the Model

LM Studio - Open Chat and Select Model to Load
Image Credit: Beyond Tech Now
  • After the model is downloaded, go to the “Chat” window.
  • Press the “Select a model to load” button.
Load DeepSeek R1 Distill Qwen 7B
Image Credit: Beyond Tech Now
  • Select the DeepSeek R1 Distill Qwen 7B model and click the “Load Model” button.

Once loaded, you can immediately begin interacting with DeepSeek R1 locally. If you encounter errors, especially related to GPU memory, try reducing the “GPU offload” setting to 0 and reload the model.

GPU offload 0 LM Studio
Image Credit: Beyond Tech Now

How to Run DeepSeek R1 Locally with Ollama

Ollama is another free tool that allows you to run DeepSeek R1 models from your Terminal. This method is particularly appealing for users who prefer a command-line interface or are running on lower-end hardware.

Step 1: Install Ollama

Download Ollama
Image Credit: Beyond Tech Now
  • Download and install the latest version of Ollama for Windows, macOS, or Linux.

Step 2: Run the Model Using Terminal Commands

To test your setup and download the DeepSeek-R1 model, open your terminal or PowerShell and execute:

ollama run deepseek-r1

Available Model Variants

DeepSeek offers a range of R1 models, from the original 671-billion-parameter version to smaller, distilled models based on Qwen and Llama architectures. These distilled models are designed to retain strong reasoning capabilities while being more resource-efficient.

Selecting a Suitable Model

You can opt for a smaller version if your hardware cannot support the full 671B model. Replace X in the command below with your desired model size (options include 1.5b, 7b, 8b, 14b, 32b, 70b, 671b):

ollama run deepseek-r1:Xb

For example, to run the 8-billion-parameter model:

ollama run deepseek-r1:8b

This flexibility allows you to utilize DeepSeek-R1’s capabilities even without high-end hardware.

These commands allow you to interact with DeepSeek R1 directly from your terminal or PowerShell, providing flexibility for various usage scenarios.

From there on, you can start chatting with DeepSeek once it’s downloaded and installed.

Ollama chat with DeepSeek R1
Image Credit: Beyond Tech Now

How to Run DeepSeek R1 Locally with Open WebUI

If you’d like to run DeepSeek R1 on your computer with a ChatGPT-like interface, you can use Open WebUI from GitHub. This setup leverages Ollama’s instance to provide cool features such as a Code Interpreter, voice chat, file analysis, custom instructions, and more—all running locally.

Step 1: Prepare Your System

Check Python and pip version
Image Credit: Beyond Tech Now

Ensure Python and Pip are installed: Make sure your computer (PC or Mac) has Python 3.11 (Microsoft Store link) and Pip set up. At the time of writing, Python 3.12 and Python 3.13 don’t work with Open WebUI.

Additionally, your PATH env variable should include:

C:\Users\<username>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_<hash>\LocalCache\local-packages\Python313\Scripts

Where <username> is your username and <hash> is the individual hash of your Python 11 installation.

Step 2: Install Open WebUI

Open your Terminal or Command Prompt.

Install the interface by running:

pip install open-webui

(Note: The installation process may take a few minutes.)

Step 3: Launch DeepSeek R1 via Ollama

Run the DeepSeek model by executing:

ollama run deepseek-r1:7b

Follow any existing instructions to properly set up and run Ollama if you haven’t already.

Step 4: Start the Open WebUI Server

Initiate the server with:

open-webui serve

(Note: The server may take a few minutes to launch if this is your first time.)

Step 5: Access the Local Interface

  1. Open your web browser and navigate to:
    http://localhost:8080
  2. Click “Get started” and enter your name, email, and password when prompted to create an Admin account.
  3. Enjoy using DeepSeek R1:
    The interface will automatically select the DeepSeek R1 model in the drop-down menu, giving you access to all its features.
DeepSeek R1 with Open WebUI
Image Credit: Beyond Tech Now

Step 6: Shutting Down

To exit: Right-click the Ollama icon in the system tray and choose “Quit,” then close your Terminal window.

Quit Ollama
Image Credit: Beyond Tech Now

5. Model Performance

Hallucination and Factual Accuracy: In initial testing, both the 1.5B and 7B models have shown tendencies to hallucinate and occasionally present historical inaccuracies. However, they excel in creative writing and mathematical reasoning.

Scaling Up: The DeepSeek R1 32B model is recommended for those with powerful hardware. It offers superior performance in coding tasks and produces more grounded, reasoned responses.

6. Tips for Optimal Performance

System Resources: Always ensure your system meets the minimum requirements—especially RAM and storage.

Driver Updates: Keep your GPU drivers up-to-date to avoid compatibility issues.

Resource Allocation: Experiment with GPU offload settings in LM Studio if you face memory errors.

Community and Support: Engage with LM Studio and Ollama communities for troubleshooting tips and model optimizations.

7. Conclusion

The DeepSeek R1 model has taken the AI industry by storm, surpassing expectations set by models like ChatGPT o1 and even influencing the tech stock market. Despite its impressive performance, privacy concerns regarding data storage in China have prompted many users to opt for local deployments. By following this expert guide, you can harness the full potential of DeepSeek R1 on your own hardware using either LM Studio or Ollama. This local deployment not only protects your privacy but also opens up opportunities for customization and offline use.

Anastasios Antoniadis
Find me on
Latest posts by Anastasios Antoniadis (see all)

Leave a Comment