I suspect multiprocessing + shared memory could help this. The stdlib has provisions for both, but a coordination layer is needed.
That would be closest to true multithreading.
That would be closest to true multithreading.
const y = await remote_model_a(x) // different machine
const z = await remote_model_b(y) // different machine
await z.backward()
is trivially pipelined when run in parallel. With multithreading suddenly the backing C++ library has to be aware of this and figure things out for you