NNEngine
A high-performance, fully native C++ Neural Network engine exposed to Python via pybind11.
Designed for rapid experimentation without the Python Global Interpreter Lock (GIL) overhead, nn-engine-core executes the entire deep learning training loop strictly in native C++ using Eigen. It utilizes a zero-allocation flat-memory Autograd graph, AVX SIMD vectorization, and dynamically compiled OpenBLAS to achieve massive speedups over mainstream Python frameworks.
Highlights
- Dual Execution Modes: Train dynamic graphs using the
@nne.eagerdecorator for zero-allocation step-by-step execution, or compile static graphs withJITCompilerfor maximum throughput. - Dynamic Hardware Dispatch: Automatically detects your CPU at runtime to dispatch highly optimized AVX2 or AVX-512 instructions.
- CNN & Modern Layer Support: Built-in support for
Conv2dLayer,MaxPool2dLayer,AvgPool2dLayer,FlattenLayer,BatchNorm1dLayer,DropoutLayer, and Leaky ReLUs. - Zero-Allocation Autograd: Uses arena allocation (
Tape) and flat contiguous memory structs to dynamically build computational graphs without heap allocations.
Installation
Install the released wheel from PyPI:
pip install nn-engine-core
Quick Start: Building a CNN
import numpy as np
import nnengine as nne
X_train = np.random.rand(100, 1, 64, 64).astype(np.float32)
y_train = np.eye(40, dtype=np.float32)[np.random.choice(40, 100)]
class NNEngineDeepCNN(nne.Module):
def __init__(self, in_h, in_w, num_classes):
super().__init__()
self.conv1 = nne.Conv2dLayer(1, 16, in_h, in_w, kernel_size=5, stride=1, pad=2)
self.act1 = nne.LeakyReLULayer(0.01)
self.pool1 = nne.MaxPool2dLayer(16, in_h, in_w, kernel_size=2, stride=2, pad=0)
out_h1, out_w1 = in_h // 2, in_w // 2
self.conv2 = nne.Conv2dLayer(16, 32, out_h1, out_w1, kernel_size=3, stride=1, pad=1)
self.act2 = nne.LeakyReLULayer(0.01)
self.pool2 = nne.MaxPool2dLayer(32, out_h1, out_w1, kernel_size=2, stride=2, pad=0)
out_h2, out_w2 = out_h1 // 2, out_w1 // 2
self.flatten = nne.FlattenLayer()
self.fc = nne.DenseLayer(32 * out_h2 * out_w2, num_classes)
def forward(self, x):
x = self.pool1(self.act1(self.conv1(x)))
x = self.pool2(self.act2(self.conv2(x)))
x = self.flatten(x)
return self.fc(x)
model = NNEngineDeepCNN(64, 64, 40)
optimizer = nne.Adam(learning_rate=0.001)
optimizer.set_parameters(model.parameters())
loss_fn = nne.SoftmaxCrossEntropyLoss()
trainer = nne.JITCompiler(model, optimizer, loss_fn)
dataloader = nne.DataLoader(X_train, y_train, batch_size=32, shuffle=True, drop_last=True)
trainer.fit(dataloader, epochs=40, verbose=False)
trainer.save_checkpoint("faces_model")
Latest Benchmark Results
| Benchmark Task | Scikit-Learn | PyTorch (ATen) | NNEngine (Eager) | NNEngine (C++ JIT) | Max Speedup (vs PyTorch) |
|---|---|---|---|---|---|
| Deep Regression (Housing) | MSE: 0.2811 Time: 4.94s |
MSE: 0.2720 Time: 13.32s |
MSE: 0.2662 Time: 2.47s |
MSE: 0.2669 Time: 4.02s |
5.39x |
| Deep CNN (Faces) | N/A | Acc: 98.75% Time: 15.19s |
Acc: 98.75% Time: 12.17s |
Acc: 98.75% Time: 11.22s |
1.35x |
Metadata
Release files for nn-engine-core 0.1.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| nn_engine_core-0.1.14.tar.gz | 55.2 kB | With provenance | Details |
Built distributions (wheels)
Total release size: 57.8 MB
Release files / nn_engine_core-0.1.14.tar.gz
| Download URL | nn_engine_core-0.1.14.tar.gz |
|---|---|
| Size | 55.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0a019a75c7b6ca2be00ea5ecaa87fd87faed432f2a0085edbacf26b449ba43f6
|
|
BLAKE2b-256 checksum How to use checksums |
e1316488a1b950cdfac4417b7946bd0606a91f7352b84a825654dbb1006d24fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / nn_engine_core-0.1.14-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | nn_engine_core-0.1.14-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 13.2 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
a6106737f50c2f4e18d0c6057a75ffcaa31fc94e79338b29ce83380e6a1d1c3a
|
|
BLAKE2b-256 checksum How to use checksums |
f03ac65bc39b69462d796a5cfd6be1dc25da43ecdd1bfec7cbf7ab9e6f30fc82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / nn_engine_core-0.1.14-cp314-cp314t-macosx_26_0_arm64.whl
| Download URL | nn_engine_core-0.1.14-cp314-cp314t-macosx_26_0_arm64.whl |
|---|---|
| Size | 542.5 kB |
| Tags | CPython 3.14 CPython 3.14 free-threading macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
eb04407463b47c902d337a340b9ad4819a13d7a4264bf9863e7135b4b4900431
|
|
BLAKE2b-256 checksum How to use checksums |
e07848059d6a6acfcb11a0821d9c0b00b9e311fb83b0349421deceda9f7c304c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / nn_engine_core-0.1.14-cp314-cp314-win_amd64.whl
| Download URL | nn_engine_core-0.1.14-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 874.2 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3ada6f3a2e585c38898163c55f0328b81c92ee7ccc6c0c4a56b95b281a234687
|
|
BLAKE2b-256 checksum How to use checksums |
f08cd4484d206cc1a78066065956596ba54ac04250dead880642b8432c4d2af7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / nn_engine_core-0.1.14-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | nn_engine_core-0.1.14-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 13.3 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
017775185b8e1ceaebaa2d63e5ac885c1ba046af323a5ee4a28d2633269b5921
|
|
BLAKE2b-256 checksum How to use checksums |
887fb59b055f2ab90d65ec1e20fba3babc728a4074ce1adf3b8fb6984463f584
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / nn_engine_core-0.1.14-cp314-cp314-macosx_26_0_arm64.whl
| Download URL | nn_engine_core-0.1.14-cp314-cp314-macosx_26_0_arm64.whl |
|---|---|
| Size | 527.1 kB |
| Tags | CPython 3.14 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9511533eea767680399c57f77c5ff7671e06c7107e8cf521f186ef46cefe80ff
|
|
BLAKE2b-256 checksum How to use checksums |
1ed3f235ee9a92ac2028a643ffa15031285b9456e65f705dda65195baa64818a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / nn_engine_core-0.1.14-cp313-cp313-win_amd64.whl
| Download URL | nn_engine_core-0.1.14-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 848.1 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
472004f160475b1ccfcfcfe376c626fd8dcdb2e6014a53f17911c54ab0afa4c0
|
|
BLAKE2b-256 checksum How to use checksums |
cb5dcd6f9c4bc27150becb968393662f3936da1b4949caa970484a0ae7ab4e2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / nn_engine_core-0.1.14-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | nn_engine_core-0.1.14-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 13.3 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
4547afb84bca58877f6a5e49d65e45ed99d95fcf9dcfcdeac25071989f1b8035
|
|
BLAKE2b-256 checksum How to use checksums |
89e8e975d7f918ff1f3c3fbe2a148cf2654f0b0a2ff9726463e985e7212a9699
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / nn_engine_core-0.1.14-cp313-cp313-macosx_26_0_arm64.whl
| Download URL | nn_engine_core-0.1.14-cp313-cp313-macosx_26_0_arm64.whl |
|---|---|
| Size | 526.3 kB |
| Tags | CPython 3.13 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6d47bdc6a7c79c1420964e5c7ed06ae8601154e8f6d64d4e63c540c4279c8af1
|
|
BLAKE2b-256 checksum How to use checksums |
231619d02ad374091714783384969f7c37505bbdaf704503b2ceef022a2c788a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / nn_engine_core-0.1.14-cp312-cp312-win_amd64.whl
| Download URL | nn_engine_core-0.1.14-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 848.0 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
fe60bc73b0d5c221241f56e0511c536c6896a509248dc318ba04a17431958296
|
|
BLAKE2b-256 checksum How to use checksums |
aa4cd5f63c371ccef33f18d983336080e3fb939470023d2123304ba17bba647f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / nn_engine_core-0.1.14-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | nn_engine_core-0.1.14-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 13.3 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
74994b4d27d72fec8bc2a7c0ef4875a9ede214d1ef1e439d7a9acf1244dcb83e
|
|
BLAKE2b-256 checksum How to use checksums |
b52b094f7b02191585f6980d05391c29a7e64dfbc5868b37c831dee089c64d92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / nn_engine_core-0.1.14-cp312-cp312-macosx_26_0_arm64.whl
| Download URL | nn_engine_core-0.1.14-cp312-cp312-macosx_26_0_arm64.whl |
|---|---|
| Size | 526.4 kB |
| Tags | CPython 3.12 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
091b49404015f6479dfe3db8182a5dbd20fce77a77da3f747feab085d6b3d2d2
|
|
BLAKE2b-256 checksum How to use checksums |
2765d9976defbbf3ae6a01c90a045bf9ec68487492d150434f6fc27b532dbcc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logSecurity for nn-engine-core 0.1.14
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 12 files in this release have been uploaded with provenance metadata.
Attestation for nn_engine_core-0.1.14.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.