Skip to content

Commit f2870cb

Browse files
committed
update
1 parent 4ebeb84 commit f2870cb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ch04/07_moe/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ When using an MoE layer, only `top_k` experts are active per token, so the effec
4848
You can use the [memory_estimator_moe.py](memory_estimator_moe.py) script in this folder to apply this for different model configs to see how much memory you can save by using MoE over FFN (note that this is for a single transformer block, to get the total savings, multiply by the number of transformer blocks in your model):
4949

5050
```bash
51-
uv run ffn_moe_memory_estimator.py --emb_dim 7168 --hidden_dim 14336 --ffn_type swiglu \
51+
uv run memory_estimator_moe.py --emb_dim 7168 --hidden_dim 14336 --ffn_type swiglu \
5252
--num_experts 8 --top_k 2 --match_dense
5353
==== Config ====
5454
emb_dim : 7168
@@ -98,7 +98,7 @@ uv run plot_memory_estimates_moe.py \
9898
 
9999
## MoE Code Examples
100100

101-
The [gpt_with_kv_mha.py](gpt_with_kv_mha.py) and [gpt_with_kv_moe.py](gpt_with_kv_moe.py) scripts in this folder provide hands-on examples for comparing the regular FFN and MoE memory usage in the context of a GPT model implementation. Note that both scripts use [SwiGLU](https://arxiv.org/abs/2002.05202) feed-forward modules as shown in the first figure of this page (GPT-2 traditionally uses GELU).
101+
The [gpt_with_kv_moe.py](gpt_with_kv_moe.py) and [gpt_with_kv_moe.py](gpt_with_kv_moe.py) scripts in this folder provide hands-on examples for comparing the regular FFN and MoE memory usage in the context of a GPT model implementation. Note that both scripts use [SwiGLU](https://arxiv.org/abs/2002.05202) feed-forward modules as shown in the first figure of this page (GPT-2 traditionally uses GELU).
102102

103103
**Note: The model is not trained and thus generates nonsensical text. You can find a trained MoE in the bonus materials at [../../ch05/11_qwen3/standalone-qwen3-moe-plus-kvcache.ipynb](../../ch05/11_qwen3/standalone-qwen3-moe-plus-kvcache.ipynb).**
104104

File renamed without changes.

0 commit comments

Comments
 (0)