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

Method decode

examples/server/server.py:12161–12170  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

12159 ]
12160
12161 def decode(self) -> None:
12162 batch = self._embedding_batch if self._embedding_batch is not None else self.batch
12163 if self.embedding and self.has_encoder:
12164 operation = "llama_encode"
12165 result = int(llama_cpp.llama_encode(self.ctx, batch))
12166 else:
12167 operation = "llama_decode"
12168 result = int(llama_cpp.llama_decode(self.ctx, batch))
12169 if result != 0:
12170 raise RuntimeError(f"{operation} failed with code {result}")
12171
12172 def process_draft_batch(self) -> None:
12173 if self.draft_provider is not None:

Callers 15

encode_embeddingMethod · 0.45
decode_textMethod · 0.45
__init__Method · 0.45
_model_meta_valueMethod · 0.45
_build_chat_formatterMethod · 0.45
stepMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected