You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/main/README.md
+1-6
Original file line number
Diff line number
Diff line change
@@ -163,7 +163,7 @@ If the pause is undesirable, a value of -2 will stop generation immediately when
163
163
164
164
The `--no-context-shift` option allows you to stop the infinite text generation once the finite context window is full.
165
165
166
-
It is important to note that the generated text may be shorter than the specified number of tokens if an End-of-Sequence (EOS) token or a reverse prompt is encountered. In interactive mode, text generation will pause and control will be returned to the user. In non-interactive mode, the program will end. In both cases, the text generation may stop before reaching the specified `--predict` value. If you want the model to keep going without ever producing End-of-Sequence on its own, you can use the `--ignore-eos` parameter.
166
+
It is important to note that the generated text may be shorter than the specified number of tokens if an End-of-Sequence (EOS) token or a reverse prompt is encountered. In interactive mode, text generation will pause and control will be returned to the user. In non-interactive mode, the program will end. In both cases, the text generation may stop before reaching the specified `--predict` value.
167
167
168
168
### Temperature
169
169
@@ -177,16 +177,11 @@ Example usage: `--temp 0`
177
177
178
178
-`--repeat-penalty N`: Control the repetition of token sequences in the generated text default: 1.0, 1.0 = disabled).
179
179
-`--repeat-last-n N`: Last n tokens to consider for penalizing repetition (default: 64, 0 = disabled, -1 = ctx-size).
180
-
-`--no-penalize-nl`: Disable penalization for newline tokens when applying the repeat penalty.
181
180
182
181
The `repeat-penalty` option helps prevent the model from generating repetitive or monotonous text. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient. The default value is 1.
183
182
184
183
The `repeat-last-n` option controls the number of tokens in the history to consider for penalizing repetition. A larger value will look further back in the generated text to prevent repetitions, while a smaller value will only consider recent tokens. A value of 0 disables the penalty, and a value of -1 sets the number of tokens considered equal to the context size (`ctx-size`).
185
184
186
-
Use the `--no-penalize-nl` option to disable newline penalization when applying the repeat penalty. This option is particularly useful for generating chat conversations, dialogues, code, poetry, or any text where newline tokens play a significant role in structure and formatting. Disabling newline penalization helps maintain the natural flow and intended formatting in these specific use cases.
187
-
188
-
Example usage: `--repeat-penalty 1.15 --repeat-last-n 128 --no-penalize-nl`
189
-
190
185
### DRY Repetition Penalty
191
186
192
187
DRY (Don't Repeat Yourself) sampling is an effective technique for reducing repetition in generated text even across long contexts by penalizing tokens based on their recent usage patterns (original [PR link](https://github.com/oobabooga/text-generation-webui/pull/5677)).
int32_t penalty_last_n, // last n tokens to penalize (0 = disable penalty, -1 = context size)
1145
-
float penalty_repeat, // 1.0 = disabled
1146
-
float penalty_freq, // 0.0 = disabled
1147
-
float penalty_present, // 0.0 = disabled
1148
-
bool penalize_nl, // consider newlines as a repeatable token
1149
-
bool ignore_eos); // ignore the end-of-sequence token
1142
+
int32_t penalty_last_n, // last n tokens to penalize (0 = disable penalty, -1 = context size)
1143
+
float penalty_repeat, // 1.0 = disabled
1144
+
float penalty_freq, // 0.0 = disabled
1145
+
float penalty_present); // 0.0 = disabled
1150
1146
1151
1147
/// @details DRY sampler, designed by p-e-w, as described in: https://github.com/oobabooga/text-generation-webui/pull/5677, porting Koboldcpp implementation authored by pi6am: https://github.com/LostRuins/koboldcpp/pull/982
0 commit comments