A minimalistic and high-performance Machine Learning library based on NumPy
Project description
🌌 Sorix
Sorix is a high-performance, minimalist deep learning library built on top of NumPy/CuPy. Designed for research and production environments where efficiency and a clean API matter. If you know PyTorch, you already know how to use Sorix.
🚀 Key Features
- ⚡ High Performance: Run optimized neural networks on NumPy (CPU) or CuPy (GPU).
- 🧩 PyTorch-like API: Familiar and expressive syntax for a near-zero learning curve.
- 🍃 Lightweight: Minimal dependencies, ideal for resource-constrained environments.
- 🛠️ Production Ready: Straight path from prototype to real-world deployment.
- 📈 Autograd Engine: Simple yet powerful automatic differentiation.
📦 Installation
Choose your preferred package manager:
Using pip:
pip install sorix
Using uv:
uv add sorix
Using Poetry:
poetry add sorix
Note for GPU support: Install the CuPy extra using
pip install "sorix[cp13]"(Requires CuPy v13 and CUDA).
⚡ Sorix in 30 Seconds
Building and training a model is intuitive. Here is a complete training loop:
import numpy as np
from sorix import tensor
from sorix.nn import Linear, MSELoss
from sorix.optim import SGD
# 1. Prepare data (y = 3x + 2)
X = np.linspace(-1, 1, 100).reshape(-1, 1)
y = 3 * X + 2 + 0.1 * np.random.randn(*X.shape)
X_t, y_t = tensor(X), tensor(y)
# 2. Define model, loss, and optimizer
model = Linear(1, 1) # Simple y = Wx + b
criterion = MSELoss()
optimizer = SGD(model.parameters(), lr=0.1)
# 3. Training loop
for epoch in range(100):
y_pred = model(X_t)
loss = criterion(y_pred, y_t)
optimizer.zero_grad()
loss.backward()
optimizer.step()
if (epoch + 1) % 20 == 0:
print(f"Epoch {epoch+1}, Loss: {loss.item():.4f}")
# Learned: y = 3.00x + 2.00
print(f"Learned: y = {model.W.item():.2f}x + {model.b.item():.2f}")
📖 Learn & Examples
Learn Sorix through interactive notebooks. Open them directly in Google Colab:
| Topic | Documentation | Colab |
|---|---|---|
| Tensor Basics | Tensors Guide | |
| Autograd Engine | Autograd Guide | |
| Linear Regression | Regression Guide | |
| MNIST Classification | MNIST Guide |
🛠️ Roadmap
- Core Autograd Engine (NumPy/CuPy backends)
- Basic Layers: Linear, ReLU, Sigmoid, Tanh, BatchNorm1D
- Optimizers: SGD, Adam, RMSprop
- GPU Acceleration via CuPy
- Sequential API (Coming soon)
- Convolutional Layers (Conv2d, MaxPool2d)
- Dropout & Regularization
- Advanced Initializations (Kaiming, Orthogonal)
🤝 Contribution
We appreciate any contribution from the community!
- Report Bugs: Open an Issue.
- Add Features: Submit a Pull Request.
- Improve Docs: Help us make the documentation better.
- Write Tests: Improve our code coverage.
📌 Links
- Documentation: mitchell-mirano.github.io/sorix
- PyPI Package: sorix
- Samples: examples/ folder
Made with ❤️ for the AI Community
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
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 sorix-1.0.5.tar.gz.
File metadata
- Download URL: sorix-1.0.5.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc8429f80201b97950dba8d40d6d89236710ada48367a36c0cebcf17eb5cb4e2
|
|
| MD5 |
8904c65b111c53455d03a5fe701e0110
|
|
| BLAKE2b-256 |
d48c65115dfc71ac6f3c73ab92c371a336d4014e30300d28f476b5804f8a621a
|
Provenance
The following attestation bundles were made for sorix-1.0.5.tar.gz:
Publisher:
pypi_publish.yml on Mitchell-Mirano/sorix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sorix-1.0.5.tar.gz -
Subject digest:
fc8429f80201b97950dba8d40d6d89236710ada48367a36c0cebcf17eb5cb4e2 - Sigstore transparency entry: 1005116585
- Sigstore integration time:
-
Permalink:
Mitchell-Mirano/sorix@88ff958f0b2eaa21389b2e647ed7b97f89149405 -
Branch / Tag:
refs/tags/v1.0.5 - Owner: https://github.com/Mitchell-Mirano
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_publish.yml@88ff958f0b2eaa21389b2e647ed7b97f89149405 -
Trigger Event:
release
-
Statement type:
File details
Details for the file sorix-1.0.5-py3-none-any.whl.
File metadata
- Download URL: sorix-1.0.5-py3-none-any.whl
- Upload date:
- Size: 33.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e14a2d28447469013972890890e6cffaed7b2fb9be70c400e8c048d6506d91f3
|
|
| MD5 |
191006b35653849fb971cb7c019621e3
|
|
| BLAKE2b-256 |
579257b4872e224abe4fd132eda700c24c025a02391574f15cecb60ce6e9a9b0
|
Provenance
The following attestation bundles were made for sorix-1.0.5-py3-none-any.whl:
Publisher:
pypi_publish.yml on Mitchell-Mirano/sorix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sorix-1.0.5-py3-none-any.whl -
Subject digest:
e14a2d28447469013972890890e6cffaed7b2fb9be70c400e8c048d6506d91f3 - Sigstore transparency entry: 1005116587
- Sigstore integration time:
-
Permalink:
Mitchell-Mirano/sorix@88ff958f0b2eaa21389b2e647ed7b97f89149405 -
Branch / Tag:
refs/tags/v1.0.5 - Owner: https://github.com/Mitchell-Mirano
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_publish.yml@88ff958f0b2eaa21389b2e647ed7b97f89149405 -
Trigger Event:
release
-
Statement type: