CyberCorps.uk · linux course

Artificial Intelligence: Open Weight Models

Run a language model on your own computer. Learn what open weights give you, get started with Ollama, and build a small assistant whose answers you can test.

Guided lessons
8
Suggested study time
3–4 hours
Starting level
Beginner

Run the course on Linux using a shell, the native Ollama runner, and Python 3. Choose the service instructions that match your system: an installed systemd service or one foreground server. Keep your code and evidence together in ~/CyberCorps/open-weight-models.

What you will be able to do

Choose with understanding

Read a model card, distinguish open weights from open source, and choose a model that fits your task and computer.

Run models locally

Install Ollama, pull a model, chat in the terminal, and manage downloaded and running models.

Build a repeatable workflow

Use the local API and a Modelfile to turn a useful prompt into a reusable assistant.

Evaluate the result

Test factual accuracy, uncertainty, and instruction following with a small, documented evaluation set.

Before you begin

  • A Linux computer on a supported architecture: the current installer recognises x86_64 and aarch64/arm64. Check the official Linux and hardware guides for your exact distribution, CPU, GPU, and drivers.
  • A shell such as Bash, curl, a plain-text editor, internet access for downloads, and permission to install software. The installer may request administrator privileges and reports missing tools such as zstd.
  • Free disk space for model files and sufficient available RAM or GPU memory for your chosen model and context. Start with gemma3:1b and observe your own machine; a download size is not a RAM requirement or a speed guarantee.
  • Python 3 for lessons 5 and 8, verified with python3 --version. Use your distribution's supported package instructions if it is missing; the course scripts use only the standard library.
  • Either an installed Ollama systemd service on a system running systemd, or a terminal you can keep open for a foreground server. Do not start both for the same local endpoint.

Each lesson includes a practical task, a success checklist, and a knowledge check. Keep your prompts, settings, and observations in a learning log as you work.

Your learning path

From first model to working assistant

Work through the lessons in order, or return to a topic when you need a refresher.

  1. Lesson 1 · 20 minutes

    Understand open weight models

    Understand weights, inference, licences, and the difference between local and cloud execution.

    Open lesson →
  2. Lesson 2 · 25 minutes

    Install Ollama and check your setup

    Prepare your computer and verify that your local Ollama service is ready.

    Open lesson →
  3. Lesson 3 · 25 minutes

    Choose and run your first model

    Download a small model, start a chat, and inspect the model running on your computer.

    Open lesson →
  4. Lesson 4 · 25 minutes

    Prompt clearly and evaluate answers

    Ground answers in supplied notes and test accuracy, format, and uncertainty with repeatable prompts.

    Open lesson →
  5. Lesson 5 · 30 minutes

    Use the local Ollama API

    Send chat requests from your terminal and Python, then read and validate the response.

    Open lesson →
  6. Lesson 6 · 25 minutes

    Create a reusable model with a Modelfile

    Package a system instruction and generation settings into a named local assistant.

    Open lesson →
  7. Lesson 7 · 25 minutes

    Manage models, memory, and privacy

    Inspect resource use, troubleshoot common problems, and keep local inference under your control.

    Open lesson →
  8. Lesson 8 · 35 minutes

    Build and assess a local study assistant

    Bring the course together in a small project with evidence, evaluation, and a clear handover.

    Open lesson →

Keep the essentials close

Find the main Ollama commands, a local API request, and the terms used throughout the course.

Open quick reference →