mirror of
https://github.com/labmlai/annotated_deep_learning_paper_implementations.git
synced 2025-08-16 02:41:38 +08:00
math comment fix
This commit is contained in:
@ -114,7 +114,7 @@ class Configs(NLPAutoRegressionConfigs):
|
|||||||
# Total number of tokens processed, $T$, in the current batch $\mathscr{B}$
|
# Total number of tokens processed, $T$, in the current batch $\mathscr{B}$
|
||||||
total = counts.sum(dim=-1, keepdims=True)
|
total = counts.sum(dim=-1, keepdims=True)
|
||||||
# Fraction of tokens routed to each expert
|
# Fraction of tokens routed to each expert
|
||||||
# $$f_i = \frac{1}{T} \sum_{x \in \mathscr{B}} \unicode{x1D7D9} \{ \mathop{argmax} p(x), i \}$$
|
# $$f_i = \frac{1}{T} \sum_{x \in \mathscr{B}} \mathbf{1} \{ \mathop{argmax} p(x), i \}$$
|
||||||
# $f_i$ is the count of tokens where the argmax of $p(x)$ is equal to $i$.
|
# $f_i$ is the count of tokens where the argmax of $p(x)$ is equal to $i$.
|
||||||
route_frac = counts / total
|
route_frac = counts / total
|
||||||
# Mean routing probability
|
# Mean routing probability
|
||||||
|
Reference in New Issue
Block a user