Just came here to ask exactly this question.  This’d be really nice to have.  As far as I can tell from the torch.rand documentation 26 there’s no possibility of passing a RandomState object as an argument.  Found this 3 but that seems to be just for the Lua version.  However gen=torch.Generator() seems to work, I just don’t know what to do with it.