Skip to content
Filters & more
Model: GPT-OSS-20B
Recommended system memory: 32 GB
15 min
Beginner
ollamallminferencelocalapi
AMD GPU Driver Latest from Ryzen AI Developer Center
Ollama 0.32.6
AMD GPU Driver 26.8.1 (from Ryzen AI Developer Center)
Ollama 0.32.6
AMD GPU Driver Latest inbox driver
Ollama Latest
AMD GPU Driver Adrenalin 26.9.1
Ollama Latest
AMD GPU Driver Latest inbox driver
Ollama Latest
AMD GPU Driver Adrenalin 26.9.1
Ollama Latest
AMD GPU Driver Latest inbox driver
Ollama Latest
AMD GPU Driver Adrenalin 26.9.1
Ollama Latest
AMD GPU Driver RSL 26.14
Ollama Latest
AMD GPU Driver Adrenalin 26.9.1
Ollama Latest
AMD GPU Driver RSL 26.14
Ollama Latest
AMD GPU Driver Adrenalin 26.9.1
Ollama Latest
AMD GPU Driver RSL 26.14
Ollama Latest
AMD GPU Driver Adrenalin 26.9.1
Ollama Latest
Last validated: August 2026
Device Family
Device
OS

Getting Started with Ollama

Install Ollama and run LLMs locally — chat from the terminal, desktop app, or REST API.

Getting Started with Ollama

Overview

Ollama is a popular lightweight tool for running large language models locally. It handles model downloading, quantization, and serving behind a simple command-line interface and desktop app, so you can go from zero to chatting with an LLM in minutes.

This playbook walks you through installing Ollama, pulling the GPT-OSS 20B model, and having a conversation with it, through both the terminal and the desktop app.

What You’ll Learn

  • How to install and launch Ollama on your system
  • Pull and run the GPT-OSS 20B model locally
  • Chat with models using the CLI
  • Query models programmatically through the REST API

Setting the Memory Configuration

Install AMD Software: Adrenalin Edition

Download and install the latest AMD Software: Adrenalin Edition from amd.com/en/products/software/adrenalin.html.

Terminal window
if command -v rocminfo >/dev/null 2>&1 && rocminfo | grep -q gfx; then
echo "OK: GPU visible to ROCm"
else
echo "GPU not visible via rocminfo" >&2
exit 1
fi

Advanced: increasing GPU memory (optional)

You may need to increase the memory allocated to the GPU to run certain larger models or longer contexts. These devices use unified memory — the GPU shares system RAM — so this means letting the GPU claim more of that shared pool. Leave roughly 20% of system RAM for the operating system. This step is optional; the default allocation is enough for most workloads.

On Windows, adjust the memory in AMD Software: Adrenalin Edition: open it and navigate to Performance → Tuning → AMD Variable Graphics Memory. Set the value you need and reboot for the change to take effect.

AMD Software Adrenalin Edition — AMD Variable Graphics Memory panel

Backup method (BIOS). If your system does not show the Variable Graphics Memory option in Adrenalin (some OEM systems hide it), set the UMA Frame Buffer Size in the system BIOS/UEFI instead: reboot, enter setup (usually Del, F2, or Esc), find UMA Frame Buffer Size — also labeled Integrated Graphics or dedicated GPU memory, often under Advanced or AMD CBS → NBIO Common Options — set it to the size you need, save, and reboot. Menu names vary by vendor, and some BIOS do not expose it either.

On the AMD Ryzen™ AI Halo, adjust the shared memory in the pre-installed AMD Ryzen™ AI Developer Center: open it, go to the Settings tab, and under Graphics Performance Settings increase the Shared Video Memory slider. Click Apply Changes and reboot for the change to take effect.

AMD Ryzen AI Developer Center — Graphics Performance Settings with Shared Video Memory slider

On Linux, raise the shared GTT/TTM pool so the GPU can map more system memory. AMD recommends setting the minimum dedicated VRAM in the BIOS (0.5 GB) so the maximum is available as shared memory.

  1. Install the amd-debug-tools helper:
Terminal window
sudo apt install pipx
pipx ensurepath
pipx install amd-debug-tools
  1. Query the current shared-memory limit:
Terminal window
amd-ttm
  1. Raise it (value in GB — pick a size that leaves headroom for the OS):
Terminal window
amd-ttm --set <NUM>
  1. Reboot for the change to take effect.

Check for Software Updates

Before starting, ensure your Ryzen AI Halo has the latest software installed. Open the AMD Ryzen™ AI Developer Center and check for available updates, both to the app itself and additional software.

Go to the Updates tab. If updates are available, install them and reboot before continuing.

AMD Ryzen AI Developer Center — Updates tab on Windows

Go to the Manage tab. If updates are available, install them and reboot before continuing.

AMD Ryzen AI Developer Center — Manage tab on Linux

Installing Software Prerequisites

AMD GPU Driver

Update to the latest AMD GPU driver using AMD Software: Adrenalin Edition™.

  1. Open AMD Software: Adrenalin Edition from your Start menu or system tray.
  2. Navigate to Driver and Software, click Manage Updates.
  3. If an update is available, follow the prompts to download and install.

AMD GPU Driver

Install the AMD GPU Driver (amdgpu) using the Radeon Software for Linux (RSL) flow. For instructions for your distribution, see the ROCm installation at: Install the kernel driver.

For the driver itself, see Linux® Drivers for AMD Radeon™

Installing Ollama

  1. Download the installer from ollama.com/download.
  2. Run the .exe installer and follow the prompts.
  3. Once installed, Ollama runs as a background service and is accessible from the terminal, desktop app, and system tray.

Verify the installation by opening a terminal and running:

Terminal window
ollama --version

You should see the installed version number printed to the console.

Run the official install script:

Terminal window
curl -fsSL https://ollama.com/install.sh | sh

Verify the installation:

Terminal window
ollama --version

You should see the installed version number printed to the console.

Pulling Your First Model

Ollama manages models through a registry similar to container images. To download GPT-OSS 20B:

Terminal window
ollama pull gpt-oss:20b

This downloads the model weights to your local machine (approximately 12 GB). The download only happens once, and subsequent runs load the model from disk.

You can confirm the model is available with:

Terminal window
ollama list

You should see gpt-oss:20b in the output along with its size and last-modified date.

Model Naming

Ollama model names follow the format name:tag. The tag usually indicates the parameter count or quantization variant. Some useful commands for managing models:

CommandDescription
ollama listShow all downloaded models
ollama pull <model>Download a model without running it
ollama rm <model>Remove a model to free disk space
ollama show <model>Display model metadata and parameters

Chatting from the Terminal

Launch an interactive chat session directly from the command line:

Terminal window
ollama run gpt-oss:20b

Ollama loads the model into memory and drops you into a prompt. Try asking it something:

>>> What is the capital of France and why is it historically significant?

The model streams its response token-by-token directly in the terminal. Type /bye or press Ctrl+D to exit the session.

Chatting from the Desktop App

Ollama also ships with a desktop application that provides a clean chat interface for interacting with your models.

Open Ollama from the Start menu or click the Ollama icon in the system tray and select Open Ollama.

Once the app is open:

  1. Click New Chat in the sidebar.
  2. Select gpt-oss:20b from the model dropdown in the bottom-right corner of the chat input area.
  3. Type a message and press Enter to start chatting.

Ollama desktop app chatting with gpt-oss:20b

The desktop app keeps a history of your conversations in the sidebar, making it easy to revisit previous chats.

Using the REST API

After installation, Ollama runs as a background service and exposes a REST API on http://localhost:11434 that you can use to integrate models into your own applications and scripts.

Generate a Response in Terminal

Terminal window
curl http://localhost:11434/api/generate -d '{"model": "gpt-oss:20b", "prompt": "Explain GPU acceleration in two sentences.", "stream": false}'
Terminal window
curl.exe http://localhost:11434/api/generate -d '{"model": "gpt-oss:20b", "prompt": "Explain GPU acceleration in two sentences.", "stream": false}'

The response is a JSON object containing the model’s output in the response field.

Python Example

Now that we can hit the Ollama API programmatically, let’s call it from Python.

Create a Virtual Environment in Terminal

Terminal window
sudo apt install -y python3-venv
python3 -m venv ollama-env
source ollama-env/bin/activate
pip install requests
Terminal window
python -m venv ollama-env
ollama-env\Scripts\activate
pip install requests

Create a Python file

In the same directory, use VS Code or another editor to create a .py file and copy the following code into it. Then, run the file in your activated environment with python your_file_name.py

import requests
response = requests.post(
"http://localhost:11434/api/generate",
json={
"model": "gpt-oss:20b",
"prompt": "Write a haiku about local AI inference.",
"stream": False,
},
)
print(response.json()["response"])

Key API Endpoints

EndpointMethodPurpose
/api/generatePOSTSingle-turn text generation
/api/chatPOSTMulti-turn conversation with message history
/api/tagsGETList available models
/api/showPOSTShow model details
/api/pullPOSTPull a model from the registry

For the full API reference, see the Ollama API documentation.

Next Steps

  • Try different models: Browse the Ollama model library to explore hundreds of available models, from small coding assistants to large reasoning models.
  • Create custom models: Use a Modelfile to set custom system prompts, temperature, and other parameters for a tailored experience.
  • Build with the API: Use the Python or JavaScript client libraries to integrate Ollama into your applications.
  • Connect to frontends: Pair Ollama with tools like Open WebUI for a feature-rich chat interface with search, personas, and document upload.

For more information, check out the Ollama documentation.

Need help with this playbook?

Run into an issue or have a question? Open a GitHub issue and our team will take a look.