Experiments #113
Cross-turn reuse of the previous reply: Gemma 4's template renders a past model turn without the empty...
closed
What was tested
Cross-turn reuse of the previous reply: Gemma 4's template renders a past model turn without the empty thought channel its generation The text you send to the model before it starts answering. ended with (4 The unit of text a model reads and writes: roughly a short word or a piece of a longer one.), so every turn re-reads the whole previous reply (M3 chat: 830-token reply, about 3.6 s first token; NOT the M4's 0.50 s Cold means the server has never seen this prompt start; warm means part of it is already remembered from before. first token: race_sessions.py replays the production history, whose assistant turns are the recorded replies, never Gemma's own, so no engine can reuse them there). `tools/local_chat/make_reuse_model.py` renders it with the channel: on the M3, turns 2 and 3 reused 285 of 306 and 606 of 629 tokens, first token 0.13 to 0.14 s. A prompt change (4 tokens per past turn): timing pair on the 50 sessions replayed with self history (each later turn's assistant messages replaced by the engine's own replies of the same run, user messages as recorded) plus the anchored blind meaning read before adoption
Model and setup
the best
Expected gain
later-turn first token lower by about the previous reply's Prefill: the model reading the whole prompt before it can write the first token. Read more (size inferred)
Where the idea came from
M3 chat test
Outcome
closed 2026-10-31: smoke showed only 9 of 150 turns can reuse a previous reply (production history rewrites the system prompt, drops messages) and those overflow the 2 GB cache; kept as a local chat fix
Lesson
a cross-turn reuse fix needs a workload whose history is the model's own replies and unchanged system prompts; the 50 production sessions rewrite the system prompt and drop messages between turns, so only 9 of 150 turns could ever reuse a previous reply, and those overflow the 2 GB The server remembers the processed start of earlier prompts so that a repeated start is not recomputed. Read more.
Adopted
no (not applicable to the 50 sessions; kept in the local chat tools).