2 min read

Run DeepSeek-R1 Locally on Android

Run DeepSeek-R1 Locally on Android

Introduction

The AI revolution is no longer confined to high-end servers or cloud platforms. With models like DeepSeek R1—a state-of-the-art reasoning model that rivals OpenAI’s o1 in math, coding, and logic tasks—you can now harness advanced AI capabilities directly on your Android device. This guide walks you through deploying DeepSeek R1 locally, ensuring privacy, customization, and offline accessibility.

Why Run DeepSeek R1 on Android?

  • Privacy: Process sensitive data locally without relying on cloud services.
  • Cost Efficiency: Avoid API fees (DeepSeek’s API costs ~5% of OpenAI’s 10).
  • Offline Access: Use AI even without an internet connection.
  • Customization: Fine-tune models for niche applications, from coding assistants to creative writing tools

Prerequisites

  1. Hardware:
    • Android device with ≥8GB RAM (for 8B/14B models) and ≥12GB storage.
    • Snapdragon 8 Gen 2/3 or equivalent for smoother performance.
  2. Software:
    • Termux (a Linux terminal emulator for Android).
    • Basic command-line familiarity.

Step 1: Install Termux and Dependencies

  1. Download Termux:
    Get the latest APK from Termux’s GitHub (e.g., termux-app_v0.119.0-beta.1+apt-android-7-github-debug_arm64-v8a.apk).
  2. Set Up Termux:
termux-setup-storage  # Grant storage permissions
pkg update && pkg upgrade  # Update packages
pkg install git cmake golang libjpeg-turbo  # Install dependencies 

Step 2: Build Ollama from Source

Ollama is a lightweight tool to manage and run AI models.

  1. Clone Ollama Repository:
git clone --depth 1 https://github.com/ollama/ollama.git
cd ollama
  1. Compile Ollama:
go generate ./..
go build .  # Build the Ollama binary

Step 3: Download DeepSeek R1 Models

DeepSeek offers distilled models optimized for smaller devices. For Android:

./ollama run deepseek-r1:8b  # Download the 8B model 

Step 4: Run DeepSeek R1

  1. Start the Ollama Server:
./ollama serve & 
  1. Interact with the Model:
./ollama run deepseek-r1:8b
>>> "Write Python code to calculate Fibonacci sequence"

And voila 🥳you have the power of AI at your hand running locally and FREE!!


Conclusion

Running DeepSeek R1 on Android unlocks a world of possibilities—from coding assistance to academic research—all while keeping your data private. By following this guide, you’ve joined the forefront of mobile AI innovation.

For further exploration, check out DeepSeek’s GitHub repository

Don't hesitate to reach out!