Using a custom GenerationMixin with T5ForConditionalGeneration

I have cloned the code for GenerationMixin from transformers/src/transformers/generation_utils.py and have modified it.
I have the following model and tokenizer.

tokenizer = AutoTokenizer.from_pretrained('t5-small')
model = T5ForConditionalGeneration.from_pretrained('t5-small').cuda().eval()

Now, while calling model.generate, how do I ensure that .generate() in my modified GenerationMixin is used?