This didn’t work for me, how can you reload the model once you’ve resized the embedding?
The rest of the model resizes, but it seems the LM_HEAD will not, eg:
size mismatch for lm_head.weight: copying a param with shape 
torch.Size([32128, 768]) from checkpoint, the shape in current model is 
torch.Size([32102, 768])`

Disregard this, it was a bug that was fixed in:

  
      github.com/huggingface/transformers
  
  
    
  
    
  

  
    
      [T5/MT5] Fix resize tokens 17
    

    
      huggingface:master ← patrickvonplaten:fix_t5_resize_tokens
    

    
      
        opened 
        
          
        
        Dec 1, 2020
      
      

      
        
          
          patrickvonplaten
        
      

      
        
          +59
          -37