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
583 stars 21 forks source link

flops percent wrong #24

Closed Lix1993 closed 5 months ago

Lix1993 commented 5 months 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 5 months 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