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 7be584f

Browse filesBrowse files
committed
Add missing tfs_z paramter
1 parent 28ee2ad commit 7be584f
Copy full SHA for 7be584f

File tree

Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed

‎llama_cpp/llama.py

Copy file name to clipboardExpand all lines: llama_cpp/llama.py
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ def generate(
437437
reset: bool = True,
438438
frequency_penalty: float = 0.0,
439439
presence_penalty: float = 0.0,
440+
tfs_z: float = 1.0,
440441
mirostat_mode: int = 0,
441442
mirostat_tau: float = 5.0,
442443
mirostat_eta: float = 0.1,
@@ -495,6 +496,7 @@ def generate(
495496
repeat_penalty=repeat_penalty,
496497
frequency_penalty=frequency_penalty,
497498
presence_penalty=presence_penalty,
499+
tfs_z=tfs_z,
498500
mirostat_mode=mirostat_mode,
499501
mirostat_tau=mirostat_tau,
500502
mirostat_eta=mirostat_eta,
@@ -576,6 +578,7 @@ def _create_completion(
576578
repeat_penalty: float = 1.1,
577579
top_k: int = 40,
578580
stream: bool = False,
581+
tfs_z: float = 1.0,
579582
mirostat_mode: int = 0,
580583
mirostat_tau: float = 5.0,
581584
mirostat_eta: float = 0.1,
@@ -634,6 +637,7 @@ def _create_completion(
634637
top_k=top_k,
635638
top_p=top_p,
636639
temp=temperature,
640+
tfs_z=tfs_z,
637641
mirostat_mode=mirostat_mode,
638642
mirostat_tau=mirostat_tau,
639643
mirostat_eta=mirostat_eta,
@@ -818,6 +822,7 @@ def create_completion(
818822
repeat_penalty: float = 1.1,
819823
top_k: int = 40,
820824
stream: bool = False,
825+
tfs_z: float = 1.0,
821826
mirostat_mode: int = 0,
822827
mirostat_tau: float = 5.0,
823828
mirostat_eta: float = 0.1,
@@ -858,6 +863,7 @@ def create_completion(
858863
repeat_penalty=repeat_penalty,
859864
top_k=top_k,
860865
stream=stream,
866+
tfs_z=tfs_z,
861867
mirostat_mode=mirostat_mode,
862868
mirostat_tau=mirostat_tau,
863869
mirostat_eta=mirostat_eta,
@@ -883,6 +889,7 @@ def __call__(
883889
repeat_penalty: float = 1.1,
884890
top_k: int = 40,
885891
stream: bool = False,
892+
tfs_z: float = 1.0,
886893
mirostat_mode: int = 0,
887894
mirostat_tau: float = 5.0,
888895
mirostat_eta: float = 0.1,
@@ -923,6 +930,7 @@ def __call__(
923930
repeat_penalty=repeat_penalty,
924931
top_k=top_k,
925932
stream=stream,
933+
tfs_z=tfs_z,
926934
mirostat_mode=mirostat_mode,
927935
mirostat_tau=mirostat_tau,
928936
mirostat_eta=mirostat_eta,
@@ -998,6 +1006,7 @@ def create_chat_completion(
9981006
presence_penalty: float = 0.0,
9991007
frequency_penalty: float = 0.0,
10001008
repeat_penalty: float = 1.1,
1009+
tfs_z: float = 1.0,
10011010
mirostat_mode: int = 0,
10021011
mirostat_tau: float = 5.0,
10031012
mirostat_eta: float = 0.1,
@@ -1035,6 +1044,7 @@ def create_chat_completion(
10351044
repeat_penalty=repeat_penalty,
10361045
presence_penalty=presence_penalty,
10371046
frequency_penalty=frequency_penalty,
1047+
tfs_z=tfs_z,
10381048
mirostat_mode=mirostat_mode,
10391049
mirostat_tau=mirostat_tau,
10401050
mirostat_eta=mirostat_eta,

0 commit comments

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