Commit 80f53f73 authored by thomwolf's avatar thomwolf
Browse files

gpt-2 from_pretrained can use special tokens

parent e79ceb15
...@@ -371,7 +371,7 @@ class GPT2PreTrainedModel(nn.Module): ...@@ -371,7 +371,7 @@ class GPT2PreTrainedModel(nn.Module):
@classmethod @classmethod
def from_pretrained( def from_pretrained(
cls, pretrained_model_name_or_path, state_dict=None, cache_dir=None, from_tf=False, *inputs, **kwargs cls, pretrained_model_name_or_path, num_special_tokens=None, state_dict=None, cache_dir=None, from_tf=False, *inputs, **kwargs
): ):
""" """
Instantiate a GPT2PreTrainedModel from a pre-trained model file or a pytorch state dict. Instantiate a GPT2PreTrainedModel from a pre-trained model file or a pytorch state dict.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment