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 Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay