Read the equation
The base rotary frequency is divided by factor. At a fixed token position, this reduces its phase advance by that factor. The later blend applies this scaled schedule toward the low-frequency end of the rotary dimensions; the formula alone provides a candidate schedule over all indices.
Terms & definitions
| Term | Meaning in this source |
|---|---|
| factor | Context extension factor,40 in this DeepSeek configuration |
| i | Frequency-pair index |
| dim | Rotary dimension |
How it works
Read the definition from its right-hand expression to the quantity on the left. Its surrounding source records the intended input, state, or parameter context. Where the source leaves an operation unspecified, this page preserves that gap.
Assumptions & limits
Source recovery establishes that the expression appears in this record. Its mathematical validity, implementation behavior, and interpretation must be assessed separately. See the linked source and research notes for the checks available for this version.
Original context
Read the surrounding source passage
-> (low, high), clamped to [0, dim-1]
A linear ramp over [low, high] blends two frequency schedules:
inv_freq_interpolation = 1 / (factor * base^(2i/dim)) low freq, scaled
inv_freq_extrapolation = 1 / (base^(2i/dim)) high freq, raw
inv_freq = interp * (1 - ramp) + extrap * ramp
High-frequency dimensions extrapolate unchanged; low-frequency dimensions
are interpolated by the factor of 40.Exact original notation
inv_freq_interpolation = 1 / (factor * base^(2i/dim)) low freq, scaled
Related builds
Sources & provenance
inv_freq_interpolation = 1 / (factor * base^(2i/dim)) low freq, scaled
inv_freq_interpolation = 1 / (factor * base^(2i/dim)) low freq, scaled