Update modeling_hf_nomic_bert.py
Browse files
modeling_hf_nomic_bert.py
CHANGED
@@ -396,7 +396,7 @@ class NomicBertPreTrainedModel(PreTrainedModel):
|
|
396 |
if config is None:
|
397 |
config = cls.config_class.from_pretrained(model_name)
|
398 |
remove_cls = cls != NomicBertForPreTraining
|
399 |
-
remove_bert_prefix = cls
|
400 |
ignore_mismatched_shapes = kwargs.pop("ignore_mismatched_sizes", False)
|
401 |
num_labels = kwargs.pop("num_labels", None)
|
402 |
rotary_scaling_factor = kwargs.pop("rotary_scaling_factor", None)
|
|
|
396 |
if config is None:
|
397 |
config = cls.config_class.from_pretrained(model_name)
|
398 |
remove_cls = cls != NomicBertForPreTraining
|
399 |
+
remove_bert_prefix = cls not in [NomicBertForPreTraining, NomicBertForSequenceClassification, NomicBertForTokenClassification, NomicBertForMultipleChoice, NomicBertForQuestionAnswering]
|
400 |
ignore_mismatched_shapes = kwargs.pop("ignore_mismatched_sizes", False)
|
401 |
num_labels = kwargs.pop("num_labels", None)
|
402 |
rotary_scaling_factor = kwargs.pop("rotary_scaling_factor", None)
|