Adding tokens to mT5, tensorflow get ValueError

I am trying to add new tokens to mT5 model this way:

import transformers import MT5Tokenizer, TFMT5ForConditionalGeneration

tokenizer = MT5Tokenizer.from_pretrained('google/mt5-small')
model = TFMT5ForConditionalGeneration.from_pretrained('google/mt5-small')



But get the error:

ValueError: Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor.

What am I doing wrong?

Same code with torch-version of model works well.