YarnBetaSlow

YarnBetaSlow is the “slow” boundary of YaRN’s correction range — the dimension index above which interpolation is fully applied. Relevant only when RopeScalingType is Yarn.

Quick reference

Type float?
Default null (use model default)
Range Typical 1
Category YaRN position encoding
Field on ContextParameters.YarnBetaSlow

What it does

Pairs with YarnBetaFast to define the transition window between extrapolation and interpolation inside YaRN:

  • Below YarnBetaFast: pure extrapolation.
  • Between YarnBetaFast and YarnBetaSlow: blend.
  • Above YarnBetaSlow: pure interpolation.

Typical YaRN recipe values: YarnBetaFast = 32, YarnBetaSlow = 1.

When to change it

Scenario Value
Default (recommended) null
Research / YaRN tuning Per paper recipe

Example

var preset = new Llama32Preset();
preset.ContextParameters.RopeScalingType = RopeScalingType.Yarn;
// preset.ContextParameters.YarnBetaSlow = null; // default

Interactions

What’s next