We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bb780d commit c05fcdfCopy full SHA for c05fcdf
llama_cpp/llama.py
@@ -320,6 +320,10 @@ def _sample(
320
):
321
assert self.ctx is not None
322
assert len(self.eval_logits) > 0
323
+
324
+ if logits_processors == None:
325
+ logits_processors = []
326
327
n_vocab = self.n_vocab()
328
n_ctx = self.n_ctx()
329
top_k = llama_cpp.c_int(n_vocab) if top_k.value <= 0 else top_k
@@ -652,6 +656,10 @@ def _create_completion(
652
656
stopping_criterias=None
653
657
) -> Union[Iterator[Completion], Iterator[CompletionChunk]]:
654
658
659
660
+ if stopping_criterias == None:
661
+ stopping_criterias = []
662
655
663
completion_id: str = f"cmpl-{str(uuid.uuid4())}"
664
created: int = int(time.time())
665
completion_tokens: List[int] = []
0 commit comments