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 df3be58

Browse filesBrowse files
authored
Add ability to pass in penalize_nl param (abetlen#1068)
1 parent 2ddce72 commit df3be58
Copy full SHA for df3be58

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+2
-0
lines changed

‎llama_cpp/llama.py

Copy file name to clipboardExpand all lines: llama_cpp/llama.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,7 @@ def generate(
12011201
mirostat_mode: int = 0,
12021202
mirostat_tau: float = 5.0,
12031203
mirostat_eta: float = 0.1,
1204+
penalize_nl: bool = True,
12041205
logits_processor: Optional[LogitsProcessorList] = None,
12051206
stopping_criteria: Optional[StoppingCriteriaList] = None,
12061207
grammar: Optional[LlamaGrammar] = None,
@@ -1261,6 +1262,7 @@ def generate(
12611262
mirostat_eta=mirostat_eta,
12621263
logits_processor=logits_processor,
12631264
grammar=grammar,
1265+
penalize_nl=penalize_nl,
12641266
)
12651267
if stopping_criteria is not None and stopping_criteria(
12661268
self._input_ids, self._scores[-1, :]

0 commit comments

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