MCPcopy Create free account
hub / github.com/abetlen/llama-cpp-python / attention_kv_required

Method attention_kv_required

examples/server/server.py:12636–12641  ·  view source on GitHub ↗
(
        prompt_kv: int,
        reused_kv: int,
        generation_kv: int,
    )

Source from the content-addressed store, hash-verified

12634
12635 @staticmethod
12636 def attention_kv_required(
12637 prompt_kv: int,
12638 reused_kv: int,
12639 generation_kv: int,
12640 ) -> int:
12641 return prompt_kv - reused_kv + generation_kv
12642
12643 def try_set_sequence_cache_match(
12644 self,

Callers 2

can_admitMethod · 0.80
can_admitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected