think&test
Local AI · Lesson 01

Your first AI, running on your computer.

Meet Ollama and Gemma 2. In this first hands-on lesson, you’ll install a local model, talk to it from your terminal, and learn what each part is doing.

Beginner friendlyAbout 20 minutesNo account needed
A local conversation
$ start your model
ollama run gemma2:2b
> Hi! I’m running locally. What shall we explore?
Your prompt stays on your machine*
Hands-on guide

Run Gemma 2 with Ollama

Ollama is the program that manages local models. Gemma 2 is the language model we’ll ask questions. Start with the 2B version: it is a smaller download and a sensible first experiment.

1. Install Ollama

Download Ollama from the official download page and install the version for your system. On Windows and macOS, open the Ollama app after installation. On Linux, follow the instructions on the official page.

Then open a terminal (PowerShell on Windows, Terminal on macOS or Linux) and check that the command is available:

ollama --version

If you see a version number, Ollama is ready. If not, finish the installer and open a new terminal window.

2. Download and run Gemma 2

Enter this command. The first run downloads the model, so it can take a little while depending on your connection.

ollama run gemma2:2b

When the model is ready, type a message at the prompt. For example:

Explain what a local language model is in three short sentences.

To leave the chat, type /bye and press Enter. The downloaded model stays on your computer.

Hardware note: model speed and memory use depend on your computer and other running apps. The 2B model is the lightest Gemma 2 option. If it runs slowly, close other memory-heavy apps or pause here and tell me what computer you’re using.

3. Try these prompts

Use these to get a feel for how instructions change an answer:

  1. Explain: “Explain how a bicycle gear works to a 10-year-old. Use four bullet points.”
  2. Summarize: “Summarize why sleep matters in exactly two sentences.”
  3. Refine: Ask it to rewrite its answer “with simpler words and one practical example.”

Notice what it follows well and what it misses. Local models can make mistakes, so check important facts.

4. Check your setup

✓ Ollama respondsollama --version prints a version.
✓ Gemma 2 chatsollama run gemma2:2b opens a conversation.
✓ You can exitType /bye to return to your terminal.
✓ You know the limitationAnswers can be wrong; verify important information.

Useful commands

List the models stored on your computer, or remove one when you no longer need it:

ollama list
ollama rm gemma2:2b

More details are available in the Gemma 2 model page and Ollama documentation.