Notations mathématiques
Tous les symboles utilisés dans les formules du wiki, avec leur signification et
leur valeur chez Kimi K3.
Conventions générales
| Notation |
Signification |
| \(x\) |
Scalaire (italique minuscule) |
| \(\mathbf{x}\) |
Vecteur (gras minuscule) |
| \(\mathbf{X}\) |
Matrice (gras majuscule) |
| \(\mathbb{R}^{n}\) |
Espace des vecteurs réels de dimension \(n\) |
| \(\odot\) |
Produit coordonnée par coordonnée (Hadamard) |
| \(\mathbf{x}^\top\) |
Transposée |
| \(\mathbf{u}\mathbf{v}^\top\) |
Produit extérieur — donne une matrice |
| \(\operatorname{Diag}(\mathbf{x})\) |
Matrice diagonale de diagonale \(\mathbf{x}\) |
| \(\mathbf{I}\) |
Matrice identité |
| \(\|\mathbf{x}\|_2\) |
Norme euclidienne |
| \(\|\mathbf{x}\|_\infty\) |
Plus grande valeur absolue des coordonnées |
| \(\mathbf{1}[\cdot]\) |
Fonction indicatrice : 1 si vrai, 0 sinon |
| \(\operatorname{sg}(\cdot)\) |
Stop-gradient — traité comme une constante |
Dimensions du modèle
| Symbole |
Signification |
Valeur K3 |
| \(d\) |
Dimension cachée |
7 168 |
| \(L\) |
Nombre de couches |
93 |
| \(V\) |
Taille du vocabulaire |
163 840 |
| \(T\) |
Longueur de séquence |
jusqu'à 1 048 576 |
| \(H\) |
Nombre de têtes d'attention |
96 |
| \(d_k\) |
Dimension des clés (par tête) |
128 |
| \(d_v\) |
Dimension des valeurs (par tête) |
128 |
| \(\ell\) |
Largeur latente des experts routés |
3 584 |
| \(d_m\) |
Dimension interne d'un expert |
3 072 |
| \(E\) ou \(n\) |
Nombre d'experts routés |
896 |
| \(k\) |
Experts actifs par jeton |
16 |
| \(N_s\) |
Experts partagés |
2 |
| \(N\) |
Blocs AttnRes |
8 (+ embedding) |
| \(S\) |
Taille d'un bloc AttnRes |
12 couches |
| \(C\) |
Taille de bloc du calcul chunkwise KDA |
64 ou 128 |
Attention et KDA
| Symbole |
Signification |
Domaine |
| \(\mathbf{q}_t, \mathbf{k}_t\) |
Requête et clé à la position \(t\) |
\(\mathbb{R}^{d_k}\), normalisées L2 |
| \(\mathbf{v}_t\) |
Valeur |
\(\mathbb{R}^{d_v}\) |
| \(\mathbf{S}_t\) |
État récurrent de KDA |
\(\mathbb{R}^{d_k \times d_v}\) |
| \(\mathbf{\alpha}_t\) |
Rétention par canal |
\((e^{-5}, 1)^{d_k}\) |
| \(\beta_t\) |
Force d'écriture delta |
\((0, 1)\) |
| \(\mathbf{g}_t\) |
Log-décroissance |
\((g_{\min}, 0)^{d_k}\) |
| \(g_{\min}\) |
Plancher de log-décroissance |
\(= -5\) |
| \(A_h\) |
Échelle log apprise par tête |
init. 0 |
| \(\mathbf{b}_\alpha^h\) |
Biais de décroissance par tête |
\(\mathbb{R}^{d_k}\) |
| \(\mathbf{z}_t\) |
Logit de décroissance |
\(\mathbb{R}^{d_k}\) |
| \(\mathbf{\gamma}^{i\to j}\) |
Décroissance cumulée \(\prod_{r=i}^{j}\mathbf{\alpha}_r\) |
\((0,1)^{d_k}\) |
| \(\mathbf{M}_t\) |
Transition \((\mathbf{I}-\beta_t\mathbf{k}_t\mathbf{k}_t^\top)\operatorname{Diag}(\mathbf{\alpha}_t)\) |
\(\mathbb{R}^{d_k \times d_k}\) |
| \(\widetilde{\mathbf{S}}\) |
État calculé depuis \(\mathbf{S}=\mathbf{0}\) |
\(\mathbb{R}^{d_k \times d_v}\) |
| \(\tilde{\mathbf{o}}_t\) |
Sortie brute, avant porte |
\(\mathbb{R}^{d_v}\) |
| \(\mathbf{c}_t\) |
Latent KV compressé (MLA) |
\(\mathbb{R}^{512}\) |
| \(\operatorname{Tril}\) |
Met à zéro le triangulaire strictement supérieur |
— |
Attention Residuals
| Symbole |
Signification |
| \(\mathbf{w}_l\) |
Pseudo-requête apprise de la couche \(l\) (un paramètre, pas une projection) |
| \(\mathbf{h}_1\) |
Embedding du jeton — la source \(i = 0\) |
| \(f_i(\mathbf{h}_i)\) |
Sortie de la couche \(i\) |
| \(\alpha_{i\to l}\) |
Poids que la couche \(l\) accorde à la source \(i\) |
| \(\phi(\mathbf{q},\mathbf{k})\) |
Noyau \(\exp(\mathbf{q}^\top\operatorname{RMSNorm}(\mathbf{k}))\) |
| \(\mathbf{b}_n\) |
Représentation du bloc \(n\) (somme de ses sorties de couches) |
| \(\mathbf{b}_n^{i}\) |
Somme partielle sur les \(i\) premières couches du bloc \(n\) |
| \(\mathcal{B}_n\) |
Ensemble des indices de couches du bloc \(n\) |
MoE et Quantile Balancing
| Symbole |
Signification |
| \(\mathbf{s}_i\) |
Scores du routeur pour le jeton \(i\), \(\operatorname{Sigmoid}(\mathbf{W}_r\mathbf{x}_i)\) |
| \(\mathbf{b}\) |
Biais d'équilibrage — dans la sélection seulement |
| \(\mathcal{T}_i\) |
Ensemble des \(k\) experts sélectionnés |
| \(p_{i,j}\) |
Poids de mélange normalisé — sans \(\mathbf{b}\) |
| \(\mathbf{u}\) |
Agrégat routé, en dimension latente \(\ell\) |
| \(\mathbf{W}^{\downarrow}, \mathbf{W}^{\uparrow}\) |
Projections \(d \to \ell\) et \(\ell \to d\) |
| \(E_i^{\mathrm{routed}}\) |
Expert routé, \(\mathbb{R}^\ell \to \mathbb{R}^\ell\) |
| \(E_j^{\mathrm{shared}}\) |
Expert partagé, \(\mathbb{R}^d \to \mathbb{R}^d\) |
| \(m\) |
Nombre de jetons du lot |
| \(q\) |
Charge cible par expert, \(= mk/n\) |
| \(\alpha_i\) |
Seuil du jeton \(i\) (le \((k{+}1)\)-ième score biaisé) |
| \(\beta_j\) |
Seuil de l'expert \(j\) — \(\mathbf{b} = -\mathbf{\beta}\) |
| \(r_{i,j}\) |
Biais requis, \(= \alpha_i - s_{i,j}\) (ce qu'on histogramme) |
| \(B\) |
Nombre de casiers de l'histogramme, \(\approx 1000\) |
| \(w\) |
Largeur de casier |
SiTU-GLU
| Symbole |
Signification |
Valeur K3 |
| \(\beta_1\) |
Plafond doux de la branche porte |
4 |
| \(\beta_2\) |
Plafond doux de la branche montante |
25 |
| \(\operatorname{softcap}(x,\beta)\) |
\(\beta\tanh(x/\beta)\) |
— |
| Borne de sortie |
\(\|\cdot\|_\infty \le \beta_1\beta_2\) |
100 |
MoonEP
| Symbole |
Signification |
| \(E\) |
Nombre total d'experts |
| \(R\) |
Taille du groupe de parallélisme d'experts |
| \(S\) |
Longueur de séquence |
| \(K\) |
Experts sélectionnés par jeton |
| \(m_r(P)\) |
Nombre d'experts redondants sur le rang \(r\) sous le plan \(P\) |
| \(M(I)\) |
\(\min_P \max_r m_r(P)\) pour une sortie de routeur \(I\) |
| Borne |
\(M(I) \le E/R\), essentiellement atteinte |
Post-entraînement
| Symbole |
Signification |
| \(\pi_\theta\) |
La politique — le modèle en cours d'entraînement |
| \(\pi_{\text{teacher}}^{(d,e)}\) |
Le professeur du domaine \(d\) et de l'effort \(e\) |
| \(d\) |
Domaine RL (général / agent / code) |
| \(e\) |
Niveau d'effort (low / high / max) |
| \(b_0(x)\) |
Budget de jetons de référence pour le problème \(x\) |
| \(\tau\) |
Multiplicateur de budget — le levier de contrôle d'effort |
| \(T(y)\) |
Compte de jetons de la trajectoire \(y\) |
| \(\sigma\) |
Multiplicateur de verbosité (contrôle GRM) |
| \(\ell_0\) |
Verbosité de référence |
| \(\lambda\) |
Fraction de complétion du partial rollout |
| \(N, K\) |
Nombre de prompts et de complétions par prompt |
| \(R_{\max}\) |
Seuil de bornage de la récompense MOPD |
| \(\mathcal{L}_{\mathrm{LK}}\) |
Perte du modèle brouillon, \(-\log\sum_x \min(p(x),q(x))\) |
Fonctions
| Fonction |
Définition |
| \(\operatorname{Sigmoid}(x)\) ou \(\sigma(x)\) |
\(1/(1+e^{-x})\) |
| \(\operatorname{Swish}(x)\) |
\(x\,\sigma(x)\) |
| \(\operatorname{Softplus}(x)\) |
\(\log(1+e^x)\) |
| \(\operatorname{softmax}(\mathbf{z})_i\) |
\(e^{z_i}/\sum_j e^{z_j}\) |
| \(\operatorname{RMSNorm}(\mathbf{x})\) |
\(\mathbf{x}\,/\sqrt{\frac{1}{d}\sum x_i^2 + \epsilon}\ \odot \mathbf{g}\) |
| \(\operatorname{L_2Norm}(\mathbf{x})\) |
\(\mathbf{x}/\|\mathbf{x}\|_2\) |
| \(\operatorname{ShortConv}\) |
Convolution causale, noyau de taille 4 |
| \(\operatorname{argtop}_k\) |
Indices des \(k\) plus grandes valeurs |
| \(\operatorname{quantile}_q\) |
Quantile d'ordre \(q\) |
| \(\operatorname{clip}(x,a,b)\) |
\(\max(a,\min(b,x))\) |
Retour aux annexes