Back to Hub

What speeds up a local model? Measurements from one RTX 5090

What this is

An AI model running on your own computer writes its answer a few letters at a time, and large models are slow. This project tries the settings that are meant to speed that up, one at a time, and checks whether the answers get worse.

A large model writing on its own, compared with a small model guessing ahead and the large model checking
One of the settings tested: speculative decoding.

The question

Running a language model on your own graphics card means choosing a model, a quantisation, a context size and a handful of server flags. Advice is easy to find and hard to compare. I wanted numbers for my own machine, produced by one command that anyone can rerun, with a check on whether the faster settings give worse answers.

How it was measured

A Python runner starts a fresh llama.cpp server for each of 33 cases, sends a warm-up request, then measures. Token counts and speeds come from the server. Sampling is greedy, prompt caching is off, and speed cases are repeated three times. Memory is the peak sampled from the GPU.

Three models were tested: Muse Glimmer 30B, Qwen 3.8 27B and Inkling 2 Mini, with Qwen quantised three ways from the same source file. Accuracy used 100 questions from GSM8K.

Speculative decoding

A small draft model proposes several tokens and the large one checks them at once. It was the largest gain: 2.37× on Muse Glimmer, 2.85× on Qwen and 1.32× on Inkling, for 1.5 to 3.4 GiB more memory. It depends on how predictable the text is. Reasoning prompts gained 1.5× to 3.2×, chat prompts only 1.1× to 2.2×.

Bar chart of tokens per second with speculative decoding off and on for three models
One request at a time. Median of three repeats over ten prompts.

Several requests at once

Four concurrent requests raised total throughput 2.0× to 3.2×, while each request slowed down and waited longer for its first token. Drafting still helped under load, but by less: 1.2× to 1.7×.

Bar chart of total throughput with four concurrent requests, drafting off and on
Total tokens per second across four simultaneous requests.

Long prompts and quantisation

The models differed most on long prompts. The first token of a 24,600-token prompt took 7.2 s on Muse Glimmer, 7.6 s on Qwen and 14.2 s on Inkling.

Line chart of peak GPU memory against context size for three models
Peak GPU memory by context size, with the card's capacity for scale.

Moving Qwen from Q6_K to Q4_K_M ran 20% to 21% faster in 4.8 GiB less memory.

Qwen 3.8 27BTokens/s with draftingGSM8K correct
Q4_K_M221.795 / 100
Q5_K_M201.495 / 100
Q6_K184.196 / 100

Did speed cost accuracy?

Not in any way this test could detect. All models scored 94 to 96 out of 100, and the intervals overlap. On four questions that most or all models "got wrong", the answer key itself looks ambiguous or mistaken, so the models cannot score much higher on this test. Turning drafting on gave the same verdict on every question, although only 66 answers were word-for-word identical.

What I learned

The first version of this benchmark produced tidy tables that were wrong. It counted words and labelled them tokens, so its headline speed was well under what the server itself reported. Nothing crashed and the tests passed. The fix was to take counts from the server, cross-check them against client timings, and write a test that recalculates every published figure from the raw data.

On these numbers the practical default is drafting on and Q4_K_M, with the caveat that grade-school arithmetic is too easy a test to rule out a quality cost elsewhere.

Disclosure: this project was written with AI coding agents. The first version came from one set of agents; an audit with another found the problem above and led to the rebuild.

What's next

A harder accuracy set, more varied prompts, repeated sessions to see how much results drift between days, and controlled power and temperature. These numbers describe one card and should not be read as a ranking of the models.

Source code