Skip to main content

Advanced lightweight model profiler for deep learning frameworks

Project description

Memoraith Logo

Memoraith

PyPI version License: MIT Python 3.7+ Documentation Status

Advanced Lightweight Model Profiler for Deep Learning

Overview

Memoraith is a cutting-edge, lightweight model profiler for deep learning frameworks, providing unparalleled insights into neural network performance. Developed with precision and efficiency in mind, it helps developers and researchers optimize their models through detailed performance analysis.

✨ Key Features

  • 🔍 Advanced Profiling

    • High-precision memory tracking (CPU & GPU)
    • Microsecond-accurate computation timing
    • Layer-by-layer performance analysis
  • 🎯 Intelligent Analysis

    • Sophisticated bottleneck detection
    • Anomaly identification
    • Optimization recommendations
  • 📊 Rich Visualization

    • Interactive dashboards
    • Real-time monitoring
    • Comprehensive reports
  • 🛠 Framework Support

    • PyTorch integration
    • TensorFlow support
    • Extensible architecture

🚀 Installation

Basic installation:

pip install memoraith

Full installation with GPU support and extra features:

pip install memoraith[full]

🎮 Quick Start

Here's a simple example using PyTorch:

from memoraith import profile_model, set_output_path
import torch
import torch.nn as nn

# Set output directory for profiling results
set_output_path('profiling_results/')

# Define your model
class AdvancedNet(nn.Module):
    def __init__(self):
        super(AdvancedNet, self).__init__()
        self.conv1 = nn.Conv2d(3, 64, kernel_size=3, padding=1)
        self.conv2 = nn.Conv2d(64, 128, kernel_size=3, padding=1)
        self.fc = nn.Linear(128 * 8 * 8, 10)

    def forward(self, x):
        x = torch.relu(self.conv1(x))
        x = torch.relu(self.conv2(x))
        x = x.view(x.size(0), -1)
        return self.fc(x)

# Add profiling decorator
@profile_model(memory=True, computation=True, gpu=True)
def train_model(model):
    optimizer = torch.optim.Adam(model.parameters())
    for _ in range(100):
        input_data = torch.randn(32, 3, 32, 32)
        output = model(input_data)
        loss = output.sum()
        loss.backward()
        optimizer.step()

if __name__ == "__main__":
    model = AdvancedNet()
    train_model(model)

📚 Documentation

Visit our comprehensive documentation for:

  • Detailed API reference
  • Advanced usage examples
  • Best practices
  • Troubleshooting guides

🤝 Contributing

We welcome contributions! See our Contributing Guide for:

  • Code of conduct
  • Development setup
  • Submission guidelines
  • Testing procedures

📝 License

Memoraith is released under the MIT License. See LICENSE file for details.

🆘 Support

Need help?

📖 Citation

If you use Memoraith in your research, please cite:

@software{memoraith,
    author = {El Jouhfi, Mehdi},
    title = {Memoraith: Advanced Lightweight Model Profiler for Deep Learning},
    year = {2024},
    url = {https://github.com/mehdi342/Memoraith},
    version = {0.5.0}
}

📬 Contact

For inquiries, reach out to Mehdi El Jouhfi


Made with ❤️ and sweat by Mehdi El Jouhfi

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memoraith-0.4.0.tar.gz (43.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

memoraith-0.4.0-py3-none-any.whl (53.3 kB view details)

Uploaded Python 3

File details

Details for the file memoraith-0.4.0.tar.gz.

File metadata

  • Download URL: memoraith-0.4.0.tar.gz
  • Upload date:
  • Size: 43.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for memoraith-0.4.0.tar.gz
Algorithm Hash digest
SHA256 727251c3895dfb5706f4e2a49f424aa30df312c5a612937ce4375de215d8dfd4
MD5 b79d34e03384c9bd29d63789f0b1ce4d
BLAKE2b-256 eb2a1ed7e43d24772a511b9f21c1497087a8586229eafd2c1cb9065461379fb9

See more details on using hashes here.

File details

Details for the file memoraith-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: memoraith-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 53.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for memoraith-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10662f9e174b620b3e41b7c474ec17b80197fc345c14052635200569f90d606f
MD5 2df8f9a6e373ec55063d70426d130751
BLAKE2b-256 e63ca2a26020dfaff1993700796d269f3de68bc40b502328c3cb144f77e7bb41

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page