Last active
January 25, 2025 16:33
-
-
Save up1/f416297fe7f955295fb7db286a914f3c to your computer and use it in GitHub Desktop.
DeepSeek R1 + Ollaman
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download | |
$ollama pull deepseek-r1:7b | |
pulling manifest | |
pulling f4d24e9138dd... 100% ▕████████████████████████▏ 148 B | |
pulling 40fb844194b2... 100% ▕████████████████████████▏ 487 B | |
verifying sha256 digest | |
writing manifest | |
success | |
# Run | |
$ollama run deepseek-r1:7b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$python hello.py | |
<think> | |
Okay, so I need to figure out how many times the letter 'r' appears in the word "strawberry." Let me break this down step by step. | |
First, I'll write out the word: s-t-r-a-w-b-e-r-r-y. Now, I'll go through each letter one by one and count each 'r'. | |
Starting from the beginning: | |
1. The first letter is 's' – not an 'r'. | |
2. Next is 't' – still no. | |
3. Then comes 'r' – that's one. | |
4. After that is 'a' – not relevant. | |
5. Following it is 'w' – nope. | |
6. Then there's 'b' – no. | |
7. Next letter is 'e' – still nothing. | |
8. Now I see an 'r' here – that makes two. | |
9. Another 'r' follows right after the previous one, so that's three now. | |
10. Lastly, there's another 'y' at the end. | |
So adding them up: 1 + 1 (from the first r) + 2 more rs make it a total of three 'r's in "strawberry." | |
</think> | |
The word "strawberry" contains **three** 'r's. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ollama | |
response = ollama.chat(model='deepseek-r1:7b', messages=[ | |
{'role': 'user', 'content': 'how many r\'s in strawberry'}, | |
]) | |
print(response.message.content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment