Dear Jpeg729,
I enclosed some screenshots from terminal:
with mask d_pos_emb before first update
d_pos_emb Variable containing:
( 0  ,.,.) =
-0.1051  0.1341  0.1384  …  -0.4195  0.0894  0.1757
0.2043  0.6410  0.2800  …   0.3296  0.9028  0.0257
-0.3194  0.1362 -0.0486  …  -0.0811  0.3453  0.1107
…             ⋱             …
-0.0000 -0.0000 -0.0000  …   0.0000  0.0000 -0.0000
-0.0000 -0.0000 -0.0000  …   0.0000  0.0000 -0.0000
-0.0000 -0.0000 -0.0000  …   0.0000  0.0000 -0.0000
with mask d_pos_emb after first update

wihout mask d_pos_emb before first update
d_pos_emb Variable containing:
( 0  ,.,.) =
-1.2080e-01  5.8023e-01 -3.1423e-02  …   4.0058e-01  2.9359e-01  1.4976e-01
-1.2080e-01  5.8023e-01 -3.1423e-02  …   4.0058e-01  2.9359e-01  1.4976e-01
-1.2080e-01  5.8023e-01 -3.1423e-02  …   4.0058e-01  2.9359e-01  1.4976e-01
…                   ⋱                   …
-3.0333e-01 -2.1788e-01 -7.2018e-01  …   1.8724e-01  5.1078e-01 -5.1949e-01
-3.0333e-01 -2.1788e-01 -7.2018e-01  …   1.8724e-01  5.1078e-01 -5.1949e-01
-3.0333e-01 -2.1788e-01 -7.2018e-01  …   1.8724e-01  5.1078e-01 -5.1949e-01
without mask d_pos_emb after first update
( 0  ,.,.) =
-2.3951e-01 -3.3803e-01 -2.6433e-01  …   3.2791e-01  3.6259e-02  2.3877e-01
-2.0393e-01  1.3825e-01  5.7552e-02  …   2.7366e-01 -5.1705e-01  3.0394e-01
-5.5689e-01  1.9376e-01 -3.0927e-01  …   3.2666e-01 -1.9124e-01 -2.3107e-01
…                   ⋱                   …
-3.0234e-01 -2.1688e-01 -7.1918e-01  …   1.8624e-01  5.1178e-01 -5.2049e-01
-3.0234e-01 -2.1688e-01 -7.1918e-01  …   1.8624e-01  5.1178e-01 -5.2049e-01
-3.0234e-01 -2.1688e-01 -7.1918e-01  …   1.8624e-01  5.1178e-01 -5.2049e-01