Running DeepSeek locally for free and without restrictions
True power of open source models is the freedom to run it without restrictions.
DeepSeek R1 has been the most viral AI product launch since ChatGPT over two years ago. Unlike OpenAI’s ChatGPT or Anthropic’s Claude, DeepSeek is an open-source model with an MIT license. This means that the source code and even the model weights are made available for anyone to use under the well known MIT license. Due to the viral success of DeepSeek R1, they company behind it is unable to scale resources and have restricted new signups and many users are also facing rate limits. However being an open source model, you can download it and run it for free on your laptop.
Download Ollama from https://ollama.com/
Ollama is a free, open-source tool that allows you to run large language models locally on your computers.
Direct link to Windows and MacOS download files are here.
Once installed open terminal and verify that Ollama is installed and you are able to access it.
% which ollama
/usr/local/bin/ollama
Ollama provides several flavors of the DeepSeek Model. The flagship model is deepseek-r1:671b
which is not suitable for local deployment unless you have hundreds of GB of RAM. You would want to try one of the distilled models which are optimized for use on you typical computers. These distilled models are created via fine-tuning against dense models widely used in the research community using reasoning data generated by DeepSeek-R1. The list in the order of ascending complexity and system requirements are
DeepSeek-R1-Distill-Qwen-1.5B
DeepSeek-R1-Distill-Qwen-7B
DeepSeek-R1-Distill-Llama-8B
DeepSeek-R1-Distill-Qwen-14B
DeepSeek-R1-Distill-Qwen-32B
DeepSeek-R1-Distill-Llama-70B
The Qwen distilled models are derived from Qwen-2.5 series and fine-tuned with 800k samples curated with DeepSeek-R1.
The Llama 8B distilled model is derived from Llama3.1-8B-Base.
The Llama 70B distilled model is derived from Llama3.3-70B-Instruct.
You can decide which model to run based on your available resources. You should have at least 8 GB of RAM available to run the 7B models, 16 GB to run the 13B models, and 32 GB to run the 33B models. In my case I have a M4 Pro MacMini with 48 GB of RAM. The DeepSeek-R1-Distill-Llama-70B
is not very performant on this machine, so I use a smaller model as my daily driver. The larger models can still run, but slowly. The larger models will also produce better quality output in general.
To run any model, use the below command
To run DeepSeek-R1-Distill-Llama-8B
ollama run deepseek-r1:8b
To run DeepSeek-R1-Distill-Qwen-14B
ollama run deepseek-r1:14b
Video of installing and running the deepseek-r1:14b
model.
Once installed, you can chat with the model right here in the terminal (>>>
). Just remember that DeepSeek is a reasoning model and you will first see the model go through its inner monologue within <think> tags before it gives you the answer. In my experience, I have seen that the larger models do a lot more thinking and give you a better output as a result of it. I find the thinking process very fascinating.
Other useful commands
TIP: The models are very large blob files and are stored in a mac in the home directory under the path .ollama/models/blob
TIP: You can type /? to get the list of options when you run a model.
>>> /?
Available Commands:
/set Set session variables
/show Show model information
/load <model> Load a session or model
/save <model> Save your current session
/clear Clear session context
/bye Exit
/?, /help Help for a command
/? shortcuts Help for keyboard shortcuts
Use """ to begin a multi-line message.
TIP: /show info will give you details about the model you are running.
>>> /show info
Model
architecture llama
parameters 70.6B
context length 131072
embedding length 8192
quantization Q4_K_M
Parameters
stop "<|begin▁of▁sentence|>"
stop "<|end▁of▁sentence|>"
stop "<|User|>"
stop "<|Assistant|>"
License
MIT License
Copyright (c) 2023 DeepSeek
TIP: /bye to exit ollama and come back to your terminal
>>> /bye
Below is the inner monologue / thinking in italics and the final response from the model in bold when I asked the 70B model “why is the sky blue”. You can compare it with the output you are getting if you are running a different distilled model.
>>> why is the sky blue
<think>
Okay, so I'm trying to figure out why the sky is blue. I remember hearing about something called Rayleigh
scattering in school, but I don't really remember the details. Let me think this through step by step.
First, I know that sunlight is made up of different colors, right? Like a rainbow has red, orange, yellow,
green, blue, indigo, and violet. Each of these colors has a different wavelength. I think the shorter
wavelengths are on the violet end and the longer ones are on the red end. So blue must have a shorter wavelength
than red.
Now, when sunlight comes into Earth's atmosphere, it interacts with the molecules and tiny particles in the air.
Rayleigh scattering is the term for this interaction, I believe. But how exactly does that work? If the light
scatters, does it scatter all colors equally or not?
I think smaller molecules like nitrogen and oxygen in the atmosphere are more effective at scattering the
shorter wavelengths of light. Since blue has a shorter wavelength compared to red, maybe blue light is scattered
more by these molecules. That would mean that as sunlight travels through the atmosphere, the blue light gets
scattered in all directions.
So if I'm looking up at the sky and seeing blue, it's because the blue light from the sun is being scattered
towards my eyes from all parts of the sky. During sunrise or sunset, the sun is lower on the horizon, so the
light has to pass through more atmosphere. That longer path scatters the shorter wavelengths even more, leaving
mainly the longer red wavelengths to reach us, which is why sunsets are often reddish.
Wait, but does this mean that space would look black because there's no atmosphere to scatter the blue light? I
think astronauts have mentioned seeing a black sky with the Earth's atmosphere glowing blue from space. That
makes sense if scattering is responsible for the blue color we see.
Also, if all wavelengths were scattered equally, the sky might appear white or something else, but since shorter
wavelengths like blue and violet are scattered more, why isn't the sky violet then? Oh, maybe because our eyes
are more sensitive to blue light than violet. So even though some violet is scattered, it's not as noticeable.
Let me see if I can think of any other factors. Maybe particles in the air like pollution or dust could affect
the color, but that's probably more about why sometimes the sky looks hazy rather than changing the basic blue
color from scattering.
So putting it all together: Sunlight has various colors with different wavelengths. The atmosphere scatters
shorter wavelengths (blue/violet) more than longer ones (red/orange). Our eyes are more sensitive to blue, so we
see a blue sky during the day and red sunsets when the light travels through more atmosphere.
</think>
The sky appears blue due to a phenomenon known as Rayleigh scattering. Here's a breakdown of the process:
1. **Sunlight Composition**: Sunlight is composed of various colors, each with different wavelengths. Violet and
blue have shorter wavelengths, while orange and red have longer ones.
2. **Interaction with Atmosphere**: As sunlight enters Earth's atmosphere, it interacts with molecules like
nitrogen and oxygen. These molecules scatter light more effectively at shorter wavelengths, such as blue and
violet.
3. **Scattering Effect**: Blue light, having a shorter wavelength than other visible colors, is scattered in all
directions by atmospheric molecules. This diffuse scattering results in the sky appearing blue during the day.
4. **Sunrise/Sunset Colors**: During sunrise or sunset, sunlight travels through more of the atmosphere. This
increased path scatters shorter wavelengths (blue) out of sight, allowing longer wavelengths (red/orange) to
dominate, creating colorful sunsets.
5. **Perception and Sensitivity**: Although violet light is scattered more than blue, our eyes are less
sensitive to violet, making the sky appear blue rather than violet.
6. **Space Perspective**: In space, without atmosphere, sunlight doesn't scatter, so the sky appears black,
highlighting the Earth's atmosphere as a thin blue layer.
In summary, Rayleigh scattering of shorter wavelengths, particularly blue light, by atmospheric molecules,
combined with human eye sensitivity, results in the sky appearing blue.