Increasing the num_workers would use shared memory for the communication. Take a look at these docs 1 for more information.
I don’t know which OS you are using, but note this section:

Since workers rely on Python multiprocessing, worker launch behavior is different on Windows compared to Unix.

On Unix, fork() is the default multiprocessing start method. Using fork(), child workers typically can access the dataset and Python argument functions directly through the cloned address space.
On Windows or MacOS, spawn() is the default multiprocessing start method. Using spawn(), another interpreter is launched which runs your main script, followed by the internal worker function that receives the dataset, collate_fn and other arguments through pickle serialization.


I don’t know exactly how the Windows implementation was done, but in case memory mapping is used your hard drive could be used to store a copy of the data.