MCPcopy Index your code
hub / github.com/abetlen/llama-cpp-python / decode

Method decode

llama_cpp/_internals.py:326–332  ·  view source on GitHub ↗
(self, batch: LlamaBatch)

Source from the content-addressed store, hash-verified

324 # TODO: llama_state_save_file
325
326 def decode(self, batch: LlamaBatch):
327 return_code = llama_cpp.llama_decode(
328 self.ctx,
329 batch.batch,
330 )
331 if return_code != 0:
332 raise RuntimeError(f"llama_decode returned {return_code}")
333
334 def encode(self, batch: LlamaBatch):
335 return_code = llama_cpp.llama_encode(

Callers 15

test_real_modelFunction · 0.95
llama_log_callbackFunction · 0.45
__init__Method · 0.45
evalMethod · 0.45
decode_batchMethod · 0.45
_create_completionMethod · 0.45
__call__Method · 0.45
_decode_token_pieceMethod · 0.45
__call__Method · 0.45
descMethod · 0.45
token_get_textMethod · 0.45
metadataMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_real_modelFunction · 0.76