Update modeling_hf_nomic_bert.py
Browse files
modeling_hf_nomic_bert.py
CHANGED
@@ -1694,6 +1694,7 @@ class NomicBertModel(NomicBertPreTrainedModel):
|
|
1694 |
return_dict=None,
|
1695 |
matryoshka_dim=None,
|
1696 |
inputs_embeds=None,
|
|
|
1697 |
):
|
1698 |
if input_ids is not None and inputs_embeds is not None:
|
1699 |
raise ValueError("You cannot specify both input_ids and inputs_embeds at the same time")
|
@@ -1867,7 +1868,7 @@ class NomicBertForMultipleChoice(NomicBertPreTrainedModel):
|
|
1867 |
def __init__(self, config):
|
1868 |
super().__init__(config)
|
1869 |
|
1870 |
-
self.
|
1871 |
classifier_dropout = (
|
1872 |
config.classifier_dropout if config.classifier_dropout is not None else config.hidden_dropout_prob
|
1873 |
)
|
@@ -1910,7 +1911,7 @@ class NomicBertForMultipleChoice(NomicBertPreTrainedModel):
|
|
1910 |
else None
|
1911 |
)
|
1912 |
|
1913 |
-
outputs = self.
|
1914 |
input_ids,
|
1915 |
attention_mask=attention_mask,
|
1916 |
token_type_ids=token_type_ids,
|
|
|
1694 |
return_dict=None,
|
1695 |
matryoshka_dim=None,
|
1696 |
inputs_embeds=None,
|
1697 |
+
head_mask=None,
|
1698 |
):
|
1699 |
if input_ids is not None and inputs_embeds is not None:
|
1700 |
raise ValueError("You cannot specify both input_ids and inputs_embeds at the same time")
|
|
|
1868 |
def __init__(self, config):
|
1869 |
super().__init__(config)
|
1870 |
|
1871 |
+
self.bert = NomicBertModel(config, add_pooling_layer=True)
|
1872 |
classifier_dropout = (
|
1873 |
config.classifier_dropout if config.classifier_dropout is not None else config.hidden_dropout_prob
|
1874 |
)
|
|
|
1911 |
else None
|
1912 |
)
|
1913 |
|
1914 |
+
outputs = self.bert(
|
1915 |
input_ids,
|
1916 |
attention_mask=attention_mask,
|
1917 |
token_type_ids=token_type_ids,
|