fix ignore_keys
Browse files
modeling_lsg_camembert.py
CHANGED
@@ -1044,8 +1044,6 @@ class LSGCamembertForCausalLM(LSGCamembertPreTrainedModel, CamembertForCausalLM)
|
|
1044 |
self.roberta = LSGCamembertModel(config, add_pooling_layer=False)
|
1045 |
self.lm_head = CamembertLMHead(config)
|
1046 |
|
1047 |
-
# The LM head weights require special treatment only when they are tied with the word embeddings
|
1048 |
-
self.update_keys_to_ignore(config, ["lm_head.decoder.weight"])
|
1049 |
|
1050 |
# Initialize weights and apply final processing
|
1051 |
self.post_init()
|
@@ -1071,9 +1069,6 @@ class LSGCamembertForMaskedLM(LSGCamembertPreTrainedModel, CamembertForMaskedLM)
|
|
1071 |
|
1072 |
self.roberta = LSGCamembertModel(config, add_pooling_layer=False)
|
1073 |
self.lm_head = CamembertLMHead(config)
|
1074 |
-
|
1075 |
-
# The LM head weights require special treatment only when they are tied with the word embeddings
|
1076 |
-
self.update_keys_to_ignore(config, ["lm_head.decoder.weight"])
|
1077 |
|
1078 |
# Initialize weights and apply final processing
|
1079 |
self.post_init()
|
|
|
1044 |
self.roberta = LSGCamembertModel(config, add_pooling_layer=False)
|
1045 |
self.lm_head = CamembertLMHead(config)
|
1046 |
|
|
|
|
|
1047 |
|
1048 |
# Initialize weights and apply final processing
|
1049 |
self.post_init()
|
|
|
1069 |
|
1070 |
self.roberta = LSGCamembertModel(config, add_pooling_layer=False)
|
1071 |
self.lm_head = CamembertLMHead(config)
|
|
|
|
|
|
|
1072 |
|
1073 |
# Initialize weights and apply final processing
|
1074 |
self.post_init()
|