DEV Community

A Step-by-Step Guide to Install DeepSeek-R1 Locally with Ollama, vLLM or Transformers

DeepSeek-R1, an advanced AI reasoning model, challenges leading models like OpenAI's o1 without the high cost. It features a MoE architecture with 671 billion parameters, efficiently activating only a fraction during forward passes. Its unique reinforcement learning methodology enables chain-of-thought reasoning, self-verification, and reflection. DeepSeek-R1 outperforms o1 and other top models in key benchmarks. This guide provides three methods to install DeepSeek-R1 locally: Ollama for quick and easy setup, vLLM for optimized memory usage and high throughput, and Transformers for maximum flexibility and customization. To use Ollama, install it and run the model with a command. For vLLM, install Python, Rust, Cargo, vLLM, and load the model using a command. For Transformers, install dependencies, load the model, and run it using a pipeline. Nodeshift Cloud provides GPU-powered virtual machines for seamless deployment and scalability. By understanding these installation methods, you can efficiently use DeepSeek-R1 to enhance your applications across various domains, from mathematics and coding to logical reasoning.
favicon
dev.to
dev.to
Image for the article: A Step-by-Step Guide to Install DeepSeek-R1 Locally with Ollama, vLLM or Transformers