Sheikh Asif Ali
Sheikh Asif Ali </>

How to run Deepseek-R1 on your PC/Laptop, like a AI Companion Bot.

Originally published on medium.com
How to run Deepseek-R1 on your PC/Laptop, like a AI Companion Bot.

So Deepseek is the latest AI model out there, and it’s open source and is said that it’s on level with OpenAI’s o1.

So I wanted to test it out and see how cool it is. and spoiler alert, it’s really cool.

So let me tell you first how I ran it on my laptop.

Prerequisites

The first step is to have ollama installed and the easiest way is to run the ollama installer on Windows.

OllamaSetup Link Here

After it’s installed, simply open a terminal window.

Then you can choose which model to download, there are multiple models available with different parameter weights. List Here(for Deepseek-R1)

I used the 7b variant (4.7 GB), but you can choose whichever, and what your device can support. The 671b (Largest of them all) is 404 GB in size. 1.5B is just 1.1 GB.

Download the deepseek-r1:7b model.

In a terminal window, enter

ollama pull deepseek-r1:7b

While downloading, I got multiple times saying a EOF error.

Just run the command again, it will start from where it stopped.

Run deepseek-r1

ollama run deepseek-r1:7b

You can now directly prompt it in the terminal itself, the more challenging the question, the more it thinks, and works locally so you can even turn of the internet and it’ll still run.

What Can You Do…

Coding:

I asked it to create a simple function to solve one of my issues, the prompt I gave was a bit vague, so it started by thinking and reasoning and we can actually see what its thinking, but because the prompt was vague it thought for way to long so i stopped it.

Then tried with a better prompt, defining constraints, input, example output. Then it thought again and this time it was much more clear and actually gave the correct function.

So a developer can ask it questions, and can read the thought process to understand why it wrote the function the way it did. Great for people who are learning.

DSA:

Pretty much the same like coding. I gave it the 2 sum problem, and it thought about it, had the constraints, input, output, time and space complexity, used hashmap to solve it, and even had though about edge cases and lists all the reasons it did a particular thing. So good for understanding DSA too, although, have to test for hard level problems.

Literature:

So something different than software. I told it to write a poem on a topic. And constrained it to a few lines.

The topic?

Download the Medium app

“write a poem on software developers being scared of ai even though they should not be as ai is a tool not a replacement, write in rhymes and 3–4 lines”

And the result?

Code once thrived without light,

Now AI’s shadow looms large,

But tools only amplify the mind.

I guess its alright.

This is what ChatGPT-4o mini gave…

Lines of code and screens so bright,

Whispers of AI give some a fright.

Yet fear not, for it’s just a hand,

A tool to help, not take command.

It writes, it learns, but lacks a soul,

Guided still by our control.

So build with it, let worries cease,

Man and machine can work in peace.

The only better thing about deepseek-r1 is that it gives us it’s reasoning. ChatGPT Wins here.

Math:

I asked deepseek-r1, “Why 2+2=4”, it gave a alright, not very difficult to understand answer. You can try it too. ChatGPT gave mathematical Proofs for the same, deepseek-r1 didn’t.

Then I asked it “is 1+2=4”

Both surprisingly gave a very similar answer. Concluding that they need more information, and that it might be possible in other base systems.

Cool.

NOW Random Stuff:

I asked both deepseek-r1 and ChatGPT,

“what are the specifications of ps6”

ChatGPT said that it’s still not released so its just speculative hardware.

deepseek-r1’s response?

It hallucinated, and confused the PS5 with the PS6, but went in to saying that the PS6 has “8GB solid-state hard drive”, “Expected to have an extended battery life compared to previous models, possibly reaching up to 30 hours on a full charge.” and the best one “allowing for ample space with the potential to expand via a microSD card if needed.” Sony needs to step-up.

“today’s date”

ChatGPT answered correctly.

Deepseek-r1 couldn't answer as it isn’t realtime, and I got to know that deepseek-r1’s knowledge cutoff date is July 2024.

Interesting stuff Indeed.

So this was my time with deepseek. I’ll try the other models too, maybe they are better than this too.

I used the 7b model so that might have made a difference.

So if you like this consider supporting by sharing the article, giving your opinions, and what you will do with it.

See you in the next one.