How to measure tokens per second in LM Studio

Run the same prompt twice and a model looks hundreds of times quicker to start than it is. Five steps to a figure you can trust.

0:00

To measure tokens per second in LM Studio, avoid one easy mistake: running the same prompt twice. LM Studio reports a speed for every reply, but that mistake makes a model look far quicker than it is. In our test, a model that took 46 seconds to start answering a long prompt started in a third of a second when sent the same prompt again. This guide shows how to get a figure you can trust.

What does tokens per second mean in LM Studio?

It is how fast the model writes once it has begun. LM Studio reports it beside a second figure that matters as much: the time to the first token, which is how long the model spends reading your prompt before it writes anything. A model can write quickly and still keep you waiting, so record both.

Why is the second run of the same prompt so much faster?

LM Studio keeps the prompt it has just read. If the next prompt starts with the same text, it skips the reading. We sent one 3,806 token prompt to Gemma 4 31B three times without changing it, then once more with a different first line.

Run Wait for the first token Whole reply
First time 46.1 seconds 61.9 seconds
Same prompt again 0.32 seconds 16.0 seconds
Same prompt a third time 0.11 seconds 15.9 seconds
Different first line 47.1 seconds 66.4 seconds

The repeat was 144 times quicker to start, and the third run more than 400 times quicker. The writing speed did not change: about 11.2 tokens a second in every run. Anyone who warms up with a prompt and then times the same prompt is measuring the saved copy.

How do I measure tokens per second properly in LM Studio?

  1. Load the model and note the context length it was loaded with. Speed and memory both depend on it.
  2. Write three to five prompts of the kind you really use: a question, some code, a summary.
  3. Put a different first line at the top of every run, such as a run number. A changed first line forces the model to read the whole prompt again.
  4. Run each prompt three times and write down the tokens per second and the time to the first token that LM Studio shows.
  5. Take the middle result of each, not the best one.

How do I get tokens per second from the LM Studio server?

Start the local server and send your prompt to its own address, /api/v0/chat/completions, on port 1234. The reply carries a stats block with tokens_per_second, time_to_first_token and generation_time, so a short script can run the whole test and save every figure. The addresses are listed in LM Studio’s developer documentation.

What should I write down with the result?

A speed means little without what it ran on. Record the model and its exact build, the machine and its memory, the runtime and its version, the context length, how many tokens you allowed, and the date. That is the same list we keep for every entry in the index.

To time a model through a coding agent instead of a chat window, see how to run one prompt through Pi, OpenCode and Hermes.

Does the cache fool the timing on other models too?

Yes, on every one we have tried. We ran the same long prompt through five models in LM Studio, each time sending it once, then again unchanged.

Model Prompt length First wait Wait when sent again Reading speed
Gemma 4 31B 3,806 46.1 seconds 0.32 seconds 82 tokens a second
Qwen 3.8 27B 3,842 39.9 seconds 0.30 seconds 96 tokens a second
Bonsai 27B 3,799 34.7 seconds 0.24 seconds 110 tokens a second
Qwen 3.6 35B-A3B 3,799 6.1 seconds 0.04 seconds 625 tokens a second
GLM 4.7 Flash 3,657 10.5 seconds 0.03 seconds 350 tokens a second

In every case the repeat started in under a third of a second. The first wait ranged from about six seconds to about 46. So the size of the mistake depends on the model: on the slowest reader, a repeated prompt looks about 144 times quicker to start than it is.

What is reading speed, and why should I measure it?

It is how fast the model takes in your prompt, in tokens a second, before it writes anything. Divide the length of the prompt by the wait for the first token. It is a different figure from writing speed and it varies far more between models. Gemma 4 31B read at about 82 tokens a second and Qwen 3.6 35B-A3B at about 625, on the same Mac. If you paste long documents or use a coding agent, which sends tens of thousands of tokens before your question, reading speed decides how long you wait. A model that writes quickly and reads slowly will still feel slow in that kind of work.

How many runs do I need for a figure I can trust?

Three of each prompt was enough to see the spread on our machine, and the spread was small. Across 15 runs the slowest and fastest were close together for every model.

Model Slowest run Middle run Fastest run
Gemma 4 31B 11.40 11.74 12.04
Qwen 3.8 27B 9.02 10.09 11.34
Bonsai 27B 27.73 29.98 33.34
Qwen 3.6 35B-A3B 57.13 62.50 65.97
GLM 4.7 Flash 52.53 56.24 58.70

Quote the middle run. A single run can land at either end, and the fastest one flatters the model. If your three runs of one prompt differ by more than about a tenth, something else on the machine is competing for it. Close other programs and run again.

Why does my tokens per second figure look too good?

Check these four things, in this order.

  1. You repeated a prompt. The second run skipped the reading. Change the first line.
  2. You timed only the writing. A figure of 60 tokens a second means little if the model read for 40 seconds first. Record the wait for the first token beside it.
  3. The reply was cut short. If the model stopped at your token limit, the time you measured is the limit and not the time it needed.
  4. The tokens were thinking. In our tests several models wrote 600 tokens at full speed and showed none of them, because all 600 were hidden reasoning. Tokens per second counts those the same as visible ones.

What does tokens per second leave out?

Whether you got an answer. The figure measures how fast the model produces tokens of any kind. Three of the five models in the table above produced more than 29 tokens a second and, with 600 tokens allowed, not one visible word in 15 runs. A fair report of a model’s speed carries three figures together: the writing speed, the wait for the first token on a prompt of stated length, and how many runs finished with an answer inside the limit.

What is a good tokens per second for a local model?

It depends on what you will wait for. For a model that thinks before it answers, the wait matters more than the rate. In our test of Gemma 4 31B the model wrote at 11.7 tokens a second, and a 217 word answer still took 91 seconds.

How did we test this?

Every figure here comes from one Mac with an M4 Pro chip and 48 GB of memory, on macOS 27.0.1, using LM Studio’s llama.cpp Metal runtime 2.47.0 and its local server. The Gemma 4 31B runs were made on 3 October 2026, and the runs of the other four models on 4 and 5 October 2026.

Sources

  1. LM Studio developer documentation
Cite this page

Hill. "How to measure tokens per second in LM Studio". Onticpost, published 3 October 2026, updated 26 October 2026. https://onticpost.com/measure-tokens-per-second-lm-studio/

Updated 26 October 2026. This address stays the same when the piece is updated.

Share this

Subscribe to our newsletter

Checked: what AI can do for your business, checked by humans. Free, every Friday. One email a week, leave any time.

Free, every Friday. We send a link to confirm first. Our privacy policy says what we keep.