I modified your code a bit
setup1 = """
import numpy as np
import torch

def test1():
	y = np.random.rand(128, 25000)
	y = torch.from_numpy(y)
"""

setup2 = """
import torch

def test2():
	y = torch.rand(128, 25000)
"""

if __name__ == "__main__":
	import timeit
	print(timeit.timeit("test1()", setup=setup1, number=100))
	print(timeit.timeit("test2()", setup=setup2, number=100))

Instead of directly passing numpy array into torch tensor, using torch.from_numpy is much faster.
These are the results I got by using the above code.
3.1434557730099186 --> numpy
2.5963897299952805 --> torch
These are the results I got when I used your original code.
19.75996291998308 --> numpy
2.466043735970743 --> torch