ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Expand the compressed latent into per-head keys and values

Normalize the compressed key/value latent, apply the learned up-projection, and reshape into heads. Each head receives its non-rotary key and value components. This eagerly reconstructs the per-head representation; it is different from an absorbed attention path that…

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-3bae7fda6dfd0csource-code mathematical expression
kv = (self.kv_b_proj(self.kv_a_layernorm(compressed_kv)).view( bsz, q_len, self.num_heads, self.qk_nope_head_dim + self.v_head_dim).transpose(1, 2))

Read the equation

Normalize the compressed key/value latent, apply the learned up-projection, and reshape into heads. Each head receives its non-rotary key and value components. This eagerly reconstructs the per-head representation; it is different from an absorbed attention path that contracts projection weights with queries and latent aggregates.

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
compressed_kv, k_pe = torch.split(
            compressed_kv, [self.kv_lora_rank, self.qk_rope_head_dim], dim=-1)
        k_pe = k_pe.view(bsz, q_len, 1, self.qk_rope_head_dim).transpose(1, 2)
        kv = (self.kv_b_proj(self.kv_a_layernorm(compressed_kv)).view(
            bsz, q_len, self.num_heads,
            self.qk_nope_head_dim + self.v_head_dim).transpose(1, 2))

        k_nope, value_states = torch.split(
            kv, [self.qk_nope_head_dim, self.v_head_dim], dim=-1)
Exact original notation
kv = (self.kv_b_proj(self.kv_a_layernorm(compressed_kv)).view(
            bsz, q_len, self.num_heads,
            self.qk_nope_head_dim + self.v_head_dim).transpose(1, 2))

Related builds

Sources & provenance

01
kimi source tree.txt
lines 3105–3107 · Aug 5, 2026
kv = (self.kv_b_proj(self.kv_a_layernorm(compressed_kv)).view( bsz, q_len, self.num_heads, self.qk_nope_head_dim + self.v_head_dim).transpose(1, 2))
02
kimi source tree.txt
lines 3238–3240 · Aug 5, 2026
kv = (self.kv_b_proj(self.kv_a_layernorm(compressed_kv)).view( bsz, q_len, self.num_heads, self.qk_nope_head_dim + self.v_head_dim).transpose(1, 2))
03
DEEPSEEK_R1_COMPLETE.txt
lines 2890–2894 · Aug 5, 2026
kv = ( self.kv_b_proj(self.kv_a_layernorm(compressed_kv)) .view(bsz, q_len, self.num_heads, self.qk_nope_head_dim + self.v_head_dim) .transpose(1, 2) )
04
DEEPSEEK_R1_COMPLETE.txt
lines 3025–3029 · Aug 5, 2026
kv = ( self.kv_b_proj(self.kv_a_layernorm(compressed_kv)) .view(bsz, q_len, self.num_heads, self.qk_nope_head_dim + self.v_head_dim) .transpose(1, 2) )
05
kimi source tree.txt
lines 3105–3107 · Aug 5, 2026
kv = (self.kv_b_proj(self.kv_a_layernorm(compressed_kv)).view( bsz, q_len, self.num_heads, self.qk_nope_head_dim + self.v_head_dim).transpose(1, 2))
06
kimi source tree.txt
lines 3238–3240 · Aug 5, 2026
kv = (self.kv_b_proj(self.kv_a_layernorm(compressed_kv)).view( bsz, q_len, self.num_heads, self.qk_nope_head_dim + self.v_head_dim).transpose(1, 2))
07
DEEPSEEK_R1_COMPLETE.txt
lines 2890–2894 · Aug 5, 2026
kv = ( self.kv_b_proj(self.kv_a_layernorm(compressed_kv)) .view(bsz, q_len, self.num_heads, self.qk_nope_head_dim + self.v_head_dim) .transpose(1, 2) )
08
DEEPSEEK_R1_COMPLETE.txt
lines 3025–3029 · Aug 5, 2026
kv = ( self.kv_b_proj(self.kv_a_layernorm(compressed_kv)) .view(bsz, q_len, self.num_heads, self.qk_nope_head_dim + self.v_head_dim) .transpose(1, 2) )

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