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
-8
Original file line number
Diff line number
Diff line change
@@ -235,14 +235,6 @@ The Min-P sampling method was designed as an alternative to Top-P, and aims to e
235
235
236
236
Example usage: `--min-p 0.05`
237
237
238
-
### Tail-Free Sampling (TFS)
239
-
240
-
-`--tfs N`: Enable tail free sampling with parameter z (default: 1.0, 1.0 = disabled).
241
-
242
-
Tail-free sampling (TFS) is a text generation technique that aims to reduce the impact of less likely tokens, which may be less relevant, less coherent, or nonsensical, on the output. Similar to Top-P it tries to determine the bulk of the most likely tokens dynamically. But TFS filters out logits based on the second derivative of their probabilities. Adding tokens is stopped after the sum of the second derivatives reaches the parameter z. In short: TFS looks at how quickly the probabilities of the tokens decrease and cuts off the tail of unlikely tokens using the parameter z. Typical values for z are in the range of 0.9 to 0.95. A value of 1.0 would include all tokens and thus disables the effect of TFS.
243
-
244
-
Example usage: `--tfs 0.95`
245
-
246
238
### Locally Typical Sampling
247
239
248
240
-`--typical N`: Enable locally typical sampling with parameter p (default: 1.0, 1.0 = disabled).
Copy file name to clipboardExpand all lines: examples/server/README.md
+3-8
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ The project is under active development, and we are [looking for feedback and co
99
99
100
100
| Argument | Explanation |
101
101
| -------- | ----------- |
102
-
|`--samplers SAMPLERS`| samplers that will be used for generation in the order, separated by ';'<br/>(default: top_k;tfs_z;typ_p;top_p;min_p;temperature) |
102
+
|`--samplers SAMPLERS`| samplers that will be used for generation in the order, separated by ';'<br/>(default: top_k;typ_p;top_p;min_p;temperature) |
103
103
|`-s, --seed SEED`| RNG seed (default: -1, use random seed for -1) |
104
104
|`--sampling-seq SEQUENCE`| simplified sequence for samplers that will be used (default: kfypmt) |
105
105
|`--ignore-eos`| ignore end of stream token and continue generating (implies --logit-bias EOS-inf) |
@@ -108,7 +108,6 @@ The project is under active development, and we are [looking for feedback and co
@@ -121,7 +120,7 @@ The project is under active development, and we are [looking for feedback and co
121
120
| `--dry-sequence-breaker STRING` | add sequence breaker for DRY sampling, clearing out default breakers (`['\n', ':', '"', '*']`) in the process; use `"none"` to not use any sequence breakers
122
121
|`--dynatemp-range N`| dynamic temperature range (default: 0.0, 0.0 = disabled) |
123
122
|`--dynatemp-exp N`| dynamic temperature exponent (default: 1.0) |
124
-
|`--mirostat N`| use Mirostat sampling.<br/>Top K, Nucleus, Tail Free and Locally Typical samplers are ignored if used.<br/>(default: 0, 0 = disabled, 1 = Mirostat, 2 = Mirostat 2.0) |
123
+
|`--mirostat N`| use Mirostat sampling.<br/>Top K, Nucleus and Locally Typical samplers are ignored if used.<br/>(default: 0, 0 = disabled, 1 = Mirostat, 2 = Mirostat 2.0) |
125
124
|`--mirostat-lr N`| Mirostat learning rate, parameter eta (default: 0.1) |
126
125
|`--mirostat-ent N`| Mirostat target entropy, parameter tau (default: 5.0) |
127
126
|`-l, --logit-bias TOKEN_ID(+/-)BIAS`| modifies the likelihood of token appearing in the completion,<br/>i.e. `--logit-bias 15043+1` to increase likelihood of token ' Hello',<br/>or `--logit-bias 15043-1` to decrease likelihood of token ' Hello' |
@@ -360,8 +359,6 @@ node index.js
360
359
`stop`: Specify a JSON array of stopping strings.
361
360
These words will not be included in the completion, so make sure to add them to the prompt for the next iteration. Default: `[]`
362
361
363
-
`tfs_z`: Enable tail free sampling with parameter z. Default: `1.0`, which is disabled.
364
-
365
362
`typical_p`: Enable locally typical sampling with parameter p. Default: `1.0`, which is disabled.
366
363
367
364
`repeat_penalty`: Control the repetition of token sequences in the generated text. Default: `1.1`
@@ -412,7 +409,7 @@ node index.js
412
409
413
410
`cache_prompt`: Re-use KV cache from a previous request if possible. This way the common prefix does not have to be re-processed, only the suffix that differs between the requests. Because (depending on the backend) the logits are **not** guaranteed to be bit-for-bit identical for different batch sizes (prompt processing vs. token generation) enabling this option can cause nondeterministic results. Default: `false`
414
411
415
-
`samplers`: The order the samplers should be applied in. An array of strings representing sampler type names. If a sampler is not set, it will not be used. If a sampler is specified more than once, it will be applied multiple times. Default: `["top_k", "tfs_z", "typical_p", "top_p", "min_p", "temperature"]` - these are all the available values.
412
+
`samplers`: The order the samplers should be applied in. An array of strings representing sampler type names. If a sampler is not set, it will not be used. If a sampler is specified more than once, it will be applied multiple times. Default: `["top_k", "typical_p", "top_p", "min_p", "temperature"]` - these are all the available values.
Copy file name to clipboardExpand all lines: examples/server/public/index-new.html
-3
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,6 @@
49
49
min_p: 0.05,// 0 = disabled; recommended for non-english: ~ 0.4
50
50
xtc_probability: 0.0,// 0 = disabled;
51
51
xtc_threshold: 0.1,// > 0.5 disables XTC;
52
-
tfs_z: 1.0,// 1.0 = disabled
53
52
typical_p: 1.0,// 1.0 = disabled
54
53
presence_penalty: 0.0,// 0.0 = disabled
55
54
frequency_penalty: 0.0,// 0.0 = disabled
@@ -847,7 +846,6 @@
847
846
${FloatField({label: "DRY Base",title: "Set the DRY repetition penalty base value. Default is 1.75",max: 3.0,min: 1.0,name: "dry_base",step: 0.01,value: params.value.dry_base})}
848
847
${IntField({label: "DRY Allowed Length",title: "Tokens that extend repetition beyond this receive exponentially increasing penalty. Default is 2",max: 10,min: 1,step: 1,name: "dry_allowed_length",value: params.value.dry_allowed_length})}
849
848
${IntField({label: "DRY Penalty Last N",title: "How many tokens to scan for repetitions. Default is -1, where 0 is disabled and -1 is context size",max: 2048,min: -1,step: 16,name: "dry_penalty_last_n",value: params.value.dry_penalty_last_n})}
850
-
${FloatField({label: "TFS-Z",title: "Activates tail-free sampling, a method used to limit the prediction of tokens that are too frequent. The parameter z controls the strength of this limitation. A value of 1.0 means that this function is deactivated.",max: 1.0,min: 0.0,name: "tfs_z",step: 0.01,value: params.value.tfs_z})}
851
849
${IntField({label: "Min Keep",title: "If greater than 0, samplers are forced to return N possible tokens at minimum. Default is 0",max: 10,min: 0,name: "min_keep",value: params.value.min_keep})}
0 commit comments