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

Method __call__

llama_cpp/llama.py:2498–2505  ·  view source on GitHub ↗
(
        self, input_ids: npt.NDArray[np.intc], scores: npt.NDArray[np.single]
    )

Source from the content-addressed store, hash-verified

2496 self.prompt_tokens = None
2497
2498 def __call__(
2499 self, input_ids: npt.NDArray[np.intc], scores: npt.NDArray[np.single]
2500 ) -> npt.NDArray[np.single]:
2501 if self.prompt_tokens is None:
2502 self.prompt_tokens = len(input_ids)
2503 if len(input_ids) - self.prompt_tokens < self.min_tokens:
2504 scores[self.token_eos] = -np.inf
2505 return scores

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected