salesforce / LAVIS

LAVIS - A One-stop Library for Language-Vision Intelligence

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How is `Total Params` calculated?

Wuzimeng opened this issue · comments

Hi, I noticed in the paper of BLIP-2 you provided(in Table 2.) the Total Params metric of different models, but I wonder if these values derive from specific statistics? If so, how?
Actually, I used the following code to calculate the param counts, but I got 3218346496 for BLIP-2 ViT-L FlanT5XL, a little less than 3.4B that you reported.

num = 0
for param in model.parameters():
    num += param.numel()
print(num)