Running Ollama on AMD GPUs with ROCm

Running Ollama on AMD GPUs depends on ROCm driver versions, supported Radeon and Instinct families and Linux group permissions. This page explains what to verify before you buy, install or promise capacity.

On this page

Running Ollama on AMD GPUs with ROCm: what teams must verify first

AMD support for Ollama depends on three things: the ROCm driver level installed on the host, the GPU family in use, and the operating system. Whether a given Radeon or Instinct card works is therefore a verification task to complete before rollout, not a question with a general yes or no. Teams with AMD hardware already in place, or those choosing cards for a private Ollama server, should confirm each of these three against the current support documentation before buying, imaging or promising users anything.

Ollama is an open source runtime written in Go with a llama.cpp backend, so the GPU path is handled by that backend on top of the driver stack. The part that changes the risk profile is the API. Ollama listens on 127.0.0.1 port 11434 by default and the local API does not require authentication. Once you set OLLAMA_HOST so that other people or applications can reach the box, the GPU host becomes a shared service and every verification step below should be run with that exposure in mind, including the network path and whatever access control sits in front of it.

This page is for three situations. The first is an AMD-only fleet, where the whole inference capacity depends on ROCm. The second is a data center estate using Instinct accelerators, where driver lifecycle and OS support are usually set by the platform team. The third is a mixed NVIDIA and AMD estate, where you need to confirm that scheduling, model placement and monitoring behave the same way on both vendors. In each case, confirm the ROCm version, the exact GPU model and the target distribution together, check the GPU against Ollama's current support table, and record the result before the hardware goes into service.

Which AMD GPU and OS path fits your server

A Linux server with Instinct or Radeon cards is the path most shared deployments take, because Ollama runs as a long-lived service that many users and applications call through the API. Start with Ollama's current GPU documentation, which lists the supported AMD families and the cards inside them. Match your exact model number against that list rather than relying on a family name from a product brochure. Then confirm the ROCm v7 driver requirements for your distribution and kernel, since driver support depends on the operating system version.

  • Exact card model: Confirm that the specific SKU appears as supported, because cards in the same product line can differ in support status.
  • Driver stack: Check the ROCm v7 driver minimum for your distribution and kernel before installation, and record the versions you deploy so later upgrades can be compared against them.
  • Service account: Plan the group membership the Ollama service user needs to reach the GPU device files, and retest access after every kernel or driver change.
  • Card count: Confirm how many cards the chassis will expose to Ollama and whether all of them are supported, since a mixed or partly supported set complicates model placement.

Before purchase, check the support list and the driver matrix for your exact distribution, then confirm with a test model run that the GPU is used.

ROCm settings and when each fits

This table compares the Ollama settings that matter most on AMD hardware, with the situation each one fits and the trade-off it brings. Read each row as a starting point: any LLVM target override must be tested against the exact GPU before it goes into production, and the concurrency and storage settings should be sized against the memory and disk your server actually has.

SettingWhen it fitsTrade-off and check
HSA_OVERRIDE_GFX_VERSION (LLVM target override)A Radeon or Instinct GPU sits close to a supported LLVM target but is not on the support listForces ROCm to treat the card as a nearby target. Can work or fail silently, so test loading and output on that exact GPU before production use
ROCR_VISIBLE_DEVICESSeveral AMD GPUs are installed and only some should serve OllamaLimits which devices the runtime sees. Confirm device indexes with ollama ps and logs after each change, since indexes can shift
OLLAMA_NUM_PARALLELA small number of users share one model and you want requests handled side by sideEach parallel slot adds memory use. Raise it only after confirming the model and context still fit in VRAM
OLLAMA_MAX_LOADED_MODELSSeveral models must stay resident so switching between them does not reload weightsDefault is 3 times the number of GPUs (or 3 on CPU). Higher values can exhaust VRAM and force unloads or errors
OLLAMA_MAX_QUEUEBursts of requests should wait in line rather than fail immediatelyDefault is 512 queued requests. A long queue hides overload from users, so monitor wait times and set limits your gateway can enforce
OLLAMA_MODELSModel files need a larger or dedicated disk than the default locationMoves model storage to another directory. The service account must be able to read and write the new path, and file permissions must be checked after the move

How to set up Ollama on a ROCm host

This sequence takes a Linux host from an unverified AMD GPU to a running Ollama server that uses the GPU for inference, with checks at each stage so problems surface before users depend on the service. It also confirms storage placement and concurrency behavior before the server is shared.

  1. Confirm GPU family and OS support

    Your infrastructure or platform engineer checks the GPU model, the operating system version and the ROCm v7 support matrix in Ollama's documentation before installing anything. Confirm the exact Radeon or Instinct family and the Linux distribution are listed, and record the GPU's VRAM for later sizing. Done means you have a written note of the card, OS and kernel version that matches a supported entry. If the card is not listed, stop here and ask the vendor or Ollama project about its status rather than assuming a workaround will work.

  2. Install the ROCm v7 driver stack

    The system administrator installs the ROCm v7 driver stack following AMD's current instructions for your distribution, and checks the official Ollama Linux guidance for any version pairing notes. Confirm the installation with the ROCm tools that report detected GPUs, and check that the reported model and memory match the hardware. Done means the GPU appears in the ROCm tool output on the host itself, before Ollama is involved. Confirm the exact package names and commands with AMD's documentation, because they change between releases.

  3. Add the service user to GPU access groups

    The administrator adds the account that will run Ollama to the Linux groups that control access to the GPU device files, then restarts the session or service so the change applies. Confirm the required group names in AMD's ROCm Linux documentation and in Ollama's installation notes, since they are not stated here. Done means the service account can list the GPU through the ROCm tools when run as that user, not only as root. Without this check, Ollama can start and silently fall back to CPU.

  4. Install Ollama and confirm GPU detection

    The platform engineer installs Ollama using the Linux method in the official documentation and starts the service under the account prepared in the previous step. Read the server logs immediately after startup and look for lines that name the AMD GPU and its available memory. Done means the log shows the GPU as a discovered compute device. If the log reports no usable GPU or lists only the CPU, fix group permissions or driver issues before continuing, because later tests will otherwise measure CPU speed.

  5. Set OLLAMA_MODELS to planned storage

    The administrator sets the OLLAMA_MODELS environment variable to the storage location chosen during planning, such as a dedicated volume with enough free space for the model collection. Set the variable in the service configuration, restart Ollama and confirm the service account can write to the new path. Done means a test pull writes files into the new directory and not the default location. Check that the path is backed by the storage you intend to back up and that the directory ownership matches the service account.

  6. Run a model and confirm GPU loading

    An engineer pulls a small model that fits in the GPU's VRAM, runs one prompt and then checks where the model is loaded using Ollama's running-model status command. Also check the server logs for lines that show layers being offloaded to the GPU. Done means the status output reports the model as running on the GPU, with no meaningful share on the CPU. If the model runs partly or wholly on the CPU, record the log lines, confirm the driver and group setup, and retest before moving on.

  7. Test concurrency settings under load

    Set OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_MAX_QUEUE to the values from your capacity plan, then send parallel test requests from a client that mirrors expected use. Watch the GPU memory and the server logs during the run, and confirm that requests complete or queue as designed. Done means the test shows no out-of-memory errors and no unexpected CPU fallback. Confirm the default values in Ollama's FAQ before testing, and record any multi-GPU behavior on ROCm as a known issue to validate in your environment.

Known multi-GPU issues on AMD and how to test for them

AMD multi-GPU behavior is the part of an Ollama setup most likely to change between releases, so verify it on your own cards before go-live. When one GPU cannot hold a model, Ollama spreads the model across the GPUs it can see. The default loaded-model limit, set by OLLAMA_MAX_LOADED_MODELS, is three times the number of GPUs, so a two-card server can keep up to six models resident at once. Those models share the same VRAM, so a model that loads cleanly on its own may slow down, fail or be unloaded once its neighbors arrive. Decide early which models must split across cards and which must stay on one card, and build your test plan around that split.

Start with loads that force a split: pick models larger than a single card's VRAM, load them alone, then confirm the placement with ollama ps and your ROCm monitoring tools. Next, send concurrent requests at the level you intend to run in production, keeping OLLAMA_NUM_PARALLEL at the value you plan to use (its default is 1). Record time to first token, total latency, HTTP errors and any requests held or rejected as the queue, set by OLLAMA_MAX_QUEUE (default 512), fills. Then cycle models so they unload and reload, and watch the server log for hangs, GPU resets or allocation errors. For every run, record the Ollama version, GPU model, ROCm driver version, kernel version and the exact model and quantization tested.

Release versions move quickly. Ollama v0.40.5 was released on 14 October 2026 and v0.40.6 was published as a pre-release on 16 October 2026, so a multi-GPU result recorded last month may no longer describe the server you run today. Check the Ollama GitHub releases notes for each version you deploy, including entries on ROCm and multi-GPU behavior, and confirm which known issues apply to that exact version with your hardware vendor and the release notes. Retest after every Ollama upgrade and every ROCm driver change, including pre-releases tried in staging, and compare each run against your stored baseline. A pass on one version is evidence only for that version and that driver stack.

Group permissions and service account risks

Most AMD GPU problems on Linux come from the account running Ollama, the groups it belongs to, and the container or service wrapper around it. The cards below cover five common failures, each with the symptom to look for and the check to run first.

Service user lacks device access

The most common AMD failure is that the service user cannot open the GPU device nodes. ROCm access runs through /dev/kfd and the /dev/dri render nodes, so the account running Ollama must be allowed to open them. The symptom is a server that starts and answers requests, while logs show no ROCm device and ollama ps reports CPU processing. Confirm with ls -l /dev/kfd /dev/dri and id ollama, then compare the group membership with what AMD's ROCm installation guide requires for your distribution.

Permissions break after updates

A working setup can stop working after a kernel or ROCm driver update. Device node ownership, group names and udev rules are set by the driver stack, so an upgrade can reset them or change which group owns /dev/kfd. Ollama may then start cleanly while silently falling back to CPU. After each update, rerun the device listing and the id check, and review the Ollama logs for GPU discovery lines before you return the server to users.

Containers lack device pass-through

A container running Ollama does not see host GPUs unless the device nodes are passed into it and the container user has the matching group IDs. Without both, the container starts and answers requests on CPU, and the failure looks like a slow model rather than a configuration error. Check by running the GPU detection step inside the container and comparing its output with the host. Confirm the exact device and group flags for ROCm containers in AMD's documentation and Ollama's docs before you write the compose file or manifest.

Services run as root

Some teams run the service as root to skip group setup. That gives the model server write access to the whole host and makes any network exposure more serious, because the local Ollama API has no authentication. Check the User= line in the systemd unit and run ps -o user= -C ollama to see the account in use. Run the service as a dedicated account with only the device groups it needs, and keep the bind address on 127.0.0.1 unless a proxy sits in front of it.

Ollama FAQ

Model directory ownership mismatch

The service account may be unable to write to its model storage. Ollama keeps models under /usr/share/ollama/.ollama/models on Linux, or in the directory set by OLLAMA_MODELS. If an administrator or another account created that path, pulls and model loads fail with permission errors that look unrelated to the GPU. Check ownership with ls -ld on the models directory and confirm the service account can read and write the model blobs before you troubleshoot the GPU itself.

Questions buyers ask before running Ollama on AMD

Is Ollama free to run on our own AMD hardware?

Yes. Ollama is open source under the MIT license, and its pricing page states that running models on your own hardware is always unlimited. The paid plans on that page apply to cloud models, so they do not change what a local AMD server costs. What you still pay for is the hardware, power and cooling, and the engineering time to install, test and maintain the server. Those costs recur. Drivers, the operating system and Ollama itself need regular patching, and the effort grows with the number of servers and users. Check the current pricing page before you build a budget, because plan terms can change.

How long does an AMD setup take and what drives it?

The duration depends mostly on whether your exact card, operating system and driver combination is on Ollama's current support list, and on how many GPUs and users the server must serve. Driver installation, kernel compatibility, group permissions and test model loads are the steps that usually need the most iteration. A shared server also needs time for model storage layout, network exposure and an authentication layer. A single workstation with one supported card is a much smaller job than a multi-GPU server for internal users. Ask any provider, including us, for a timeline tied to a written scope and a confirmed hardware list before accepting a generic figure.

What does the work need from our team?

The work needs a few decisions and some access from your side:

  • Access to the target hosts and an agreed change window with your infrastructure team
  • The exact GPU models, system memory, storage layout and operating system version of each server
  • A named owner for network placement, identity and who may reach the API
  • An approver for model sources, including any internal or fine-tuned weights you plan to load

The earlier these are settled, the fewer rework cycles you will see. Your team also needs to agree who owns the server after handover, because driver and Ollama updates will need someone to schedule and test them.

Can our own engineers set up AMD GPUs without a partner?

Yes, many teams can, provided they have solid Linux administration experience and time to test each step. The risks are less about the first install and more about what comes later: a kernel or driver update that breaks GPU detection, multi-GPU behavior that differs from a single card, and no written runbook when the person who built the server moves on. Before starting, review the Ollama GitHub repository and its open issues for your card family, and record every driver and environment variable you set. If your team has no prior GPU compute work, a fixed-scope engagement with documented handover can shorten the learning curve.

Which AMD cards should we buy for Ollama?

Start with the workload, then check the hardware. Estimate the VRAM your target models need at the context length and number of parallel requests you expect, then confirm that the card family is listed as supported in Ollama's current documentation and release notes. Also confirm which ROCm driver version that release expects for your operating system. Some setups need an LLVM target override to run an unlisted GPU. Treat that as a documented exception to test carefully, not a supported configuration, and avoid buying a card on the assumption that an override will work. Ask your vendor for a written statement of supported operating systems before purchase.

What is a fair scope for a partner engagement?

A fair scope names the hardware, operating system and expected users, then lists the deliverables in writing before work begins. Typical items include confirming the hardware against the support list, installing and verifying the driver and Ollama, checking GPU detection in the logs, configuring model storage and file permissions, setting the bind address and an access layer, load testing and a handover document. A scope should also state what is excluded, such as model fine-tuning, application development or ongoing operations unless a retainer covers them. DeployOpen agrees scope, deliverables and timelines in writing before work starts, and a quote follows from that written scope. We do not publish a price list.

Does a shared AMD Ollama server need a security review?

Yes. The local Ollama API at localhost:11434 does not require authentication, and Ollama binds to 127.0.0.1 by default. Moving the bind address with the OLLAMA_HOST variable or exposing the port through a proxy creates a network service that anyone who can reach it can use, unless you add authentication in front of it. Review how the server is reached, who can load or delete models and what the host logs. DeployOpen runs security testing of application, infrastructure and AI setups, and can test an Ollama server and its access layer before it goes into use. Read Ollama's API authentication documentation to see which endpoints are open and which need a key.

How DeployOpen scopes and delivers an AMD Ollama server

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure, including Ollama. For AMD GPUs with ROCm, we start from a written scope that confirms driver, GPU and operating system compatibility before any hardware is configured, then hand over a server your own team can run.

How we scope

  • Confirm the Linux or Windows host, the ROCm v7 driver version and the exact Radeon or Instinct GPUs before work starts.
  • Record the models, context lengths and expected concurrent users so VRAM needs are checked against the hardware.
  • Agree in writing whether a LLVM target override, multi-GPU placement or a container deployment is in scope.

How we build

  • Install the ROCm driver stack, add the service account to the required groups and confirm that Ollama detects every intended GPU.
  • Configure OLLAMA_HOST, OLLAMA_MODELS, OLLAMA_NUM_PARALLEL and OLLAMA_MAX_LOADED_MODELS to match the agreed workload.
  • Test model loading, GPU placement and multi-GPU behavior on the target hardware, then place authentication in front of the API.

How we hand over

  • Deliver a configuration record covering driver versions, environment variables, group membership and model storage paths.
  • Document the GPU detection checks, log locations and the steps to roll back a failed driver or Ollama upgrade.
  • Walk your operations team through the runbook and the known multi-GPU limitations so they can run the server without us.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • Ongoing support, upgrades and continuous testing are available as a retainer, including re-checks after Ollama and ROCm releases.
  • Ask for the support boundaries, response arrangements and retest terms to be written into the quote.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.