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

Method generation_kv_for_request

examples/server/server.py:12627–12633  ·  view source on GitHub ↗
(
        request: CompletionRequest,
        prompt_length: int,
    )

Source from the content-addressed store, hash-verified

12625
12626 @staticmethod
12627 def generation_kv_for_request(
12628 request: CompletionRequest,
12629 prompt_length: int,
12630 ) -> int:
12631 return request.internal_completion_count * (
12632 request.effective_max_len - prompt_length
12633 )
12634
12635 @staticmethod
12636 def attention_kv_required(

Callers 2

can_admitMethod · 0.80
can_admitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected