Entropic 2.9.4
Local-first agentic inference engine
Loading...
Searching...
No Matches
warm_keep_util.h File Reference

gh#96 (v2.7.5) warm-keep / incremental-prefill decision logic. More...

#include <algorithm>
#include <cstddef>
#include <vector>
Include dependency graph for warm_keep_util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  entropic
 Activate model on GPU (WARM → ACTIVE).
 

Functions

template<typename Tok >
std::size_t entropic::common_prefix_len (const std::vector< Tok > &a, const std::vector< Tok > &b)
 Length of the longest common token prefix of two sequences.
 
template<typename Tok >
std::size_t entropic::warm_keep_cut (const std::vector< Tok > &resident, const std::vector< Tok > &incoming, long kv_pos_max)
 Decide how many resident-KV tokens warm-keep may reuse this turn.
 

Detailed Description

gh#96 (v2.7.5) warm-keep / incremental-prefill decision logic.

Pure functions (no llama.cpp, no I/O) so the correctness-critical reuse decision is unit-testable on the CPU pre-commit tier. The backend wraps these with the actual KV mutation (seq_rm + delta decode).

Version
2.7.5

Definition in file warm_keep_util.h.