Skip to content

Commit

Permalink
Merge pull request #678 from google:tflop_moe
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 639194660
  • Loading branch information
maxtext authors committed May 31, 2024
2 parents 3a441e8 + 288912b commit f12ba54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MaxText/maxtext_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def calculate_tflops_training_per_device(config, log=True):
if config.num_experts > 1:
# MoE: brute force implementation
gate_flops = 2 * config.per_device_batch_size * config.max_target_length * config.emb_dim * config.num_experts
total_ffn_flops = gate_flops + config.num_experts * total_ffn_flops
total_ffn_flops = gate_flops + config.num_experts_per_tok * total_ffn_flops

qkv_flops = (
2
Expand Down

0 comments on commit f12ba54

Please sign in to comment.