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

Can we print a model summary of CodeT5 model? #61

Closed leemgs closed 1 year ago

leemgs commented 2 years ago

I want to know how to print a model summary of CodeT5-base model that are archived at the huggingface webpage.

We could print the model summary with the torchinfo and torchsummary modules as follows in the case of AlextNet. In the case of CodeT5-base model, How can we print the model summary?

autoencoder = litauto_encoder() traine = pylig.Trainer() traine.fit(autoencoder, DataLoader(trained), DataLoader(valid)) summary(litauto_encoder,(1,28,28))

yuewang-cuhk commented 1 year ago

Hi, we did not experiment with torchsummary. To know more details of CodeT5 model, you can directly print the model and get the model size using this function.

leemgs commented 1 year ago

Hi, we did not experiment with torchsummary. To know more details of CodeT5 model, you can directly print the model and get the model size using this function.

Thanks. 👍