Skip to content

Commit

Permalink
Update transformer.py
Browse files Browse the repository at this point in the history
bug fixed. if not, the hidden size can not divided.
  • Loading branch information
crazyofapple committed Apr 2, 2023
1 parent 9244b3e commit 273e8a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion megatron/model/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def __init__(
self.bias_gelu_fusion = neox_args.bias_gelu_fusion

# auto scale so geglu has equal parameters
ff_mult = 4 * 2 / 3 if self.activation_type == "geglu" else 4
ff_mult = int(4 * 2 / 3) if self.activation_type == "geglu" else 4
ff_dim = (
int(ff_mult * neox_args.hidden_size) * 2
if self.activation_type == "geglu"
Expand Down

0 comments on commit 273e8a5

Please sign in to comment.