DEV Community

F.P. Mortal
F.P. Mortal

Posted on

7 1

An underwhelming story about trying to run DeepSeek R1 on AWS Free Tier

I chose t3.micro EC2 instance since it's the only one which is free tier eligible.

After setting it up and ssh-in into it, I installed Ollama:

curl -fsSL https://ollama.com/install.sh | sh
Enter fullscreen mode Exit fullscreen mode

Upon installation, I was welcomed with a warning:

>>> Install complete. Run "ollama" from the command line.
WARNING: No NVIDIA/AMD GPU detected. Ollama will run in CPU-only mode.
Enter fullscreen mode Exit fullscreen mode

When I tried to run DeepSeek R1 model with 1.5 billion parameters (the smallest one), I got an error:

$ ollama run deepseek-r1:1.5b
Error: model requires more system memory (1.7 GiB) than is available (589.4 MiB)
Enter fullscreen mode Exit fullscreen mode

According to specification, t3.micro has only 1GB RAM:

T3 instance types

beyond free tier

Okay, let's spare a few cents and move beyond free tier for the sake of science.

Next, I decided to give t3.small a try which is supposed to have 2GB RAM. The result:

$ ollama run deepseek-r1:1.5b
Error: model requires more system memory (1.6 GiB) than is available (1.5 GiB)
Enter fullscreen mode Exit fullscreen mode

Okay, let's give t3.medium with 4GB RAM a try. It finally works, albeit slowly. It took deepseek-r1:1.5b X seconds to incorrectly answer to the following prompt:

time ollama run deepseek-r1:1.5b "How many r's in 'strawberry'?"
Enter fullscreen mode Exit fullscreen mode

Output:

<think>
First, I'll start by examining the word "strawberry."

Next, I need to identify all the vowels present in this word. Vowels are letters that are typically considered sounds made with a single vowel or as an isolated vowel.

Looking at each letter:
- 's' is not a vowel.
- 't' is also not a vowel.
- 'r' is a consonant, not a vowel.
- The next 'a' is a vowel.

I'll check the rest of the letters to ensure I haven't missed any vowels. There are no other vowels in "strawberry."

In total, there's only one vowel present in the word.
</think>

To determine how many **r's** are in the word "strawberry," let's break it down step by step:

1. **Identify Each Letter:**
   - s
   - t
   - r
   - w
   - a
   - n
   - d
   - r

2. **Locate the 'r's:**
   - The first letter is **'s'**.
   - The next letter is **'t'**.
   - Then comes **'r'**, which is the first vowel in the word and an **'r'** that appears later on.

3. **Count the 'r's:**
   - There are two instances of **'r'** in "strawberry":
     1. The letter immediately after the start of the word.
     2. The second letter from the end of the word.

Therefore, the number of **'r's** in "strawberry" is:

\[
\boxed{2}
\]


real    1m11.212s
user    0m0.051s
sys 0m0.044s
Enter fullscreen mode Exit fullscreen mode

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more