Skip to content

Run Ollama On Your Own Machine

Category Local LLMs (Ollama)
Status ✅ Completed
Repo nextwork-run-ollama-on-your-own-machine
Original NextWork guide nextwork.ai

Learning project

Practice work following a NextWork guide, separate from my production projects.

📚 NextWork learning project. This is a practice project I built while working through NextWork's Run Ollama On Your Own Machine guide. It is part of my Learning portfolio and is fully separate from my production projects.

Category: Learning › Local LLMs (Ollama)
Status: ✅ Completed

Overview

Ollama runs open-weight LLMs entirely on your own machine: no API key, no cost per token, and your data never leaves the box. I installed it, pulled the small qwen2.5:0.5b model, and talked to it. The guide's key lesson is that the model knows general facts but nothing about you, which is why RAG exists (the next project). For the secret mission, I gave the model a persona with a Modelfile system prompt.

Summary

I installed Ollama on Linux, pulled qwen2.5:0.5b, chatted with it through the CLI and REST API, demonstrated the knowledge limitation that motivates RAG, and built the secret mission's custom persona with a Modelfile. All of it ran locally on CPU.

The checks behind this are in docs/verification.txt.

Skills & tools

Ollama, Local LLMs, qwen2.5, REST APIs, Modelfiles, System prompts, Bash, Python

What I built

  • setup.sh: checks for Ollama, starts the server if needed, and pulls qwen2.5:0.5b.
  • chat-demo.sh: one-shot prompts through ollama run and the /api/generate REST endpoint.
  • limitations.py: asks the model about the user and shows it can't know, then shows that adding context to the prompt fixes it (RAG in miniature).
  • Modelfile (secret mission): CaptainByte, a pirate-themed cloud tutor persona built on qwen2.5:0.5b with a system prompt and temperature.
  • persona-test.sh: builds the persona and checks it stays in character.

How to run

./setup.sh                      # install check + pull model
ollama run qwen2.5:0.5b         # interactive chat (type /bye to exit)
./chat-demo.sh
python3 limitations.py
./persona-test.sh               # secret mission

Verification

I ran the verification command on 2026-12-02. The full output is in docs/verification.txt.

./setup.sh && ./chat-demo.sh && PATH=/workspace/nextwork-portfolio/.venv/bin:$PATH python limitations.py && ./persona-test.sh

Original project: https://nextwork.ai/projects/d29b3139-ab79-5c60-adc3-7ab2d8545479 · Part of my NextWork Learning portfolio (hub).

Verification output

From docs/verification.txt:

$ ./setup.sh && ./chat-demo.sh && PATH=/workspace/nextwork-portfolio/.venv/bin:$PATH python limitations.py && ./persona-test.sh

ollama version is 0.40.19
NAME                       ID              SIZE      MODIFIED               
qwen2.5:0.5b               a8b0c5157701    397 MB    Less than a second ago    
--- ollama run (CLI) ---
Cloud computing allows users to access computing resources, such as servers, storage, applications, and data, over the internet, providing on-demand services based on user needs.

--- REST API: POST /api/generate ---
AWS services include Amazon S3, Amazon EC2, and Amazon VPC.
[17 tokens in 0.3s, all on this machine]
WITHOUT context: As an AI language model, I don't have personal preferences or emotions. However, I can tell you that many people find Python to be one of the most popular programming languages due to its simplicity, versatility, and wide range of applications. Python is widely used in data science, machine learning, web development, and automation.
WITH context:    Rust
PASS: the model only knows personal facts when we put them in the prompt (-> RAG)
captain-byte:latest        d5ce232e0051    397 MB    Less than a second ago    
captain-byte> An S3 bucket (short for Amazon S3) is a cloud-based storage service. Think of it as a treasure trove where you can store and access digital files, like photos, documents, or videos, securely. It's like a giant digital library where any pirate treasure or treasure ship can be stored and retrieved.
PASS: persona stays in character
⠋ ⠹ ⠸ ⠸ ⠼ ⠴ ⠧ ⠧ ⠏ ⠏ ⠙ ⠹ ⠹ ⠸ ⠼ ⠦ ⠦ ⠧ ⠇ ⠏ ⠋ ⠙ ⠸ ⠸ ⠴ ⠴ gathering model components gathering model components 
using existing layer sha256:c5396e06af294bd101b30dce59131a76d2b773e76950acc870eda801d3ab0515 
using existing layer sha256:eb4402837c7829a690fa845de4d7f3fd842c2adee476d5341da8a46ea9255175 
using existing layer sha256:832dd9e00a68dd83b3c3fb9f5588dad7dcf337a0db50f7d9483f310cd292e92e 
creating new layer sha256:ff38fc749e84ed953a229c9e4fabb898f8d4ce0df17c34e99d13bf4c1a4cd9bd 
creating new layer sha256:1362c6e1ec849a1a150e37d284262adca1fd9570c7b9fb70ed996d4d17c7f8a4 
writing manifest 
success 
⠙ 
[exit code 0]