I mean there is the torch.randn and torch.randint. Hope that works for you. But could also create it in numpy and then convert it to a tensor with torch.tensor()

Yeah, unfortunately there is no implementation in PyTorch for that – the random seeds are all global. One solution though as others suggested:

is just to sample via NumPy and then convert to tensors … until there’s maybe a PyTorch implementation one day …

EDIT: just following the link on the answer above, it does seem that you can manually set the seed for the torch.Generator. That should then be equivalent and probably what you were looking for: