All CySA+ v4 labs

Lab 13 of 17 · By Michael Stout

In this lab

Use Copy beside a command to copy it exactly.

CYSA+ CS0-004 · DOMAIN I SECURITY OPERATIONS CyberCorps.uk · LAB 13
LAB 13 · LOCAL AI, AT A LARGER SCALE

Install Ollama and run Gemma 4 (31B)

Lab 1 put a 7-billion-parameter security-tuned model on your own machine. Gemma 4's 31B model is Google's newest general-purpose open model — roughly four times the parameters, real agentic and reasoning capability, and noticeably heavier hardware needs. This lab gets it running and gives you a feel for where “runs fine” turns into “needs a better machine.”

WHY THIS LAB

Bigger isn't just slower — it's a different capability class

Gemma 4's 31B model is a dense, general-purpose model — not fine-tuned for security work the way Lab 1's DeepHat was. Google built it for multi-step reasoning and agentic workflows: native function-calling, structured JSON output, and a 256K token context window, with vision built in as well as text. Running it locally means all of that stays on your machine, at the cost of real hardware headroom that a 7B model never asked for.

SAME TOOL, BIGGER MODEL

If you completed Lab 1, Ollama is already installed — skip straight to Part 2. This lab is the same workflow run against a genuinely bigger model, which is exactly the point.

BEFORE YOU START

What you'll need

OPERATING SYSTEM

Windows 10, version 22H2 or later, or Windows 11 — 64-bit.

DISK SPACE

At least 24 GB free. The model itself is a 20 GB download (Q4_K_M quantized).

MEMORY

32 GB system RAM is a safe minimum for a model this size running on CPU alone. A GPU with 16 GB or more of VRAM will make it noticeably faster, but isn't required.

TIME

30–60 minutes, most of it the download — this file is close to 40% larger than Lab 1's.

CyberCorps.uk · Lab 13 Page 1 of 2
INSTALL · PULL · EXAMPLES CyberCorps.uk · LAB 13
PART 1 · INSTALL OLLAMA

Skip this if you did Lab 1

  1. Download and install it. Go to ollama.com/download/windows, download OllamaSetup.exe, and run it — allow the permissions prompt and follow it to completion. Full walkthrough in Lab 1 if you need it.
  2. Confirm it's running. Open PowerShell and run:
    ollama --version
PART 2 · PULL AND RUN GEMMA 4

Watch what a bigger model actually costs

  1. Pull the model:
    ollama pull gemma4:31b
    This is a 20 GB download — leave it running. It'll take noticeably longer than Lab 1's model.
  2. Start a session:
    ollama run gemma4:31b
    The first reply is slower while the model loads into memory.
  3. Watch it work. While it's replying, open Task Manager (or run ollama ps in a second PowerShell window) and watch memory use climb. This is the hardware cost Part 1's “before you start” warned about, made visible.
  4. Exit when done: type /bye.
EXAMPLES TO TRY

Play to its actual strengths

TryWhat it's testing
A multi-step logic puzzleAsk it to reason through something with several dependent steps and show its work — this is what Google built the 31B model for.
Forced structured output“Return this as JSON with fields name, severity, recommendation.” Structured output is a named design goal, worth checking it actually holds the format.
A tool-calling scenarioDescribe two or three made-up tools and a task, and ask which tool it would call and with what arguments — the agentic use case behind function-calling support.
A long pasteDrop in several pages of text and ask a question that requires connecting the start to the end — a real test of the 256K context window, not just a claimed number.
SIZE DOESN'T BUY YOU CERTAINTY

A bigger, newer model is not a more honest one. Gemma 4 can still state something confidently and incorrectly — the same verification discipline from Lab 1 still applies here.

BUDGET YOUR MACHINE'S ATTENTION

Expect fans, heat, and a sluggish machine for anything else you run at the same time on modest hardware. Close what you don't need before a session.

Sources. Ollama, gemma4:31b model page and pull command, ollama.com/library/gemma4:31b. Google, Gemma 4 announcement, blog.google/innovation-and-ai/technology/developers-tools/gemma-4. Gemma 4 is licensed under Apache 2.0. Download size, benchmarks, and licensing terms are current as of September 2026 and worth re-checking before teaching this lab live.

CyberCorps.uk · Lab 13 Page 2 of 2

Connect this lab to your learning