fix gpt/gpt-2 from pretrained
This commit is contained in:
@@ -423,7 +423,7 @@ class GPT2PreTrainedModel(PreTrainedModel):
|
|||||||
"""
|
"""
|
||||||
num_special_tokens = kwargs.pop('num_special_tokens', None)
|
num_special_tokens = kwargs.pop('num_special_tokens', None)
|
||||||
|
|
||||||
model = super(PreTrainedModel, cls).from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
|
model = super().from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
|
||||||
|
|
||||||
# Add additional embeddings for special tokens if needed
|
# Add additional embeddings for special tokens if needed
|
||||||
# This step also make sure we are still sharing the output and input embeddings after loading weights
|
# This step also make sure we are still sharing the output and input embeddings after loading weights
|
||||||
|
|||||||
Reference in New Issue
Block a user