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)
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.
Stars
927
Forks
40
Language
Python
License
MIT
Category
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.
Higher-rated alternatives
vllm-project/vllm
A high-throughput and memory-efficient inference and serving engine for LLMs
sgl-project/sglang
SGLang is a high-performance serving framework for large language models and multimodal models.
alibaba/MNN
MNN: A blazing-fast, lightweight inference engine battle-tested by Alibaba, powering...
xorbitsai/inference
Swap GPT for any LLM by changing a single line of code. Xinference lets you run open-source,...
tensorzero/tensorzero
TensorZero is an open-source stack for industrial-grade LLM applications. It unifies an LLM...