ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

The equation library

Every recovered mathematical record has an individual page. Browse original equations, code expressions, indexed components, parameter definitions, and explicitly unresolved source slots.

2,910 recordsSource snapshot 2026-10-17

Counts refer to mathematical records, including implemented expressions and generated instances. They are not counts of independently validated theories. Exact occurrences and unresolved slots remain traceable. Read the complete 1–516 source index ↗ · Inspect the scan decisions ↗

2,910 records · page 19 of 59Search the source archive ↗
donor-eq-57fb43afd24f06

DeepSeek DecoderLayer.__init__: mlp

In DeepseekV3DecoderLayer.__init__, this statement defines or updates self.mlp. This statement evaluates the named projection, normalization or numeric transform with the source arguments. Its learned parameters and exact input shape are defined by the surrounding module.

Donor model implementationhistorical source recovered; expression not executed in this website audit
self.mlp = (DeepseekV3MoE(config) if (config.n_routed_experts is not None and layer_idx >= config.first_k_dense_replace and layer_idx % config.moe_layer_freq == 0) else…
donor-eq-e96f8addb052f7

DeepSeek DynamicNTKScalingRotaryEmbedding._set_cos_sin_cache: base

In DeepseekV3DynamicNTKScalingRotaryEmbedding._set_cos_sin_cache, this statement defines or updates base. The expression forms a quotient or integer division. The denominator, integer rounding and tensor shape convention determine its scale or index result.

Donor model implementationhistorical source recovered; expression not executed in this website audit
base = self.base * ((self.scaling_factor * seq_len / self.max_position_embeddings) - (self.scaling_factor - 1))**(self.dim /…
donor-eq-56f5eeeb2dd70d

DeepSeek FlashAttention2._upad_input: cu seqlens q

In DeepseekV3FlashAttention2._upad_input, this statement defines or updates cu_seqlens_q. The addition or subtraction updates the named state or combines residual contributions. The input shapes and the order in the surrounding forward path must be preserved.

Donor model implementationhistorical source recovered; expression not executed in this website audit
cu_seqlens_q = torch.arange( batch_size + 1, dtype=torch.int32, device=query_layer.device )
donor-eq-c1f654f468dae2

DeepSeek FlashAttention2._upad_input: key layer

In DeepseekV3FlashAttention2._upad_input, this statement defines or updates key_layer. The displayed multiplication combines the source factors. For tensors this is elementwise unless the called operation explicitly performs a matrix contraction.

Donor model implementationhistorical source recovered; expression not executed in this website audit
key_layer = index_first_axis( key_layer.reshape(batch_size * kv_seq_len, num_key_value_heads, head_dim), indices_k, )
donor-eq-9f6a8d34b63f1d

DeepSeek FlashAttention2._upad_input: query layer

In DeepseekV3FlashAttention2._upad_input, this statement defines or updates query_layer. The displayed multiplication combines the source factors. For tensors this is elementwise unless the called operation explicitly performs a matrix contraction.

Donor model implementationhistorical source recovered; expression not executed in this website audit
query_layer = index_first_axis( query_layer.reshape(batch_size * kv_seq_len, self.num_heads, head_dim), indices_k, )
donor-eq-fc7b5a372b8796

DeepSeek FlashAttention2._upad_input: value layer

In DeepseekV3FlashAttention2._upad_input, this statement defines or updates value_layer. The displayed multiplication combines the source factors. For tensors this is elementwise unless the called operation explicitly performs a matrix contraction.

Donor model implementationhistorical source recovered; expression not executed in this website audit
value_layer = index_first_axis( value_layer.reshape(batch_size * kv_seq_len, num_key_value_heads, head_dim), indices_k, )
donor-eq-45dea5848c285e

DeepSeek FlashAttention2.forward: attn output

In DeepseekV3FlashAttention2.forward, this statement defines or updates attn_output. The displayed multiplication combines the source factors. For tensors this is elementwise unless the called operation explicitly performs a matrix contraction.

Donor model implementationhistorical source recovered; expression not executed in this website audit
attn_output = attn_output.reshape(bsz, q_len, self.num_heads * self.v_head_dim).contiguous()
donor-eq-903309d034d8a3

DeepSeek ForSequenceClassification.forward: sequence lengths

In DeepseekV3ForSequenceClassification.forward, this statement defines or updates sequence_lengths. The addition or subtraction updates the named state or combines residual contributions. The input shapes and the order in the surrounding forward path must be preserved.

Donor model implementationhistorical source recovered; expression not executed in this website audit
sequence_lengths = (torch.eq( input_ids, self.config.pad_token_id).int().argmax(-1) - 1).to(logits.device)
donor-eq-7cd183f40720e6

DeepSeek MoE.__init__: experts

In DeepseekV3MoE.__init__, this statement defines or updates self.experts. The displayed multiplication combines the source factors. For tensors this is elementwise unless the called operation explicitly performs a matrix contraction.

Donor model implementationhistorical source recovered; expression not executed in this website audit
self.experts = nn.ModuleList([ (DeepseekV3MLP(config, intermediate_size=config.moe_intermediate_size) if i >= self.ep_rank * self.experts_per_rank and i < (self.ep_rank…
donor-eq-18c7a0ca6540e3

DeepSeek MoE.moe_infer: gathered tokens

In DeepseekV3MoE.moe_infer, this statement defines or updates gathered_tokens. The reduction aggregates values along the explicit source axis; preserving the axis and keep-dimension setting matters for the later broadcast.

Donor model implementationhistorical source recovered; expression not executed in this website audit
gathered_tokens = sorted_tokens.new_empty( tokens_per_expert_group.sum(dim=0).cpu().item(), sorted_tokens.shape[1])
donor-eq-ef34cb18b8249c

DeepSeek MoE.moe_infer: tokens per expert post gather

In DeepseekV3MoE.moe_infer, this statement defines or updates tokens_per_expert_post_gather. The reduction aggregates values along the explicit source axis; preserving the axis and keep-dimension setting matters for the later broadcast.

Donor model implementationhistorical source recovered; expression not executed in this website audit
tokens_per_expert_post_gather = tokens_per_expert_group.view( self.ep_size, self.experts_per_rank).sum(dim=0)
donor-eq-d306f6fbdbf9f2

DeepSeek Model.forward: position ids

In DeepseekV3Model.forward, this statement defines or updates position_ids. The addition or subtraction updates the named state or combines residual contributions. The input shapes and the order in the surrounding forward path must be preserved.

Donor model implementationhistorical source recovered; expression not executed in this website audit
position_ids = torch.arange( past_key_values_length, seq_length + past_key_values_length, dtype=torch.long, device=device, )
donor-eq-7b64002ce3e5f4

DeepSeek YarnRotaryEmbedding._set_cos_sin_cache: freq extra

In DeepseekV3YarnRotaryEmbedding._set_cos_sin_cache, this statement defines or updates freq_extra. The expression forms a quotient or integer division. The denominator, integer rounding and tensor shape convention determine its scale or index result.

Donor model implementationhistorical source recovered; expression not executed in this website audit
freq_extra = 1.0 / (self.base**( torch.arange(0, dim, 2, dtype=torch.float32, device=device) / dim))
donor-eq-c74f254589c718

DeepSeek YarnRotaryEmbedding._set_cos_sin_cache: freq inter

In DeepseekV3YarnRotaryEmbedding._set_cos_sin_cache, this statement defines or updates freq_inter. The expression forms a quotient or integer division. The denominator, integer rounding and tensor shape convention determine its scale or index result.

Donor model implementationhistorical source recovered; expression not executed in this website audit
freq_inter = 1.0 / (self.scaling_factor * self.base**( torch.arange(0, dim, 2, dtype=torch.float32, device=device) / dim))

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