Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c2585b6

Browse filesBrowse files
Fixed list elements typing
1 parent da463e6 commit c2585b6
Copy full SHA for c2585b6

File tree

Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed

‎llama_cpp/llama.py

Copy file name to clipboardExpand all lines: llama_cpp/llama.py
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def _sample(
316316
mirostat_tau: llama_cpp.c_float,
317317
mirostat_eta: llama_cpp.c_float,
318318
penalize_nl: bool = True,
319-
logits_processors: List[Callable[[List[llama_cpp.c_int], List[llama_cpp.c_float]], List[float]]] = None
319+
logits_processors: List[Callable[[List[int], List[float]], List[float]]] = None
320320
):
321321
assert self.ctx is not None
322322
assert len(self.eval_logits) > 0
@@ -444,7 +444,7 @@ def sample(
444444
mirostat_eta: float = 0.1,
445445
mirostat_tau: float = 5.0,
446446
penalize_nl: bool = True,
447-
logits_processors: List[Callable[[List[llama_cpp.c_int], List[llama_cpp.c_float]], List[float]]] = None
447+
logits_processors: List[Callable[[List[int], List[float]], List[float]]] = None
448448

449449
):
450450
"""Sample a token from the model.
@@ -496,7 +496,7 @@ def generate(
496496
mirostat_mode: int = 0,
497497
mirostat_tau: float = 5.0,
498498
mirostat_eta: float = 0.1,
499-
logits_processors: List[Callable[[List[llama_cpp.c_int], List[llama_cpp.c_float]], List[float]]] = None
499+
logits_processors: List[Callable[[List[int], List[float]], List[float]]] = None
500500
) -> Generator[int, Optional[Sequence[int]], None]:
501501
"""Create a generator of tokens from a prompt.
502502
@@ -651,8 +651,8 @@ def _create_completion(
651651
mirostat_tau: float = 5.0,
652652
mirostat_eta: float = 0.1,
653653
model: Optional[str] = None,
654-
logits_processors: List[Callable[[List[llama_cpp.c_int], List[llama_cpp.c_float]], List[float]]] = None,
655-
stopping_criterias: List[Callable[[List[int], List[llama_cpp.c_float]], bool]] = None,
654+
logits_processors: List[Callable[[List[int], List[float]], List[float]]] = None,
655+
stopping_criterias: List[Callable[[List[int], List[float]], bool]] = None,
656656
) -> Union[Iterator[Completion], Iterator[CompletionChunk]]:
657657
assert self.ctx is not None
658658

@@ -1035,8 +1035,8 @@ def create_completion(
10351035
mirostat_tau: float = 5.0,
10361036
mirostat_eta: float = 0.1,
10371037
model: Optional[str] = None,
1038-
logits_processors: List[Callable[[List[llama_cpp.c_int], List[llama_cpp.c_float]], List[float]]] = None,
1039-
stopping_criterias: List[Callable[[List[int], List[llama_cpp.c_float]], bool]] = None
1038+
logits_processors: List[Callable[[List[int], List[float]], List[float]]] = None,
1039+
stopping_criterias: List[Callable[[List[int], List[float]], bool]] = None
10401040
) -> Union[Completion, Iterator[CompletionChunk]]:
10411041
"""Generate text from a prompt.
10421042

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.