Why Your Local LLM Setup Suddenly Became Slow (And How to Fix It)

GeneralUpdated
Why Your Local LLM Setup Suddenly Became Slow (And How to Fix It)

A local LLM that was fast yesterday and slow today has almost always hit one of three limits. Part of the model or its context cache has spilled from GPU memory into system RAM, the conversation has grown long, or the GPU is overheating and slowing itself down. Each cause has a quick test and a fix.

Your hardware is rarely broken. Work through the checks below in order: measure first, match the symptom, then change one thing at a time.

Measure before you change anything

"Slow" covers two different numbers. Prompt processing speed is how fast the model reads what you sent. Generation speed is how fast it writes the answer, in tokens per second. A token is a piece of a word; a hundred tokens is roughly 75 English words. Most runners print both speeds after each reply, and knowing which one dropped tells you where to look.

Three commands cover most cases on an NVIDIA GPU:

# GPU memory in use, utilisation and temperature, refreshed every second
nvidia-smi -l 1

# Ollama: how much of the loaded model sits on the GPU and how much on the CPU
ollama ps

# Ollama: print prompt speed and generation speed after each reply
ollama run YOUR_MODEL_ID --verbose

llama.cpp prints the same timings in its server log. Write down the numbers from a short prompt in a new chat. That is your baseline for every test that follows. Why token speed matters explains what different speeds feel like in use.

Match your symptom

What you seeMost likely causeQuick test
Slow from the first token, even in a new chatThe model no longer fits in VRAMCheck GPU memory and the CPU/GPU split
Fast in a new chat, slower as the chat growsThe context has grownStart a new chat and compare
Long pause before the first token, then normal speedThe whole prompt is being reprocessed, or the model is thinkingCompare prompt speed with generation speed
Fast for a minute or two, then slower, fans loudThermal throttlingWatch the temperature under load
Slow since you downloaded a "better" versionA larger quantization that does not fitCompare the file size with your VRAM
Slow only when a second app or person uses itParallel requests share the GPUSend one request at a time
Slow on battery or after an updatePower mode or changed defaultsPlug in; recheck the settings

Cause 1: the model spilled out of VRAM

A model runs at full speed only when its weights and its context cache both fit in GPU memory. When they do not, one of two things happens.

Runners built on llama.cpp, including Ollama, put as many layers as fit on the GPU and run the rest on the CPU. The model still works, at a fraction of the speed. On Windows, the NVIDIA driver can also move overflow into system RAM on its own, which shows up as "shared GPU memory" in Task Manager. Nothing crashes and no warning appears. Generation just crawls.

What changed since yesterday is usually something else taking VRAM:

  • A browser with many tabs, a game, a video call or a video editor. All of them use GPU memory.
  • Another model still loaded by a second runner or an editor plugin.
  • A larger context setting. An update to your runner or chat app can raise the default.
  • A larger model file than the one you used before.

How to fix it:

  1. Close GPU-heavy applications and unload other models, then reload yours and check that it is fully on the GPU.
  2. Lower the context size to what the task needs. The context cache is reserved for the size you configure, not for what you have used so far.
  3. Use a smaller quantization of the same model. See cause 4.
  4. On Windows, set the driver's CUDA system memory fallback option to prefer no fallback. You then get an out-of-memory error instead of silent slowness, which is easier to diagnose.

Cause 2: the context grew

Context affects speed in three ways, and they are easy to confuse.

It costs memory. The model keeps a key-value (KV) cache: the stored state for every token in the context, so earlier text is not recomputed for each new token. The cache grows with the context window and depends on the model's design. On our RTX 5090 pods, Qwen3.8-27B Uncensored at its full 256K context needs about 9.5 GB of cache on top of 18.5 GB of weights, by our estimate. Gemma4-26B-A4B Uncensored needs about 3 GB at the same 256K, because only 5 of its 30 layers keep the full context. If you raise the context window on a card that was already nearly full, the cache is what pushes you into cause 1.

It slows generation. Every new token looks back at everything before it. A chat holding 100,000 tokens generates more slowly than a new one on the same hardware. This is gradual and normal.

It can force the whole prompt to be reread. The cache only helps while the start of the prompt stays the same. When a chat reaches the context limit, the runner drops or shifts old messages. The beginning of the prompt changes, the cache no longer matches, and the whole history is processed again on every turn. You see a long pause before the first token even though generation speed looks normal. An app that puts the current time or other changing text at the top of the system prompt causes the same thing. How AI caching works covers this in more detail.

How to fix it:

  1. Start a new chat for a new task. Old context is a cost, not a help.
  2. Set the context window to what you need, not the maximum the model supports. Why context length matters shows what fits in each size.
  3. Keep the system prompt identical between turns so the cache stays valid.
  4. If your runner supports an 8-bit KV cache, turn it on. It stores the cache in about half the memory of the 16-bit default.

Cause 3: thermal throttling

A language model keeps the GPU at full load for as long as it generates. If the card cannot shed the heat, it lowers its own clock speed to protect itself. The pattern is distinctive: fast for the first minute or two, then slower, with the fans at full speed.

Watch the temperature and power draw in nvidia-smi while the model generates. If the temperature climbs to the card's limit and the speed drops at the same moment, heat is the cause. Check the maker's stated limit for your card, since it differs between models.

The usual reasons are dust in the fans and heatsinks, a laptop on a bed or sofa with its vents blocked, a quiet fan profile, or a hot room.

How to fix it:

  1. Clean the dust out of the fans, filters and heatsinks.
  2. Put a laptop on a hard, flat surface, or on a stand that leaves the vents open.
  3. Switch to a more aggressive fan profile while you run models.
  4. If the card still hits its limit, cap its power draw slightly. A small cap often costs little speed and stops the throttling.

Cause 4: you changed the quantization

Quantization stores a model's weights with fewer bits. Fewer bits means a smaller file and less memory, at a small cost in precision. A higher-bit file of the same model is not a harmless upgrade. It is larger, and it can be the reason the model stopped fitting.

Qwen3.8 27B is a good example. Published sizes for its quantized files are about 17 to 18.5 GB at 4-bit, 20 to 21 GB at 5-bit, 22 to 24 GB at 6-bit and about 30 GB at 8-bit. On a 24 GB card, the 6-bit file leaves almost nothing for the context cache. On our 32 GB RTX 5090 pods, the 5-bit file and larger do not fit together with the full 256K context, which is why we serve the 4-bit file.

A 4-bit file is not always a compromise either. Google trained Gemma 4 26B to be quantization-aware for 4-bit, so the 4-bit file is the one the maker intended you to run.

The fix is to pick the largest quantization that fits with the context you need, and to check the total, not just the file size: weights, plus context cache, plus any vision component. Qwen3.8 27B VRAM and GPU requirements and Gemma 4 26B VRAM requirements work through the numbers for those two models.

Cause 5: parallel slots and a second user

A local server can answer more than one request at a time, and two settings around that cause surprises.

First, memory. In llama.cpp's server, the context you configure is shared between the parallel slots. Depending on the version and settings it is split evenly, so four slots on a 32K context give each request 8K. In Ollama, the parallel setting multiplies the memory reserved for context. Either way, a parallel setting higher than you need shrinks your usable context or pushes the model out of VRAM.

Second, speed. Requests that run at the same time share one GPU. If an editor plugin sends autocomplete requests in the background while you chat, each stream gets slower. It looks like the model slowed down, but it is doing two jobs.

If you are the only user, set the number of parallel slots to one and turn off background features you do not use.

Cause 6: the model is thinking, not slow

Many current models reason before they answer. Those thinking tokens are generated at the normal speed, but your chat app may hide them. The answer then seems to start late even though tokens per second have not changed.

Check whether your app shows the thinking. If the delay is thinking time, lower the reasoning effort for simple questions or turn thinking off where the model allows it. AI effort levels explained covers when the extra thinking is worth it.

Smaller things worth a look

  • Battery and power mode. A laptop on battery or in a power-saving mode limits the GPU. Plug it in and choose the performance profile.
  • The wrong GPU. On laptops with two graphics chips, a runner can start on the integrated one. Confirm that the discrete GPU shows the load.
  • Updates. A new version of a runner, driver or chat app can change the default context size, the number of parallel slots or how many layers go on the GPU. Compare the settings with what you had before.

When the hardware is the limit

Sometimes every check passes and the model is still slower than you need. Then the limit is the card. The model you want, at the context you want, needs more memory than you have.

The numbers from our own pods show the scale. Qwen3.8-27B Uncensored with its full 256K context needs about 29 GB by our estimate: 18.5 GB of weights, 0.9 GB for the vision projector and about 9.5 GB of cache. That fits a 32 GB RTX 5090 but not a 24 GB card. On that pod it generates 79 tokens per second. Gemma4-26B-A4B Uncensored generates 175 tokens per second on one RTX 5090 and 112 on an RTX 4090.

You have three options: a smaller model, a smaller context, or a bigger GPU. If you would rather rent the bigger GPU than buy it, OpenLLM Buddy runs these models on dedicated pods behind an OpenAI-compatible API. You pay for pod time, with no per-token billing, and your prompts stay on your pod. The best uncensored open AI models you can deploy lists what runs on which GPU.

Deploy a model on a dedicated GPU

FAQ

Why is my local LLM suddenly so slow?

The most common cause is that the model no longer fits in GPU memory, so part of it runs from system RAM or on the CPU. A long conversation and an overheating GPU are the next two causes to check.

How do I check if my LLM is using the GPU?

Watch GPU memory and utilisation with nvidia-smi while the model generates. In Ollama, the ps command shows what share of the loaded model is on the GPU and what share is on the CPU.

Does a longer context window make an LLM slower?

Yes, in two ways. A larger context window needs a larger cache in GPU memory, and each new token takes longer to generate as the context fills up.

Why does my LLM take so long before the first token?

Either the whole prompt is being processed again because the cached start of the conversation no longer matches, or the model is spending tokens on hidden reasoning. Compare prompt processing speed with generation speed to tell the two apart.

Does a smaller quantization make a model faster?

It helps most when it lets the whole model and its context cache fit in VRAM, which can change the speed many times over. If the larger file already fits, the difference in speed is much smaller.

More to read

Other recent articles from our blog.