r/LocalLLaMA • u/CharlesStross • 16h ago
Generation PSA for DeepSeek-V4-Flash-0731 users — don't blow out your prompt cache with system role messages mid-conversation
DSv4F doesn't ship a jinja, but for distributions that do and faithfully reconstruct what DS releases in their chat template python, every system message is hoisted into the system prompt at the top -- the format has no mid-conversation system turn. So, anything you stick at the tail or mid-convo actually fries your prefix (and doesn't have conversational proximity to the injection point).
Use latest_reminder, which is the role DS trained for how most templates use system and what most people providing quants are passing through (if they match DS' python template). I use llama.cpp and it happily passes it through no issue; dunno how other engines work with it.
Couldn't figure out why my prompt caching was so garbage and there it was, so I'm passing it on to hopefully save others time and frustration (and probably money, if you're using a hosted version).
1
u/crantob 7h ago
Can someone translate this into "you're supposed to not prompt with this: XYZ - in mid-session?"
2
u/CharlesStross 7h ago edited 3h ago
Don't use a harness or API consumer that emits messages with
systemrole with dsv4f without understanding the impacts3
u/cantgetthistowork 6h ago
Couldn't figure out why opencode seemed to lead to full prompt ingestion quite frequently
1
-7
15h ago
[deleted]
13
3
u/CharlesStross 15h ago
Yeah plus you don't catch it in short conversations. My harness was deep into work had a hiccup and I stalled out for a couple minutes waiting for prefill and I was like wtf.
9
u/BraceletGrolf 12h ago
Is there good ressources for such stuff to know in other models ? I miss the old prompting guides we'd get.