Is there any hidden randomness in Transformer in the generate function?
If it is something hard to spot (maybe something within a library function), to perfectly replicate something I fix random seeds of torch, numpy and random.
torch.manual_seed(0)
np.random.seed(0)
random.seed(0)