Skip to main content

NNEngine

PyPI version Python Build system Bindings

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.eager decorator for zero-allocation step-by-step execution, or compile static graphs with JITCompiler for 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.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nn-engine-core 0.1.13
File Size Uploaded Provenance
nn_engine_core-0.1.13.tar.gz 55.2 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for nn-engine-core 0.1.13
File
nn_engine_core-0.1.13-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
nn_engine_core-0.1.13-cp314-cp314t-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 26.0+ ARM64 Details
nn_engine_core-0.1.13-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
nn_engine_core-0.1.13-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
nn_engine_core-0.1.13-cp314-cp314-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64 Details
nn_engine_core-0.1.13-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
nn_engine_core-0.1.13-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
nn_engine_core-0.1.13-cp313-cp313-macosx_26_0_arm64.whl CPython 3.13 CPython 3.13 macOS 26.0+ ARM64 Details
nn_engine_core-0.1.13-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
nn_engine_core-0.1.13-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
nn_engine_core-0.1.13-cp312-cp312-macosx_26_0_arm64.whl CPython 3.12 CPython 3.12 macOS 26.0+ ARM64 Details

Total release size: 57.8 MB

Release files / nn_engine_core-0.1.13.tar.gz

Download URL nn_engine_core-0.1.13.tar.gz
Size 55.2 kB
Tags Source
SHA-256 checksum
How to use checksums
50f910e440023ab9ff92cde80116922a6abd9d39cd3fb6327a92fdd0bebd14d6
BLAKE2b-256 checksum
How to use checksums
ccb3b89bcc226863651fff897557e25cc55c155bc4f4cde4d1dd5100a7c44c71
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 log

Release files / nn_engine_core-0.1.13-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL nn_engine_core-0.1.13-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
e2741e087618415cb068fa735ea2c768763db0c7fd32fa20dd5df7510879d698
BLAKE2b-256 checksum
How to use checksums
1a03fa44f8ac768ada947b72993e84756d717dff4e9cd561c0551fecf012051a
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 log

Release files / nn_engine_core-0.1.13-cp314-cp314t-macosx_26_0_arm64.whl

Download URL nn_engine_core-0.1.13-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
92e6a99d871493eea8d671e2fc2a90dbdc545ea9011e1e783a6cf81a4f9f4147
BLAKE2b-256 checksum
How to use checksums
217264a5e122c73f9077b9e359da2d02967effd00b794304ff29698d7a837459
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 log

Release files / nn_engine_core-0.1.13-cp314-cp314-win_amd64.whl

Download URL nn_engine_core-0.1.13-cp314-cp314-win_amd64.whl
Size 874.2 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
a66391d69e01c3d6295570208742c9eb5f15624529e13f8cf5c4fae8c3432c7a
BLAKE2b-256 checksum
How to use checksums
a4ce090248153d9909e68adb19e8ad2442053c48da0e75a913640efc514469c0
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 log

Release files / nn_engine_core-0.1.13-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL nn_engine_core-0.1.13-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
6bb01ce5d988beff1239c6479bd3388382353f81403011ffc2669cb5802ac503
BLAKE2b-256 checksum
How to use checksums
8b6a5881a9135da6b95b4c7e1b43797df8a4a03c1c3d4a80e9ea25ce5ba2a0a7
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 log

Release files / nn_engine_core-0.1.13-cp314-cp314-macosx_26_0_arm64.whl

Download URL nn_engine_core-0.1.13-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
d03298b303819c03ee6f00a31f0d5a055e2db40776ccd477cd2ce633f46d4f78
BLAKE2b-256 checksum
How to use checksums
3c16af5a49b4247aca5677b9899608b085decaaa7925adb6800c202f3c54dce9
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 log

Release files / nn_engine_core-0.1.13-cp313-cp313-win_amd64.whl

Download URL nn_engine_core-0.1.13-cp313-cp313-win_amd64.whl
Size 848.1 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
df7618098de7174cfe8ffe894cd470ca2f7042e68421d29d631f3674abdabf5c
BLAKE2b-256 checksum
How to use checksums
2d301135697ea40456d36f1269b5c6189e8c2b02651456b3bbdfe6c65d70648d
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 log

Release files / nn_engine_core-0.1.13-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL nn_engine_core-0.1.13-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
6562f3bcb01f7aeaa36a64750080729222c164a2f4ead14115ab0848f175226b
BLAKE2b-256 checksum
How to use checksums
c2ffafc836b0c0ab4c069f059b743b654e121c23fe0fe238684c5455ac921af1
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 log

Release files / nn_engine_core-0.1.13-cp313-cp313-macosx_26_0_arm64.whl

Download URL nn_engine_core-0.1.13-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
bfe2fdaeb5f7c79bb722a7fce4b1629bb414c5d52e36604bfc3bb8c18332d577
BLAKE2b-256 checksum
How to use checksums
392d51b9d72d6bdddc484db09c1855cf49fb02d1d9a6e26e29edbab3b633383b
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 log

Release files / nn_engine_core-0.1.13-cp312-cp312-win_amd64.whl

Download URL nn_engine_core-0.1.13-cp312-cp312-win_amd64.whl
Size 848.0 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
04d5bb47ab34b247cdeea27e748a2180b67c7c40b313fcdf7e2d1a4ba7d88fc2
BLAKE2b-256 checksum
How to use checksums
4748d78b1ac18f32c91390689df79d5bb2c2e986f82c0cf7771d991007f761b3
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 log

Release files / nn_engine_core-0.1.13-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL nn_engine_core-0.1.13-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
0c18d700bcc1e9ae942f39aef620294ba8e08cffa1c4bf7ecfe9436e613ec792
BLAKE2b-256 checksum
How to use checksums
4d85fa1ef1b1d5a157307a82d7042c2d076f986ae26d0078776aff6eec624994
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 log

Release files / nn_engine_core-0.1.13-cp312-cp312-macosx_26_0_arm64.whl

Download URL nn_engine_core-0.1.13-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
171f463b01e098eb5b06e6e49c7b4f09cbe1f9f3bd2d1592f332823184029e19
BLAKE2b-256 checksum
How to use checksums
fda0621250add1b816b9146a220621a0f9e8d03b3ee710656c08452a6d76dded
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 log

Security for nn-engine-core 0.1.13

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.

Select from 12 files

Attestation for nn_engine_core-0.1.13.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 log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page