YarnExtFactor
Contents
[
Hide
]
YarnExtFactor is the YaRN extrapolation mix factor. It blends between base RoPE and NTK-aware scaling in the YaRN algorithm. Relevant only when RopeScalingType is Yarn.
Quick reference
| Type | float? |
| Default | null (negative / model default) |
| Range | 0.0 – 1.0; negative means “from model” |
| Category | YaRN position encoding |
| Field on | ContextParameters.YarnExtFactor |
What it does
YaRN combines position interpolation and extrapolation. YarnExtFactor controls the mix between the two. The model’s GGUF metadata usually sets this correctly for the intended scaling factor; overriding is rarely useful.
nullor negative — use the model’s value.0.0— pure interpolation.1.0— pure extrapolation.- Intermediate — blend.
When to change it
| Scenario | Value |
|---|---|
| Default (recommended) | null |
| Experimental YaRN tuning | Per upstream YaRN paper recipe |
Example
var preset = new Llama32Preset();
preset.ContextParameters.RopeScalingType = RopeScalingType.Yarn;
// preset.ContextParameters.YarnExtFactor = null; // default — use model's value
Interactions
RopeScalingType— must beYarn.YarnAttnFactor,YarnBetaFast,YarnBetaSlow,YarnOrigCtx— other YaRN knobs.
What’s next
- YarnOrigCtx — the most commonly set YaRN knob.
- RopeScalingType — enables YaRN.
- Context parameters hub — all context knobs.