(self, batch: LlamaBatch)
| 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( |
no outgoing calls