Turning on the GPU made my model worse
For six weeks a local model of mine answered its classification prompt with garbage after its runtime moved it onto the integrated GPU. A safe default in my code hid every bad answer. How it happened and what I check now.
From August 23 to October 6, the model that sorts my email answered its classification prompt with garbage. The answer I have on record is the single word "QUIET," in reply to a prompt that asks for a JSON object. My code treated each bad answer as one it could not read, applied its safe default and carried on. I did not notice for six weeks.
The cause was GPU offload on my inference machine. I had left the setting for it switched on in August, at a time when the runtime could not use the GPU. A driver update changed that, and the next restart moved the models onto it.
August 10
This is the day I wrote about in August. I upgraded the model server, Ollama. The new version found no GPU it could use, every model loaded on the CPU, and I measured the CPU at the same speed the GPU had managed before. I decided to leave things there. I also noted that my configuration still carried the setting that allows the integrated GPU, and that it had nothing to act on.
On the same day, a routine operating system update brought in a newer release of Mesa, the open-source graphics driver stack. With that release, the Vulkan driver recognized this machine's integrated GPU, which the older one had not.
Nothing changed that day. The model server was already running and had already decided which devices it had.
August 23
The model server restarted. On the way up it found a GPU it could reach through Vulkan and loaded the models onto it. Ollama's documentation says of that backend: "Vulkan is enabled by default when the backend is installed."
The check for this takes one command. ollama ps has a processor column, and the FAQ says 100% GPU in that column "means the model was loaded entirely into the GPU." Mine would have said so. I did not look.
In April I wrote this sentence about sizing inference hardware: "Confirm with the runtime's own status command that the model is on the processor you think it is on, and look again after any driver or runtime upgrade." The driver arrived in an ordinary package update and the restart came thirteen days later. I looked after neither.
Six weeks of bad answers
Two small models do two jobs on that machine. One routes incoming messages to the right part of my assistant, which is the router from the August post about my prompt. Its output looked unaffected the whole time.
The other model classifies email. Every half hour a job reads new messages and asks the model to put each one in one of three buckets: act, keep or skip. The prompt is about 1,400 tokens and asks for JSON back.
On the GPU, that model stopped returning JSON for that prompt.
My classifier has a rule for an answer it cannot parse, and the rule is to label the message KEEP. I chose that deliberately. A model's label on my mail is allowed to annotate a message and is never allowed to hide one, so when the classifier is in doubt, the message stays in front of me.
For six weeks the classifier was in doubt about every message. Everything was labeled KEEP. The skip bucket, which had been taking about 550 messages a week, took none.
August 23. The model server restarted, found the GPU and loaded the models onto it. The email classifier began answering with garbage, and the skip bucket took nothing from then on.
Drawn from two figures in this post: about 550 a week before August 23, and none from then until October 6.
From my chair nothing was broken. There was no error, no crash and no alert. Mail kept arriving with labels on it. What I saw was an assistant that had started missing things.
Two things kept the fault hidden.
Short prompts worked. A quick question to the same model on the GPU came back fine. The corruption showed up on the long prompt. Every casual test I might have tried would have passed.
The other model looked fine. Both models ran on the same GPU through the same driver from the same day. One kept producing correct output as far as I could tell, and one did not. A model that works on a given GPU tells you nothing about the next model on it.
October 6
I found it on October 6. ollama ps showed every model at 100% GPU, on a machine I believed was running on the CPU.
The fix took two attempts. First I disabled Vulkan. Ollama's GPU documentation gives the setting: "you can disable all Vulkan GPUs by setting OLLAMA_VULKAN=0." With Vulkan off, the runtime fell back to its other GPU path for AMD chips, the ROCm library, still on the integrated GPU. The output was corrupt on that path too.
So I also switched off the setting that allows the integrated GPU, the one I had left on in August. Both settings now live in the service's override file. After a restart every model showed 100% CPU, and the classifier returned valid JSON for 27 of 27 test messages.
The comparison that proves it is easy to run. Send the same long prompt twice, once normally and once with the request forced onto the CPU, and compare the two answers.
I cannot tell you which layer was at fault. It could be the driver, the runtime's use of it or something about this particular chip, and I did not chase it. Two GPU paths gave bad output for this model on this hardware, and the CPU path gives correct output. I had already measured that the GPU bought no speed here. There was nothing to win by getting it working.
What I changed besides the setting
The fallback now reports. The triage job alerts me when half or more of the classifications in a single run fail to parse. The default is still KEEP. A fallback that fires on every message is an outage, and it now announces itself as one.
A check after every change to that machine. After an operating system update, a runtime upgrade or a reboot, I look at ollama ps and run the long-prompt comparison.
A number I should have been watching. The skip count went from about 550 a week to zero overnight and stayed there. That is a very loud signal on a graph, and I had no graph.
What I would take from it
A safe default hides failure when nothing counts how often it is used. In August I wrote, about the router, that a parse failure should be a different outcome from a real "none of these." I had not applied my own advice to the classifier.
GPU acceleration is a correctness risk as well as a speed option. The usual test after enabling it is a tokens-per-second figure. The test that would have caught this is a known prompt with a known answer, at production length.
Test with the real prompt. I keep writing that sentence. This time the short prompt and the long prompt gave different verdicts on the same model and the same hardware.
At work, a driver update on an inference node is a change to the behavior of every model on it. I would give it the same regression test as a model swap, and I would run that test again after the restart that follows, since the restart is when the new driver is picked up.
One caveat. The evidence covers one machine, one chip and two models, and I would not generalize from it to integrated GPUs as a class. On my hardware the corruption was silent, and nothing in my setup was built to notice.
Views are my own.