I apologize for the confusion and I thank you for your patience with me.
The algorithm doesn’t really make sense outside of the few-shot learning framework.
I spent some time looking through the code @vainaijr posted and how the algorithm should work and I think this is what it should do:
Models 1 through N compute losses for tasks 1 through N, then model_0 uses that to get its parameters to a place where the optimal weights for any of those tasks are a few gradient steps away from each of the tasks 1 through N.
Models 1 through N have now accomplished their use, so we don’t need them for this iteration anymore.
In steps format:

make N copies of model_0 (namely model 1 thorough N)
use models 1 through N to train them on different tasks and collect the losses
pretend that the summed loss is the loss for model_0
pass the same data models 1 through N trained on to model_0 and compute the loss on them, but manually change that loss so it’s equal to the summed loss
discard models 1 through N

This happens for an epochs number of times, so the summed losses at each iteration work as an indicator for the main model as to how far it is from that good initialization place in the parameters space where most different tasks are a few gradient steps away.
That way model_0 can update its own weights based on the summed losses from models 1 through N.
My main question, which I think I didn’t ask very well, was how should I update the loss manually while not change the computational graph. Which I did using this way:
#data.x are all the data used to train models 1 through N. They are disjoint by nature.
model_loss = loss(model(data.x), data.y) 
            
with torch.no_grad():
 model_loss.set_(torch.Tensor([summed_losses]).to(device)[0]) 


Which is working for now. At least I think so