You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/transformers/models/mt5/configuration_mt5.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -40,8 +40,8 @@ class MT5Config(PretrainedConfig):
40
40
d_model (`int`, *optional*, defaults to 512):
41
41
Size of the encoder layers and the pooler layer.
42
42
d_kv (`int`, *optional*, defaults to 64):
43
-
Size of the key, query, value projections per attention head. `d_kv` has to be equal to `d_model //
44
-
num_heads`.
43
+
Size of the key, query, value projections per attention head. In the conventional context, it is typically expected that `d_kv` has to be equal to `d_model // num_heads`.
44
+
But in the architecture of mt5-small, `d_kv` is not equal to `d_model //num_heads`. The `inner_dim` of the projection layer will be defined as `num_heads * d_kv`.
45
45
d_ff (`int`, *optional*, defaults to 1024):
46
46
Size of the intermediate feed forward layer in each `T5Block`.
0 commit comments