Skip to main content

LOW_WATERMARK_PCT

Constant LOW_WATERMARK_PCT 

Source
pub(crate) const LOW_WATERMARK_PCT: usize = 75;
Expand description

Low watermark the trim aims for, as a percentage of the request budget.

Once truncation is triggered (payload over limit_chars), the stage trims past the budget down toward this fraction of it, buying several turns of headroom in which follow-up requests need no new elisions — the property that keeps the forwarded prompt prefix stable for llama.cpp’s KV cache. See the module docs for why the savings target is also quantized.