XtcThreshold
Contents
[
Hide
]
XtcThreshold is the probability cutoff for XTC (eXclude Top Choices). Only tokens whose probability is above XtcThreshold are candidates for XTC exclusion. This field has no effect unless XtcProbability is enabled.
Quick reference
| Type | float |
| Default | 0.0 |
| Range | 0.0 – 1.0 |
| Category | Advanced / diversity |
| Field on | SamplerParameters.XtcThreshold |
What it does
When XTC fires at a step, the engine excludes every token whose probability exceeds XtcThreshold:
XtcThreshold = 0.0— any token with non-zero probability can be excluded. Very aggressive.XtcThreshold = 0.1— only tokens above 10 % probability are exclusion candidates. Mild.XtcThreshold = 0.3— only dominant tokens (>30 % probability) get excluded. Very selective.XtcThreshold = 1.0— nothing can be excluded; XTC effectively does nothing.
Raise XtcThreshold when XTC is producing too much noise (excluding too many tokens); lower it for stronger diversity injection.
When to change it
| Scenario | Value |
|---|---|
| Default | 0.0 |
| Target only dominant tokens | 0.1 – 0.2 |
| Target only near-certain tokens | 0.3 – 0.5 |
Effectively disable (keep XtcProbability for logging) |
1.0 |
XtcThreshold tunes “which tokens XTC may touch”. XtcProbability tunes “how often XTC runs at all”.
Example
var preset = new Qwen25Preset();
preset.SamplerParameters.XtcProbability = 0.3f;
preset.SamplerParameters.XtcThreshold = 0.2f;
// 30 % of steps, exclude tokens with probability > 20 %.
using var api = AsposeLLMApi.Create(preset);
Interactions
XtcProbability— gate;XtcThresholdonly matters when XTC fires.Temperature,TopP,TopK— apply before XTC.
What’s next
- XtcProbability — enables XTC.
- Sampler parameters hub — all sampler knobs.