Towards Net-Zero AI: Reducing Latency and Energy Consumption with Eco-Transformers
Project description
EcoTransformers
Sustainable LLM Inference
EcoTransformers is a Python library designed for efficient and sustainable Large Language Model (LLM) inference. It helps developers to reduce inference time, energy consumption, and CO₂ emissions — through lightweight, built-in optimizations.
Key Features:
◦ Optimized inference for Hugging Face transformer models
◦ Primat Technique — a unified optimization method that intelligently reduces redundant computations, skips negligible activations, and applies smart caching
◦ Accelerates inference and lowers the environmental cost of LLM experiments without compromising performance.
Installation:
Install directly from PyPI:
pip install ecotransformers
Usage Examples:
-
Command-line Interface python -m ecotransformers.main
--model ""
--prompt "What are the benefits of sustainable AI?"
--reference "Sustainable AI reduces energy usage and CO₂ emissions." -
Python API
from ecotransformers.main import transformer results = transformer( model_name="" ) print(results)
PRIMAT(Pruning-Integrated Masked Activation for Transformers) Technique:
◦ The Primat Technique is the optimization engine behind EcoTransformers. ◦ PRIMAT uses adaptive pruning and activation masking for effective execution while maintaining model accuracy. ◦ The Primat Technique is applied automatically — no manual configuration required.
License: This project is licensed under the MIT License — see the LICENSE file for details.
Citation:
If you use EcoTransformers in your research, please cite:
@software{ecotransformers2025, author = {"Shriaarthy E","Sangeetha S"}, title = {Towards Net-Zero AI: Reducing Latency and Energy Consumption with Eco-Transformers}, year = {2025}, url = {https://pypi.org/project/ecotransformers/}, license = {MIT} }
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ecotransformers-1.0.0.tar.gz.
File metadata
- Download URL: ecotransformers-1.0.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
def5cb731614e24bce021a9d5786d2530378fa03c388f1d008e4fd4206240a72
|
|
| MD5 |
453e6f930e341ae68670b157e5119ac1
|
|
| BLAKE2b-256 |
12985c83e317aec3a1600b3211e35d8e0ee3c6ca8185894e11508e8dd18b22d8
|
File details
Details for the file ecotransformers-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ecotransformers-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6b20d6f1b7965e5ed89adade5d1c261f482c84c510fb5820196dbc499d73895
|
|
| MD5 |
db01d10de88d6e0f9b5fd4b187573a8d
|
|
| BLAKE2b-256 |
60c8e58d0201a165cb4e71b7174e4ad804a0628309b8e73a0883c3407678e69a
|