Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Megatron-LM
Commits
557b84d8
Commit
557b84d8
authored
Mar 13, 2025
by
dongcl
Browse files
增加路由器参数
parent
f967a24c
Pipeline
#2492
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
megatron/training/theoretical_memory_usage.py
megatron/training/theoretical_memory_usage.py
+2
-0
No files found.
megatron/training/theoretical_memory_usage.py
View file @
557b84d8
...
...
@@ -59,6 +59,8 @@ def compute_weight_and_optimizer_memory(args, verbose=False):
)
# routed experts.
+
(
2
*
(
args
.
ffn_hidden_size
*
args
.
hidden_size
)
*
num_experts
*
gated_linear_multiplier
)
# router
+
args
.
hidden_size
*
num_experts
# shared experts.
+
(
2
*
args
.
moe_shared_expert_intermediate_size
*
args
.
hidden_size
)
# Transformer layernorms.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment