Upload modeling_esm_plusplus.py with huggingface_hub
Browse files- modeling_esm_plusplus.py +7 -3
modeling_esm_plusplus.py
CHANGED
|
@@ -1091,13 +1091,17 @@ class ESMplusplusModel(PreTrainedESMplusplusModel, EmbeddingMixin):
|
|
| 1091 |
else:
|
| 1092 |
x = inputs_embeds
|
| 1093 |
|
| 1094 |
-
|
| 1095 |
x=x,
|
| 1096 |
attention_mask=attention_mask,
|
| 1097 |
output_hidden_states=output_hidden_states,
|
| 1098 |
output_attentions=output_attentions,
|
| 1099 |
-
)
|
| 1100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1101 |
|
| 1102 |
class ESMplusplusForMaskedLM(PreTrainedESMplusplusModel, EmbeddingMixin):
|
| 1103 |
"""
|
|
|
|
| 1091 |
else:
|
| 1092 |
x = inputs_embeds
|
| 1093 |
|
| 1094 |
+
transformer_output = self.transformer(
|
| 1095 |
x=x,
|
| 1096 |
attention_mask=attention_mask,
|
| 1097 |
output_hidden_states=output_hidden_states,
|
| 1098 |
output_attentions=output_attentions,
|
| 1099 |
+
)
|
| 1100 |
+
return ESMplusplusOutput(
|
| 1101 |
+
last_hidden_state=transformer_output.last_hidden_state,
|
| 1102 |
+
hidden_states=transformer_output.hidden_states,
|
| 1103 |
+
attentions=transformer_output.attentions,
|
| 1104 |
+
)
|
| 1105 |
|
| 1106 |
class ESMplusplusForMaskedLM(PreTrainedESMplusplusModel, EmbeddingMixin):
|
| 1107 |
"""
|