MrYxJ / calculate-flops.pytorch

The calflops is designed to calculate FLOPs、MACs and Parameters in all various neural networks, such as Linear、 CNN、 RNN、 GCN、Transformer(Bert、LlaMA etc Large Language Model)
https://pypi.org/project/calflops/
MIT License
392 stars 14 forks source link

flops percent wrong #24

Closed Lix1993 closed 1 month ago

Lix1993 commented 1 month ago

lamaForCausalLM( 8.03 B = 100% Params, 30.74 TMACs = 100% MACs, 61.48 TFLOPS = 50% FLOPs

should be 100%,but result is 50%

MrYxJ commented 1 month ago

Indeed, this is a print bug that has been fixed in the new version in https://pypi.org/project/calflops/, 0.3.1, you can upgrade this package to get the latest version, Thank you for pointing out the error.

pip install calflops==0.3.1