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)

39
/ 100
Emerging

This tool helps machine learning engineers and researchers analyze the computational cost of their neural network models. You provide a PyTorch model, and it calculates the FLOPs (floating-point operations), MACs (multiply-add operations), and the total number of parameters. This output helps you understand the model's efficiency and identify performance bottlenecks in different submodules.

927 stars. No commits in the last 6 months.

Use this if you need to quickly assess the computational demands and parameter count of your PyTorch-based neural networks, especially large language models from Hugging Face.

Not ideal if you are working with models not implemented in PyTorch or if you need dynamic profiling of actual runtime performance on specific hardware.

deep-learning neural-network-optimization large-language-models model-profiling computational-cost-analysis
Stale 6m No Package No Dependents
Maintenance 0 / 25
Adoption 10 / 25
Maturity 16 / 25
Community 13 / 25

How are scores calculated?

Stars

927

Forks

40

Language

Python

License

MIT

Last pushed

Jun 27, 2024

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/transformers/MrYxJ/calculate-flops.pytorch"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.