XtcProbability
Contents
[
Hide
]
XtcProbability enables the XTC (eXclude Top Choices) sampler. With probability XtcProbability at each step, XTC removes the top candidate tokens, forcing the engine to sample from the tail. Useful for injecting diversity without raising temperature.
Quick reference
| Type | float |
| Default | -1.0 (disabled) |
| Range | 0.0 – 1.0, or -1.0 to disable |
| Category | Advanced / diversity |
| Field on | SamplerParameters.XtcProbability |
What it does
At each generation step, with probability XtcProbability, XTC fires: the engine excludes all tokens whose probability is above XtcThreshold, and samples from whatever remains. This nudges the model into less-obvious paths without changing temperature.
-1.0(default) — disabled.0.1–0.3— XTC fires on 10–30 % of steps. Mild diversity boost.0.5–0.8— XTC fires often. Strong variety; risk of incoherence.
When to change it
| Scenario | Value |
|---|---|
| Default (disabled) | -1.0 |
| Light creativity boost | 0.1 – 0.2 |
| Alternative to high temperature | 0.3 – 0.5 |
| Experimental variety push | 0.5+ |
XTC is a recent addition. Prefer conventional Temperature + TopP tuning first. Reach for XTC when you want variety specifically when the model is confident — standard sampling tightens those steps; XTC breaks them.
Example
var preset = new Qwen25Preset();
preset.SamplerParameters.XtcProbability = 0.2f;
preset.SamplerParameters.XtcThreshold = 0.1f;
// On ~20 % of steps, tokens above 0.1 probability are excluded.
using var api = AsposeLLMApi.Create(preset);
string reply = await api.SendMessageAsync("Suggest three fictional startup names.");
Console.WriteLine(reply);
Interactions
XtcThreshold— minimum probability a token must have to be considered for exclusion.Temperature— orthogonal. XTC works at any temperature.TopP— still applied; XTC runs within whatTopPkeeps.
What’s next
- XtcThreshold — the probability cutoff companion.
- Temperature — conventional randomness knob.
- Sampler parameters hub — all sampler knobs.