Guide · Local AI Characters · December 2026

The ROM Trick

The biggest speed trick in our lab for long chats with an AI character on your own hardware. Keep the character's fixed text first and unchanged, and the model reads it once. After that, every reply starts in a fraction of a second.

The thirty-second version

Why it works

As a model reads your prompt, it builds working notes on everything it has read so far (the KV cache). Local servers like llama.cpp and LM Studio keep those notes between messages. When the next prompt begins with exactly the same text, the server reuses the notes and only reads what is new.

The catch is the word exactly. One changed character near the top, like a clock, a date or a turn counter, and everything after it has to be read again. Most character setups put "today is…" right at the top, so they pay for the whole character on every single message.

THE ROM: who she is · voice · world · long memories (never changes)
today
the chat so far + the new message

The ROM trick: the fixed part first, and only the end changes. Read once.

clock
the same character text, read again because the clock above it changed
the chat

The common mistake: one changing line at the top, and the whole character is read again, every turn.

The numbers

Qwen 4 35B-A3B (our 2-bit), a 10,000-token character, Mac M1 Max, llama.cpp

first replyevery reply after
With the ROM trick16.7 s0.17 s to the first word
Without it (a clock line at the top)16.6 s16.6 to 17.7 s, every turn
After a server restart, restoring the saved read from diskrestore 0.28 s, then 0.26 s to the first word

With the trick, each later turn read only the 22 or so new tokens. Without it, each turn read 10,100 to 10,300. Writing speed was the same either way (46 tokens a second). The saved read for that character was a 1.1 GB file.

From our own characters, earlier this year

character, model, machinecold first replywith the ROM
A 3,400-token character, Gemma 4 26B, Mac M1 Max (LM Studio)3.0 s0.8 to 1.0 s
The same character, one 2015 Quadro M4000 (llama.cpp)47.8 s6 to 7 s
A 10,800-token character, Qwen 3.8 27B, Mac M1 Max153 sabout 2 s, restored from disk

The slower your card reads, the more this matters. On old hardware a long character can take a minute or more to read. With the ROM, you pay that once.

The rules

  1. Fixed first. The character's core, personality, voice, story, world and long-term memories, in the same order, byte for byte, every call.
  2. Changing things after. The date and time, today's notes, anything you looked up for this turn, and the conversation.
  3. Nothing that changes inside the fixed part. No dates, no times, no counters, no "last seen". One of those near the top costs you the whole read.
  4. Never rebuild the prompt, only add to it. If you add a note to a turn, keep it in the history so the next prompt still starts with the last one. A side call (a memory check, a judge) should be the exact same prompt plus one question, never a reshuffled one, or it can push the character out of the cache. This matters most on models with sliding-window or linear attention (Gemma 4, Qwen 4): llama.cpp reuses the cache when the new prompt extends the old one.
  5. One slot per character. On a server running two characters, pin each to her own slot so one chat does not overwrite the other's read.
  6. Save the read to disk so a restart does not cost you the cold read again, and warm it up when the server starts, before the first message.
  7. Cloud too. The same ordering turns on a hosted provider's prompt caching: on one we measured 96% of the input served from cache, at a fraction of the price.

In llama.cpp

# start the server with a folder for saved reads; for sliding-window models give the cache room
# (e.g. --cache-ram 6144) so a side call does not push the character out
llama-server -m model.gguf -ngl 99 -fa on -c 32768 -np 1 --jinja --slot-save-path ./slots

# every request: keep the cache, and pin the character to her slot
{"messages": [...], "cache_prompt": true, "id_slot": 0}

# save her read after a reply, and put it back after a restart
curl -X POST "http://127.0.0.1:8080/slots/0?action=save"    -d '{"filename":"iris.bin"}'
curl -X POST "http://127.0.0.1:8080/slots/0?action=restore" -d '{"filename":"iris.bin"}'

After a restore, send the conversation the saved read was made from plus the new message; the server then reads only the new part. If you change the character's fixed text, the old saved read no longer matches: one cold read, then save again. LM Studio keeps the cache in memory on its own; the ordering rules are what make it work.

Why it matters to usOur characters carry long identities and long memories, and we run them on our own machines, some of them old. Before the ROM trick a long chat meant waiting on every message. Now only the first one waits.

Questions or your own numbers: @Escher2112 on X. Our Qwen 4 files are on Hugging Face, and the test that made the Qwen 4 numbers is in the field report.

Read it once. Talk all night.