ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Normalize the selected routing affinities

Each gathered affinity is divided by the sum across the selected experts plus 10⁻²⁰. Ignoring that stabilizer, the selected weights sum to one. With the stabilizer retained, the exact sum is S/(S+10⁻²⁰), so it is approximately one for an ordinary positive sum. This is…

Donor architecture mathematicshistorical source recovered; expression not executed in this website audit
Learn with the Atlas

Understand the scale

See what normalization changes and which assumptions it introduces.

Open guided lesson
donor-deepseek-weight-normalizedocumented formula or resource estimate
topkweight=topkweight/(topkweight.sum(−1,keepdim=True)+1e−20)topk_weight = topk_weight / (topk_weight.sum(-1, keepdim=True) + 1e-20)

Read the equation

Each gathered affinity is divided by the sum across the selected experts plus 10⁻²⁰. Ignoring that stabilizer, the selected weights sum to one. With the stabilizer retained, the exact sum is S/(S+10⁻²⁰), so it is approximately one for an ordinary positive sum. This is normalization of sigmoid scores, not a softmax of the logits.

Terms & definitions

TermMeaning in this source
S

Sum of selected affinities

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
SELECTION in steps 3-6 used scores_for_choice, the POST-bias value.
          Selection and weighting use different quantities, deliberately.

  8.  topk_weight = topk_weight / (topk_weight.sum(-1, keepdim=True) + 1e-20)
      topk_weight = topk_weight * 2.5                   # routed_scaling_factor
      Renormalize to sum 1, THEN scale by 2.5.

  Then in DeepseekV3MoE.forward (lines 522-532):
Exact original notation
topk_weight = topk_weight / (topk_weight.sum(-1, keepdim=True) + 1e-20)

Related builds

Sources & provenance

01
DEEPSEEK_R1_COMPLETE.txt
lines 847–847 · Aug 5, 2026
topk_weight = topk_weight / (topk_weight.sum(-1, keepdim=True) + 1e-20)
02
DEEPSEEK_R1_COMPLETE.txt
lines 847–847 · Aug 5, 2026
topk_weight = topk_weight / (topk_weight.sum(-1, keepdim=True) + 1e-20)

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