(self)
| 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: |
no outgoing calls
no test coverage detected