I’m not sure I understand the use case completely and where you are stuck at the moment.
The posted code will iterate the DataLoader and create the similarities for the current batch for all pretrained models.
Would you like to calculate the similarities differently?
PS: You can post code snippets by wrapping them into three backticks ```