DestilGTP2 code from pytorch-transformers does not work in transformers, I made a basic example
How would i convert this to new version of transformers. Or is it possible to somehow use DestilGTP2 with pytorch-transformers.

    use_transformers = True
    if use_transformers: 
        import torch   
        from transformers import GPT2Tokenizer, GPT2Model, GPT2LMHeadModel                       
        tokenizer1 = GPT2Tokenizer.from_pretrained('distilgpt2',cache_dir="/var/software/Models/")
        model1 = GPT2LMHeadModel.from_pretrained('distilgpt2',cache_dir="/var/software/Models/") 
        model1.eval()
        model1.to('cuda')
        text = "Who was Jim Henson ?"
        indexed_tokens = tokenizer1.encode(text)
        tokens_tensor = torch.tensor([indexed_tokens])
        tokens_tensor = tokens_tensor.to('cuda')
       with torch.no_grad():
            predictions_1 = model1(tokens_tensor) 
       print(predictions_1) 
   
    else:  
        import torch  
        from pytorch_transformers import GPT2Tokenizer, GPT2Model, GPT2LMHeadModel
        tokenizer1 = GPT2Tokenizer.from_pretrained('gpt2',cache_dir="/var/software/Models/") # cache_dir=None
        model1 = GPT2LMHeadModel.from_pretrained('gpt2',cache_dir="/var/software/Models/")
        model1.eval()
        model1.to('cuda')
        text = "Who was Jim Henson ?"
        indexed_tokens = tokenizer1.encode(text)
        tokens_tensor = torch.tensor([indexed_tokens])
        tokens_tensor = tokens_tensor.to('cuda')
        with torch.no_grad():
            predictions_1 = model1(tokens_tensor) 
        print(predictions_1) 

When i try i get an error, and tried to follow the guide but do not get what the new tokeniser does differently. 

    
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.