Read the equation
The baseline coefficient is 1/√192. Multiplying it by the squared magnitude adjustment yields(1+0.1 ln 40)²/√192≈0.1352337788608801, a factor 1.8738542071 above the baseline. The dossier’s 0.135237 is an approximate decimal. In this configuration the sine/cosine cache’s separate ratio of equal adjustments is one, while this attention multiplier still changes.
Terms & definitions
| Term | Meaning in this source |
|---|---|
| mscale | Evaluated magnitude multiplier1.3688879454 |
| softmax_scale | Scalar applied to query–key scores |
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
SEPARATELY, in DeepseekV3Attention.__init__ (lines 690-695), because
mscale_all_dim is truthy:
softmax_scale = 192^-0.5 * mscale * mscale
= 0.0721688 * 1.3688879^2
= 0.135237
This is NOT 1/sqrt(192) = 0.0721688. The 1.874x factor is load-bearing.
APPLICATION
rotate_half(x) splits the last dim in half and returns concat(-x2, x1).
apply_rotary_pos_emb indexes cos/sin by position_ids and computesExact original notation
softmax_scale = 192^-0.5 * mscale * mscale
= 0.0721688 * 1.3688879^2
= 0.135237
This is NOT 1/sqrt(192) = 0.0721688. The 1.874x factor is load-bearing.Related builds
Sources & provenance
softmax_scale = 192^-0.5 * mscale * mscale = 0.0721688 * 1.3688879^2 = 0.135237 This is NOT 1/sqrt(192) = 0.0721688. The 1.874x factor is load-bearing.
softmax_scale = 192^-0.5 * mscale * mscale = 0.0721688 * 1.3688879^2 = 0.135237 This is NOT 1/sqrt(192) = 0.0721688. The 1.874x factor is load-bearing.