robinzixuan commited on
Commit
07ce31c
·
verified ·
1 Parent(s): 64f43b6

Update modeling_opt.py

Browse files
Files changed (1) hide show
  1. modeling_opt.py +7 -0
modeling_opt.py CHANGED
@@ -53,6 +53,10 @@ logger = logging.get_logger(__name__)
53
  _CHECKPOINT_FOR_DOC = "facebook/opt-350m"
54
  _CONFIG_FOR_DOC = "OPTConfig"
55
 
 
 
 
 
56
  # Base model docstring
57
  _EXPECTED_OUTPUT_SHAPE = [1, 8, 1024]
58
 
@@ -76,6 +80,9 @@ def _get_unpad_data(attention_mask):
76
  )
77
 
78
 
 
 
 
79
  class OPTLearnedPositionalEmbedding(nn.Embedding):
80
  """
81
  This module learns positional embeddings up to a fixed maximum size.
 
53
  _CHECKPOINT_FOR_DOC = "facebook/opt-350m"
54
  _CONFIG_FOR_DOC = "OPTConfig"
55
 
56
+
57
+
58
+
59
+
60
  # Base model docstring
61
  _EXPECTED_OUTPUT_SHAPE = [1, 8, 1024]
62
 
 
80
  )
81
 
82
 
83
+ OPTOutEffHop.register_for_auto_class("AutoModel")
84
+
85
+
86
  class OPTLearnedPositionalEmbedding(nn.Embedding):
87
  """
88
  This module learns positional embeddings up to a fixed maximum size.