Hi,
Few things I think:

du -h  actually counts the size of the folder as well. Running “ls -lha” will show you that the empty folder takes 4K, not the .pth file which is only 515bytes.
sys.getsizeof() measure the size of the Python object. So it is very unreliable for most pytorch elements.
The storage format is not really optimized for space. You can actually “cat” the file and you’ll see that it contains more strings than actual data.
Using different pickle backend might improve that but I have never tried (pickle_module argument to the save function)