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

Method logits

examples/server/server.py:12198–12202  ·  view source on GitHub ↗
(self, output_index: int)

Source from the content-addressed store, hash-verified

12196 self.draft_provider.copy_sequence(source_seq_id, dest_seq_id, p0, p1)
12197
12198 def logits(self, output_index: int) -> np.ndarray:
12199 ptr = llama_cpp.llama_get_logits_ith(self.ctx, output_index)
12200 if not ptr:
12201 raise RuntimeError(f"missing logits output {output_index}")
12202 return np.ctypeslib.as_array(ptr, shape=(self.n_vocab,)).copy()
12203
12204 def embed(
12205 self,

Callers 4

process_batchMethod · 0.80
sample_completionMethod · 0.80

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected