salesforce / CodeT5

Home of CodeT5: Open Code LLMs for Code Understanding and Generation
https://arxiv.org/abs/2305.07922
BSD 3-Clause "New" or "Revised" License
2.68k stars 394 forks source link

What does the get_model_size() function mean? #65

Closed leemgs closed 1 year ago

leemgs commented 1 year ago

I thought that the execution result of get_model_size() was the amount of memory required for the model to be loaded into memory. The current execution result of the get_model_siz() function was just like model.num_parameters().

So I wonder what the meaning and intent of the get_model_size() function are. Do you want to print the number of parameters? Or, do you want to print the size of the model loaded into memory?

yuewang-cuhk commented 1 year ago

Hi, it is the same as model.num_parameters().