ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Complement the increasing YaRN frequency ramp

The helper produces a ramp increasing from zero to one across frequency-pair indices. Subtracting it from one makes inv_freq_mask select original frequencies at the small-index high-frequency end and scaled frequencies at the large-index low-frequency end. This…

Donor model implementationhistorical source recovered; expression not executed in this website audit
Learn with the Atlas

Learn to read this model

Start with the symbols, follow the operations, and check what the result means.

Open guided lesson
donor-eq-944a5c061fdd4asource-code mathematical expression
invfreqmask=1.0−yarnlinearrampmask(low,high,dim//2).to(device=device,dtype=torch.float32)inv_freq_mask = 1.0 - yarn_linear_ramp_mask(low, high, dim // 2).to( device=device, dtype=torch.float32)

Read the equation

The helper produces a ramp increasing from zero to one across frequency-pair indices. Subtracting it from one makes inv_freq_mask select original frequencies at the small-index high-frequency end and scaled frequencies at the large-index low-frequency end. This complement is the detail omitted by the reversed overview blend.

Terms & definitions

The recovered passage does not supply a separate symbol table. Read the source context for the notation used in this version; familiar letters may carry different meanings in other builds.

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
self.base,
            self.original_max_position_embeddings,
        )
        inv_freq_mask = 1.0 - yarn_linear_ramp_mask(low, high, dim // 2).to(
            device=device, dtype=torch.float32)
        inv_freq = freq_inter * (1 -
                                 inv_freq_mask) + freq_extra * inv_freq_mask
        self.register_buffer("inv_freq", inv_freq, persistent=False)
Exact original notation
inv_freq_mask = 1.0 - yarn_linear_ramp_mask(low, high, dim // 2).to(
            device=device, dtype=torch.float32)

Related builds

Sources & provenance

01
kimi source tree.txt
lines 2620–2621 · Aug 5, 2026
inv_freq_mask = 1.0 - yarn_linear_ramp_mask(low, high, dim // 2).to( device=device, dtype=torch.float32)
02
DEEPSEEK_R1_COMPLETE.txt
lines 2416–2418 · Aug 5, 2026
inv_freq_mask = 1.0 - yarn_linear_ramp_mask(low, high, dim // 2).to( device=device, dtype=torch.float32 )
03
kimi source tree.txt
lines 2620–2621 · Aug 5, 2026
inv_freq_mask = 1.0 - yarn_linear_ramp_mask(low, high, dim // 2).to( device=device, dtype=torch.float32)
04
DEEPSEEK_R1_COMPLETE.txt
lines 2416–2418 · Aug 5, 2026
inv_freq_mask = 1.0 - yarn_linear_ramp_mask(low, high, dim // 2).to( device=device, dtype=torch.float32 )

Search equations, builds, manuscript text, and recovered sources.