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
-`--xtc-probability N`: Sets the chance for token removal (checked once on sampler start) (default: 0.0).
247
247
-`--xtc-threshold N`: Sets a minimum probability threshold for tokens to be removed (default: 0.1).
248
-
-`--xtc-threshold-max N`: Sets a maximum probability threshold for tokens to be removed (highly experimental) (default: 1.0).
249
248
250
249
Exclude Top Choices (XTC) is a unique sampler that is designed to remove top tokens from consideration and avoid more obvious and repetitive outputs. With a chance of `xtc-p` it searches for tokens with probabilities of `xtc-threshold` and above, then removes all such tokens except the least probable one.
251
250
252
251
By removing top tokens XTC can improve the variety of answers, break writing clichés and inhibit repition, since clichés and repeated phrases are usually more likely to appear. By keeping the last token above the threshold, XTC ensures that the answer is still coherent. XTC is meant to be used for creative tasks, but feel free to experiment with different settings for different models.
253
252
254
-
The additional `xtc-threshold-max` parameter may help with finetuned models that already give relatively creative output, meaning that clichés and repetitive phrases may appear at lower probabilities. It allows to remove tokens from a middle range which will always be specific to a model, requiring careful experimenting. Leave `xtc-threshold-max` on default 1.0 for all base/instruct models.
255
-
256
253
Being experimental and unique, XTC is disabled by default. The recommended combination of samplers is Min-P followed by XTC on its default settings: `--sampling-seq mx --min-p 0.02 -xtc-p 0.5`.
257
254
258
-
Example usage: `-xtc-p 0.5 -xtc-t 0.1 -xtc-t-max 1.0`
Copy file name to clipboardExpand all lines: examples/server/public/index-new.html
-3Lines changed: 0 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,6 @@
45
45
min_p: 0.05,// 0 = disabled; recommended for non-english: ~ 0.4
46
46
xtc_probability: 0.0,// 0 = disabled;
47
47
xtc_threshold: 0.1,// 0.5 = disabled;
48
-
xtc_threshold_max: 1.0,// 0 = disabled;
49
48
tfs_z: 1.0,// 1.0 = disabled
50
49
typical_p: 1.0,// 1.0 = disabled
51
50
presence_penalty: 0.0,// 0.0 = disabled
@@ -841,7 +840,6 @@
841
840
${FloatField({label: "Typical-P",title: "Activates local typical sampling, a method used to limit the prediction of tokens that are atypical in the current context. The parameter p controls the strength of this limitation. A value of 1.0 means that this function is deactivated.",max: 1.0,min: 0.0,name: "typical_p",step: 0.01,value: params.value.typical_p})}
842
841
${FloatField({label: "XTC probability",title: "Sets the chance for token removal (checked once on sampler start)",max: 1.0,min: 0.0,name: "xtc_probability",step: 0.01,value: params.value.xtc_probability})}
843
842
${FloatField({label: "XTC threshold",title: "Sets a minimum probability threshold for tokens to be removed",max: 0.5,min: 0.0,name: "xtc_threshold",step: 0.01,value: params.value.xtc_threshold})}
844
-
${FloatField({label: "XTC max threshold",title: "Sets a maximum probability threshold for tokens to be removed (highly experimental)",max: 1.0,min: 0.0,name: "xtc_threshold_max",step: 0.01,value: params.value.xtc_threshold_max})}
845
843
${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})}
/// @details Mirostat 1.0 algorithm described in the paper https://arxiv.org/abs/2007.14966. Uses tokens instead of words.
1101
1101
/// @param candidates A vector of `llama_token_data` containing the candidate tokens, their probabilities (p), and log-odds (logit) for the current position in the generated text.
0 commit comments