YarnBetaFast

YarnBetaFast is the “fast” boundary of YaRN’s correction range — the position-dimension index below which no correction is applied. Relevant only when RopeScalingType is Yarn.

Quick reference

Type float?
Default null (use model default)
Range Typical 3050 (dimension index)
Category YaRN position encoding
Field on ContextParameters.YarnBetaFast

What it does

YaRN applies different treatment to different RoPE dimensions based on their frequency (wavelength). Below YarnBetaFast, positions are treated with raw extrapolation (no correction). Between YarnBetaFast and YarnBetaSlow, YaRN blends the two regimes.

  • null — use model default (typical value in YaRN papers is 32).
  • Specific float — override.

Rarely touched. The model’s metadata carries sensible values.

When to change it

Scenario Value
Default null
Research / YaRN tuning Per paper recipe

Example

// Default — do not override.
var preset = new Llama32Preset();
preset.ContextParameters.RopeScalingType = RopeScalingType.Yarn;

Interactions

What’s next