When you modify the vocab, you also need to resize the the token embeddings. The right way to do this is

Add the new tokens to the tokenizer
tokenizer.add_tokens(list of new toknes)

Resize token embeddings
model.resize_token_embeddings(len(tokenizer))


teacher forcing is used while training. generate does not use teacher forcing since it’s not used in training and meant for generating after training.