Explain pytorch_model.bin

Hi, can someone explain the pytorch_model.bin file generated during the training process AND provide a link to the source code that writes it?
A print statement during training indicates that pytorch_model.bin is where my weights are saved. When I run: model.num_parameters(only_trainable=True), this gives me a number very different from the number of weights that are saved in pytorch_model.bin (which I am viewing as a pandas dataframe following the steps here: How To Read Binary File In Python - Detailed Guide - Stack Vidhya). Can someone clarify why these two numbers are different? Thanks!

1 Like

Hi @CCole have you been able to find a solution yet? I’m currently trying to understand this myself.

up im also looking for the solution