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

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.10
File Size Uploaded Provenance
nn_engine_core-0.1.10.tar.gz 54.5 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for nn-engine-core 0.1.10
File
nn_engine_core-0.1.10-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
nn_engine_core-0.1.10-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.10-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
nn_engine_core-0.1.10-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
nn_engine_core-0.1.10-cp314-cp314-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64 Details
nn_engine_core-0.1.10-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
nn_engine_core-0.1.10-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
nn_engine_core-0.1.10-cp313-cp313-macosx_26_0_arm64.whl CPython 3.13 CPython 3.13 macOS 26.0+ ARM64 Details
nn_engine_core-0.1.10-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
nn_engine_core-0.1.10-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
nn_engine_core-0.1.10-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.10.tar.gz

Download URL nn_engine_core-0.1.10.tar.gz
Size 54.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e8e5e56235a76e25dc024065c1a4404b512b39e7084a6a4b4b7a71f7ed420133
BLAKE2b-256 checksum
How to use checksums
64bc664a660433a251628ae5bd3f7150285a08a739930e27728773af16c20d69
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 1, 2026.

Transparency log

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

Download URL nn_engine_core-0.1.10-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
5a415e1a71ad49e344a9da32453eee0709c504dea1fb193103a625d4a1e9d08e
BLAKE2b-256 checksum
How to use checksums
f1c3e2d30b9f37fe777dc54db9ca7b3e83cc48ffa2dcec631655c70115ff6edc
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 1, 2026.

Transparency log

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

Download URL nn_engine_core-0.1.10-cp314-cp314t-macosx_26_0_arm64.whl
Size 542.6 kB
Tags CPython 3.14 CPython 3.14 free-threading macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
be26b7e3d8f1663959f31b25e729b3e8a7ed6048463e3b3092931cc476d4ca87
BLAKE2b-256 checksum
How to use checksums
8b9b69dd948efe5f6f4031c19046771d04cfd21224970163727c1507c3594b7e
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 1, 2026.

Transparency log

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

Download URL nn_engine_core-0.1.10-cp314-cp314-win_amd64.whl
Size 874.4 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
f9eb5792d252adfd0e4afa95eb6d7e8c576b6f415e42725ea63f457acc7923f2
BLAKE2b-256 checksum
How to use checksums
42fff5e1355f97d592bac0b40fed25decc456605d0ecb779af94221fa9823d74
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 1, 2026.

Transparency log

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

Download URL nn_engine_core-0.1.10-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
e2a2a17e3c668bcb3334dbbd566a0d9dc6610bd76ef8e8bb8ab7a0512b8372e3
BLAKE2b-256 checksum
How to use checksums
cf5e16ea048e8bebada009a76702573f75558b611f13a399b2f9fe45787d41a0
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 1, 2026.

Transparency log

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

Download URL nn_engine_core-0.1.10-cp314-cp314-macosx_26_0_arm64.whl
Size 527.2 kB
Tags CPython 3.14 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
99487e0ab233c79589ee7be40daa7fcaea1fee56981ce27592cc8d3bb9d683e4
BLAKE2b-256 checksum
How to use checksums
b86115137d58ac5b9b27d493338fb33be0326484af531166b26939386426c980
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 1, 2026.

Transparency log

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

Download URL nn_engine_core-0.1.10-cp313-cp313-win_amd64.whl
Size 848.1 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
d822f386032c52afd9ec9f07242b6e641a35e91d37bd3ee566bae3df4c89bfab
BLAKE2b-256 checksum
How to use checksums
38d9a981858ae8710e56bd89a7f9306c605e5a8abb969504a40d6ddb028051f2
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 1, 2026.

Transparency log

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

Download URL nn_engine_core-0.1.10-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
97dac39d28fe775b82d95621b01630e643a022b305b40021fe7382092f3de75a
BLAKE2b-256 checksum
How to use checksums
b0a320a22b7a26879adc7f879c4cc888cbb5a802592f97eb9a8d4acac8fb9a4c
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 1, 2026.

Transparency log

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

Download URL nn_engine_core-0.1.10-cp313-cp313-macosx_26_0_arm64.whl
Size 526.4 kB
Tags CPython 3.13 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
086ebaab7e745130d6d7611be04ff775ae5d7c0f28f3f53b71029861884b98e3
BLAKE2b-256 checksum
How to use checksums
c390be79fafb1567ad6f827bee8ffa6ed53ba8638d929c596aa210190d8a0682
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 1, 2026.

Transparency log

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

Download URL nn_engine_core-0.1.10-cp312-cp312-win_amd64.whl
Size 848.1 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
f746cfaaaa16dadbacf9d955c6abd3ba193572b1f4ab5a2876dda829883be8bf
BLAKE2b-256 checksum
How to use checksums
489a296307557e1bb2f99624c0c449cee747185a36cae488a503ae0dfcbd0ed7
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 1, 2026.

Transparency log

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

Download URL nn_engine_core-0.1.10-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
6eaba0e548e60911df880499e1c849753ae77eb91e10c9a0758adc45fd1a7088
BLAKE2b-256 checksum
How to use checksums
79783367f729f8c93399f9e60c0b8452a8a3f0ba6c96344e0a681366be415b04
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 1, 2026.

Transparency log

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

Download URL nn_engine_core-0.1.10-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
0a9f9089981cc11e5208c6f3fe5e1f26e6ab76409c7fcb7db379600a1af911cd
BLAKE2b-256 checksum
How to use checksums
b1e7d41f9dbc3b6ebfe4d2b141c2a4884449561f5765cd34bc03b0786e2d7ac4
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 1, 2026.

Transparency log

Security for nn-engine-core 0.1.10

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.10.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 1, 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