---
id: 18115
lang: en
title: "Swapping NVIDIA for AMD: Ollama Fell Back to CPU, Then Throughput Rose from 468 to 2,004 Sections per Hour"
published_at: "2026-11-24 22:38:20"
source_name: "Хабр: Машинное обучение"
source_url: "https://habr.com/ru/companies/otus/articles/1110018/?utm_campaign=1110018&utm_source=habrahabr&utm_medium=rss"
canonical_url: "https://news.hamidun.com/en/news/18115"
categories: ["research", "hardware"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# Swapping NVIDIA for AMD: Ollama Fell Back to CPU, Then Throughput Rose from 468 to 2,004 Sections per Hour

> **Краткая суть (BLUF):** The author swapped an 8 GB NVIDIA RTX 4060 Ti for a 32 GB AMD Radeon AI PRO R9700. Ollama, unable to find a GPU, silently ran models on the CPU: system load climbed to 117, and the processor throttled its clock 84,343 times in 37 minutes due to overheating. After configuration changes, batch generation of textbook sections accelerated from 468 to 2,004 sections per hour, depending on the backend. The takeaway: after changing graphics cards, verify where the model is actually running.  - Ollama's Vulkan backend limits a single memory buffer to roughly 4 GiB; ROCm has no such limit - A leftover NVIDIA variable in systemd also hid the AMD card from HIP - The NVIDIA Container Toolkit unit ran 1,410 times for no result

Replacing a graphics card in a home ML lab looks like a simple job: pull one out, put another in. In late September, the author of this story replaced a single NVIDIA RTX 4060 Ti with 8 GB of memory with an AMD Radeon AI PRO R9700 with 32 GB. The hardware went in without problems, but configuring everything else took about two days. The main problem: when the GPU becomes unavailable, the local neural network does not crash with an error. Instead, it quietly keeps computing on the ordinary CPU, only many times slower and with brutal system load. Still, after the setup, the author got what the effort was for: in a batch generation test of 32 sections of a training guide, throughput rose from 468 to 2,004 sections per hour, depending on the chosen backend (the program that runs the model).

## The Quietest Failure

The author's rig is serious: a dual-processor workstation with Xeon chips offering 88 threads, PCIe 3.0, and a 1,300 W power supply. The graphics card handled OCR, speech recognition, fine-tuning, Jupyter, and image generation. Because of the 8 GB limit, the language models in Ollama were already running on the CPU.

Before the swap, the author prepared: they confirmed the card (gfx1201, RDNA4 architecture) was on the ROCm (AMD's CUDA equivalent) compatibility list, installed ROCm libraries without the DKMS kernel module, backed up configs, and wrote a step-by-step plan with a rollback. That did not prevent surprises.

The first came before the new card was even installed: after an automatic kernel update, the matching NVIDIA module package did not appear, and the system booted at 1024×768. The second was a network interface that had carried one name for 171 days and changed it twice after the cards were moved. The name depends on the PCI bus number, and the numbering had changed. As a result, the WebRTC video bridge and the route into the local network stopped working. The fix is to pin the interface name to its MAC address.

The most unpleasant issue hit inference. Ollama did not find the GPU and, without a single error, moved computation to the CPU. It occupied about 41 cores, the system load average reached 117, embedding services stopped meeting their timeouts, and they fell into restart loops. The cooling was not designed for this: one processor throttled its clock 84,343 times in 37 minutes due to overheating (this is called thermal throttling). The author's conclusion: set up alerts for when an LLM ends up on the CPU.

## Backend and Config Traps

The first Ollama build used the Vulkan backend on AMD. Vulkan has a limit on the size of a single allocated memory block, just under 4 GiB. Because of this, a model with a 4.4 GiB tensor buffer placed 5.4 GiB of data in system RAM on the CPU side. ROCm has no such limit, so before choosing a backend, check the maximum buffer size your models need.

After switching to ROCm, Ollama still ran on the CPU for two more minutes. The cause was an old variable in a systemd drop-in file that had previously hidden the NVIDIA card from Ollama. HIP reads the same variable, so the AMD GPU was hidden too. A related trap: an empty HSA_OVERRIDE_GFX_VERSION in a ROCm container triggers the PyTorch error "No HIP GPUs are available," and this card does not need that variable set at all. It also turned out that systemd applies such files in lexicographic order, so an old file with the same variables overrode the new one. Check the effective values in the server's startup log, not in the edited file.

Another mistake was "accelerating" settings applied server-wide. Forced FlashAttention and an 8-bit KV cache worked fine with chat models, but the bge-m3 embedding model with a batch of 8,192 tokens could not allocate its compute buffer. Within about 20 minutes there were 238 failed requests, and library search got worse. Ollama's automatic per-model tuning turned out to be better.

NVIDIA leftovers also got in the way. The NVIDIA Container Toolkit update unit restarted 1,410 times, each time logging "No NVIDIA GPU found." Kubernetes pods with GPU limits hung in Pending. The author moved speech recognition, video transcoding, and the RAG application to CPU images, removed the NVIDIA device plugin and the DCGM exporter, and scaled services that were CUDA-only (OCR, Jupyter, the fine-tuning interface) to zero replicas. Fine-tuning on the new card remains an unsolved task. Monitoring also had to be rebuilt: the usual utility shows only ROCm/KFD processes, so Vulkan clients do not appear in its output. The author takes per-process memory from DRM client data and overall figures from sysfs and hwmon.

PyTorch OCR on ROCm first requested a GEMM workspace of 9.56 GiB. Disabling such convolutions helped, but pages took 30–62 seconds to process. When the author restored GEMM, capped the memory fraction, enabled MIOpen's fast algorithm search, and turned on expandable segments, processing time dropped, and the recognized text matched the output of the previous CUDA build.

## The Outcome

With 32 GB of memory, a 9-billion-parameter model with speculative decoding runs entirely on the GPU, and when needed, a dense 27-billion-parameter model also fits alongside it. A 35-billion-parameter MoE (mixture-of-experts) model, fully on the GPU, produced 60 tokens per second. The batch task of writing 32 textbook sections from the same prompt sped up from 468 to 2,004 sections per hour. Ollama, llama.cpp with different batch sizes, vLLM, and llama.cpp with Qwen3.5 9B and MTP were compared.

The practical takeaway for anyone planning a GPU swap: prepare a rollback plan, verify where the model is actually running, clean variables and units of the old card, and test each model type after changing shared settings. The story has one limitation: it reflects one home workstation, and the author has not yet tested fine-tuning on AMD.

---
- **Первоисточник:** [Хабр: Машинное обучение](https://habr.com/ru/companies/otus/articles/1110018/?utm_campaign=1110018&utm_source=habrahabr&utm_medium=rss)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/18115
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
