When an on-device non-player character (NPC) is slow to answer, the right fix depends on whether the player is waiting for the reply to start or waiting for it to say enough to act on. In the 2025 preprint lm-Meter: Unveiling Runtime Inference Latency for On-Device Language Models, Haoxin Wang and colleagues timed the stages of inference on phones. They found that processing the prompt could be a major bottleneck and that the tradeoff between speed and accuracy varied by task. For dialogue, that makes history the first thing to trim when prompt processing holds up the opening line, and reply length the better lever when generating the rest takes too long. A model switch is worth testing when neither cut can meet the timing budget without losing something the scene needs.
What the Phone Benchmarks Measured
Wang, Xiao-Long Tu, Hong-Yu Ke, Huirong Chai, Dawei Chen and Kyungtae Han built lm-Meter to show where a mobile inference engine spends its time (https://arxiv.org/abs/2510.06126). They put timers inside the engine that runs the large language model (LLM), so they could separate prefill, when the model processes the prompt, from decode, when it extends the reply one token at a time. Across their experiments on the Google Pixel 6, Pixel 7 and Pixel 8 Pro, the authors used fixed prompts and deterministic generation settings for profiling, so changes in the input or sampling would not obscure the timing comparisons.
Prefill became much more expensive than decode as the authors moved up the Pythia model family in one benchmark comparison. With one request at a time, going from 70 million to 1.4 billion parameters raised average prefill latency across four tasks from 0.012 to 1.9 seconds per input token. Average decode latency rose from 0.015 to 0.15 seconds per output token. The authors therefore flag prefill as a bottleneck worth targeting on mobile. Those rates count different work, though: the time spent on a whole turn also depends on how much input the engine has to process and how much output the model generates.
The authors also found that a faster model could give up more accuracy on one task than on another. Smaller Pythia models decoded faster on the Pixel 8 Pro with a less severe accuracy tradeoff on the shorter factual questions in ARC-Easy than on the multistep arithmetic problems in GSM8K. Model family mattered too: SmolLM2-360M matched or exceeded Pythia-1B on the four benchmark tasks despite having roughly a third as many parameters. So the authors point to both the task and the model architecture when explaining which models offered a better balance of speed and accuracy.
Lowering the precision of a model's weights also changed that balance differently across models. When the authors tested 4-bit weights, the best combined scores for speed and accuracy relative to the original models came at smaller sizes for SmolLM2, while Pythia's score peaked at 1.4 billion parameters on the harder benchmarks. The authors write, “The choice between quantized and full-precision models should jointly consider model size, task type, and hardware constraints.” Their results give a reason to compare the actual builds a team could ship, because the same reduction in weight precision did not produce the same tradeoff across the two families.
Applying this to your game
The scene's promise determines what the team can cut. In a hypothetical ferry scene, a player has already shown a valid permit and now asks the clerk where to board. The game knows that the permit was accepted and that the departure moved to Pier 3, so the reply needs to give the new pier without asking the player to show the permit again. The dialogue can vary in tone, but the game can keep the accepted permit and the current pier in its own state, so the boarding option follows the same rule even if the generated line never arrives.
Two player-facing timings can tell the team which part of that turn needs work. An engineer can measure from submission to the first visible text, then to the point when the player has a complete answer and can continue. Alongside those timings, the engineer can log prefill, decode, and the numbers of input and output tokens. That separation matters because loading the model, waiting in a queue, or buffering text for display can delay the opening line even when prefill is fast. Replaying the same short and long turns on a supported device while the game renders, both after loading and in an already running session, helps expose waits that an isolated model test would miss.

History is the first candidate when the engine spends the opening wait processing old dialogue. The designer can replace a long transcript with the current pier, the accepted permit and any recent exchange the next line needs, leaving out greetings or explanations the player has already heard. The useful comparison is whether prefill and the visible wait shrink while the clerk still handles follow-ups such as “Why did they move it?” If the engine already reuses a cached copy of the unchanged beginning of the prompt, the team should compare with that reuse enabled. A shorter rewrite may provide little benefit if it forces the engine to process text it previously reused.
A reply cap earns its place when the first text appears on time but the player still waits for the answer. The designer can ask for one complete sentence that leads with the pier, then set a token ceiling to limit how many generation steps the model can take. The ceiling only saves work on replies that would have run longer, and it can cut a line off before the reason for the move. The team can check the time to a usable reply alongside how often lines end mid-sentence or players have to ask again. A quick opening followed by a missing answer has not shortened the turn the player needed.
A model switch makes sense when the shortest prompt and reply that serve the scene still miss its timing budget. The engineer can run a smaller model, a different family, or a lower-precision build against the same dialogue cases on the target device. The comparison should include both waits, how much memory each build needs, and whether it respects established facts such as the accepted permit. If the game would switch models during play, the team also needs to count any load time during the handoff. A model that decodes faster once loaded can still leave the player waiting longer for that turn.
The ferry scene needs a way to finish even when the chosen model misses its deadline. A designer can author a short boarding line that reads the current pier from game state, and an engineer can have the dialogue controller show that line and ignore any late reply. That gives the player a route to the ferry without another generation attempt, although it gives up the clerk's ability to answer a free-form follow-up in that turn. The team can time how often the fallback appears during repeated play and separately watch whether players can still board or feel they have to ask again. If the fallback makes a required exchange unusable, that exchange needs an authored route of its own before the team can count it as supported.
Sources
- lm-Meter: Unveiling Runtime Inference Latency for On-Device Language Models
paper · Haoxin Wang, Xiao-Long Tu, Hong-Yu Ke et al., 2025; full text read via arXiv HTML on 2026-12-02 · Source accessed: