Help needed: I built an input / chat sentence keywords based structure that uses CELF to retrieve only the important sentences on KV cache.
SALT shrinks a long document down to a fixed size before it is sent to a language model, keeping the sentences that carry the most information. It works with any model, produces a shorter plain-text prompt, and cuts the compute, memory, and wait time that long inputs cost.
I need some help with deciding and implementing a method that selects a better budget than the default 20/25% across chat. The kv cache in GPU keeps only some instructions and a retrieved % of the actual full input or conversion that is all organized in DRAM in a trie. The retrieval is insanely quick now with less than 1-2 seconds for even 100k + conversations however it is sometimes too much as it’s set by a hard % (prefill GPU men use becomes a problem at larger scale). What method could I use to decide how to adjust this % based on the question?
GitHub: oteomamo/SALT