Local Deployment of deepseek on Linux
Introduction
In December of last year, DeepSeek’s DeepSeek-V3 caused a huge stir in the global AI field. With extremely low training costs, it achieved performance comparable to top-tier models like GPT-4 and Claude Sonnet 3.5, stunning the industry. Tencent Tech had conducted an in-depth analysis of this model, explaining its technical background for achieving low-cost and high-efficiency results using simple and straightforward language.
This time is different; the newly released DeepSeek-R1 not only maintains the low cost but also sees significant advancements in technology. Moreover, it is an open-source model. This new model continues to leverage its high cost-effectiveness, achieving GPT-4-level performance at just a tenth of the cost. Consequently, many professionals have even raised the slogan that "DeepSeek will replace OpenAI."
This tutorial includes:
- Installing ollama
- Downloading and using DeepSeek models in ollama
- Interacting with Chatbox for chat functionality
Code exmaple
Installing ollama
Require sudo
sudo curl -fsSL https://ollama.com/install.sh | sh
Downloading and using DeepSeek models in ollama
- Start ollama
ollama start
or start and put it in the background
ollama start&
- Choose one version to download and run
DeepSeek-R1-Distill-Qwen-1.5B
Suggest 4-8GB graphics card memory or a multi-threaded CPUollama run deepseek-r1:1.5b
DeepSeek-R1-Distill-Qwen-7B
Suggest 8GB graphics card memoryollama run deepseek-r1:7b
DeepSeek-R1-Distill-Llama-8B
Suggest 8GB graphics card memoryollama run deepseek-r1:8b
DeepSeek-R1-Distill-Qwen-14B
Suggest 14GB graphics card memoryollama run deepseek-r1:14b
DeepSeek-R1-Distill-Qwen-32B
Suggest 24GB graphics card memoryollama run deepseek-r1:32b
DeepSeek-R1-Distill-Llama-70B
Suggest 4x RTX 4090 or 2x A100 total 80GBollama run deepseek-r1:70b
DeepSeek-R1 model
Suggest 8x A100/H100ollama run deepseek-r1:671b
Path of model storage in linux: ~/.ollama/models/
Start a Conversation
- Stop ollama
pkill -f ollama
Interacting with Chatbox for chat functionality
- Download app from website
https://chatboxai.app/zh#download
choose linux 64bit version to download
or copy link to downloadwget https://download.chatboxai.app/releases/Chatbox-1.9.8-x86_64.AppImage
- Give software running permissions. File with AppImage format could be run directly.
chmod a+x Chatbox-1.9.8-x86_64.AppImage
Run chatbox.
Make sure that ollama is running before you run chatbox.(See step of "Start ollama")./Chatbox-1.9.8-x86_64.AppImage --no-sandbox
- Click setting
Edit API Host to http://localhost:11434/
Select your model, edit your max message count, change temperature and save
- At last click New Chat to start a new communication
References
https://github.com/ollama/ollama
https://ollama.com/library/deepseek-r1