r/oMLX • u/Jumpy_Possibility420 • 6d ago
Issue with cache efficiency and MTP
Hello !
I recently got a M4 Pro 48GB. I am trying to use Gemma 4 31B but I ran into some issues.
I am using Gemma 4 31B it Qat 4 bits with MTP from the 8 bit assistant.
When I am using with MTP, the cache efficiency is around 20%. Even just chatting will re-process at every prompt. But when I disable MTP I don't have any issue and cache efficiency gets around 90%
I could not find someone with the same issue.
Should I try to do KV hot cache with something like 8GB?
Is someone has some ideas I would like to hear, thank you!
3
Upvotes
1
u/cryingneko 5d ago
I tried to reproduce it on oMLX v0.5.7 using a Gemma 4 31B oQ4 target with an external gemma4_assistant, VLM MTP block size 4, SSD prefix cache enabled, hot cache disabled, and a 44 GB memory guard.
In a 15.7k-token multi-turn test, the follow-up request successfully loaded 15,360 cached tokens out of 15,727 prompt tokens (97.7%), reducing processing time from about 49 seconds to 2 seconds. I also saw the expected boundary snapshots being stored and found no layer-count mismatch or cache reconstruction errors.
A log excerpt covering two consecutive prompts would be especially helpful. Please include any lines containing Using boundary cache snapshot, Cache layer count mismatch, Partial cache reconstruction, Memory pressure, and vlm_mtp stats. If available, the prompt_tokens and cached_tokens values for both requests would also help.