robinzixuan
commited on
Commit
•
452f4c3
1
Parent(s):
1f0c5b6
Update modeling_opt.py
Browse files- modeling_opt.py +2 -1
modeling_opt.py
CHANGED
@@ -725,9 +725,10 @@ class OPTDecoderLayer(nn.Module):
|
|
725 |
super().__init__()
|
726 |
self.embed_dim = config.hidden_size
|
727 |
|
728 |
-
self.self_attn = OPT_ATTENTION_CLASSES[config.
|
729 |
config=config, is_decoder=True)
|
730 |
print(self.self_attn)
|
|
|
731 |
self.do_layer_norm_before = config.do_layer_norm_before
|
732 |
self.dropout = config.dropout
|
733 |
self.activation_fn = ACT2FN[config.activation_function]
|
|
|
725 |
super().__init__()
|
726 |
self.embed_dim = config.hidden_size
|
727 |
|
728 |
+
self.self_attn = OPT_ATTENTION_CLASSES[config.attn_implementation](
|
729 |
config=config, is_decoder=True)
|
730 |
print(self.self_attn)
|
731 |
+
print(config.attn_implementation)
|
732 |
self.do_layer_norm_before = config.do_layer_norm_before
|
733 |
self.dropout = config.dropout
|
734 |
self.activation_fn = ACT2FN[config.activation_function]
|