Skip to content

Neurovortex Wiki

Boring Dude edited this page Apr 13, 2025 · 1 revision

1. Home

Welcome to NeuroVortex

a5c9b2fe-4dd7-458d-a537-c918fb53e2ac_182335713

Welcome to the NeuroVortex Github Wiki! NeuroVortex is an AI Optimizer module designed to enhance the performance of AI models and workloads. It provides tools for model optimization, resource monitoring, and efficient workload management.

Explore the documentation to learn how to get started, use the features, and contribute to the project.


2. Getting Started

Installation

To install NeuroVortex, use the following command:

pip install neurovortex

Requirements

  • Python 3.8 or higher
  • Dependencies:
    • torch
    • onnx
    • tensorflow
    • psutil
    • gputil

Setup

Clone the repo:

git clone https://github.com/Boring-Dude/neurovortex.git
cd neurovortex

install dependencies:

pip install -r requirements.txt
(Side-note: They will probably be pre-installed Because i have already pushed it to pypi)

3. Features:

Core Features


  • Model Optimization

    • Dynamic Quantization
    • Pruning
    • Knowledge Distillation
    • Mixed-Precision Training
  • Resource Monitoring

    • CPU, GPU, Memory, Disk usage tracking.
  • Workload Optimization

    • Efficient batching and workload management
  • Model Loading and saving

    • Supports Pytorch, Tensorflow, ONNX, and Tensorflow Lite formats (for now)

Supported Formats

  • Pytorch (.pth, .pt)
  • TensorFlow (.pb, .ckpt, .h5
  • ONNX (.onnx)
  • TensorFlow Lite (.tflite)

4. Usage

Basic Example

from neurovortex import AIOptimizer, load_model, RescourceManager

# Load a Model
model = load_model("model.pth")

# Initialize optimizer
optimizer = AIOptimizer(model)

# Optimize the model
optimized_model = optimizer.optimize_model()

# Monitor Resources
cpu_usage = ResourceManager.get_cpu_usage()
print(f"CPU Usage: {cpu_usage:.2f}%")

Advanced Example

from neurovortex import AIOptimizer, ResourceManager

# Example model and data
import torch
from torch import nn
model = nn.Sequential(nn.Linear(128, 64), nn.ReLU(), nn.Linear(64, 10)
data = torch.randn(1000, 128)

# Initialize optimizer
optimizer = AIOptimizer(model)

# Optimize Workload
batched_data = optimizer.optimize_workload(data, batch_size=64)

# Apply mixed-precision training
criterion = nn.CrossEntropyLoss()
optimizer_instance = torch.optim.Adam(model.parameters(), lr=0.001)
trained_model = optimizer.apply_mixed_precision_training(
    model, batched_data, optimizer_instantce, criterion
)
print(f"CPU Usage: {cpu_usage:.2f}%")

5. Contributing

How to Contribute

I Welcome contributions! Follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch:
git checkout -b feature-name
  1. Make Your Changes and commit them:
git commit -m "Add feature-name"
  1. Push to your fork:
git push origin feature-name
  1. Open a pull request.

Code Style

  • Follow PEP 8 for Python code.
  • Use flake8 to lint your code:
flask8 neurovortex

Testing

Run tests using pytest:

pytest

6. FAQ

What is NeuroVortex?

Neurovortex is a Python moduke for optimizing ai models and managing system resources.

(for now)

Which AI framework does Neurovortex support?

for now, it supports tensorflow lite, tensorflow, Pytorch and ONNX

How do i report a bug?

Open an issue on the Github issues page

7. License

Neurovortex is licensed under the MIT License. See the License file for more details.