Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 3.0.3 instead.

⚡ NNI Labs — nni-sdk (The Neural-Native Interconnect)

PyPI Python License

Stop shipping tensors over 1990s web protocols.

The internet was built for humans reading web pages—not for AI models thinking together. When models, local SLMs, and edge NPUs communicate over HTTP/JSON, they pay a massive serialization and TCP tax on every hop.

nni-sdk by NNI Labs replaces that with a 64-byte cache-line-aligned network layer—where models discover each other by capability instead of IP addresses, pass raw latent states instead of JSON text, and link across shared RAM, LAN, and encrypted global relays.

🌐 Website & Wire Spec: https://nnilabs.pages.dev
✉️ Contact / OEM: nnilabs.hq@gmail.com


📊 Verified Telemetry Benchmark (128-Float Tensor Round-Trip)

Deployment Tier Traditional HTTP/JSON nni-sdk Runtime Result
Same Machine (Shared Memory L3) 3,263 µs 32.9 µs (0.03 ms) ~99x faster (mmap Seqlock)
Local Network (Direct 0-RTT UDP) 3,263 µs 136.4 µs (0.13 ms) ~24x faster (P2P UDP)
Global WAN (India ↔ Sweden) ~570.0 ms (est. w/ TLS) 385.4 ms Speed-of-Light Floor
Local Wire Size (Round-Trip) ~1,432 Bytes 128 Bytes 91.1% less data
WAN Egress Size (Round-Trip) ~1,832 Bytes (w/ TLS) 200 Bytes 89.1% less cloud egress
Encryption & Memory Proxy TLS / JSON heap alloc E2E AEAD / Zero alloc Relays stay blind

🚀 Quickstart (Copy & Run)

pip install nni-sdk

Zero dependencies. Works on Python 3.11+ (Linux x86_64 / aarch64, macOS Apple Silicon, Windows x64), with zero-copy NumPy and PyTorch support via __array_interface__.

1. Direct P2P UDP (Local / LAN — 128 Bytes Round-Trip)

import threading
import time
import nni_sdk as nni

def run_node():
    node = nni.Node(port=19150)
    node.serve("vision", lambda tensor: [x * 2.0 for x in tensor])

threading.Thread(target=run_node, daemon=True).start()
time.sleep(0.3)

client = nni.Client()
client.connect_direct("vision", "127.0.0.1:19150")

query = nni.zeros(128)
query[0] = 42.0
result = client.send("vision", query)
print("Output:", result[0])  # 84.0

2. Shared Memory on Same Machine (L3 Cache — ~32.9 µs, 0 Wire Bytes)

import threading
import time
import nni_sdk as nni

def run_shm():
    node = nni.Node(19999)
    node.serve_shm("nni_vision_shm", lambda t: [x * 2.0 for x in t])

threading.Thread(target=run_shm, daemon=True).start()
time.sleep(0.3)

client = nni.Client()
result = client.send_shm("nni_vision_shm", nni.from_list([42.0] * 128))
print("Output:", result[0])  # 84.0

3. Global Encrypted Mesh (Across NATs — 200 Bytes Round-Trip)

import nni_sdk as nni

RELAY = "13.62.157.43:19200"  # Hosted backbone or self-hosted `nni relay`

# On your remote host (behind any NAT):
# node = nni.Node(port=19100, relay=RELAY)
# node.serve(0x01B2, lambda t: [x * 2.0 for x in t])

# From anywhere on Earth:
client = nni.Client.connect_mesh(RELAY)
result = client.send(0x01B2, [1.25] * 128)
print("Output:", result[0])

🧬 How the Network Works

  • Fixed 64-Byte Frames: Every packet fits a single CPU cache line (16B 128-bit sparsity mask, 4B scale, 4B target ID, 4B flags, 4B sequence ID, 32B payload supporting Top-8 exact FP32, 32× INT8, or 64× INT4, plus 512-dim chained bursts).
  • No DNS — Route by Capability: Nodes register 128-bit capability masks; routers and relays match incoming vectors in nanoseconds via single-cycle hardware POPCOUNT Hamming distance.
  • Blind Relays: Global WAN envelopes (100 Bytes) wrap the 64-byte payload in X25519 + ChaCha20-Poly1305 AEAD with a 128-packet sliding anti-replay window. Relays never hold keys or read tensors.

📜 Licensing

NNI Labs Proprietary Free Binary License (Free to Use)

  • Free in Production: Pre-compiled nni-sdk wheels and nni binaries are free for personal, academic, and commercial production use with zero royalties and no per-packet fees.
  • Closed-Source Core: Source code remains proprietary to NNI Labs and is not distributed. Decompiling, reverse engineering, or redistributing modified binaries is prohibited.
  • Enterprise / C-ABI OEM: Need static libraries (.a/.so/.dll) or dedicated SLA relay clusters? Contact nnilabs.hq@gmail.com.

© 2026 NNI Labs. All rights reserved.

Metadata

Release files for nni-sdk 3.0.2

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

Built distributions (wheels)

Table of built distributions (wheels) for nni-sdk 3.0.2
File Actions
nni_sdk-3.0.2-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for nni_sdk-3.0.2-cp311-abi3-win_amd64.whl
nni_sdk-3.0.2-cp311-abi3-manylinux_2_34_x86_64.whl CPython 3.11 abi3 Linux glibc 2.34+ x86-64 Details for nni_sdk-3.0.2-cp311-abi3-manylinux_2_34_x86_64.whl
nni_sdk-3.0.2-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details for nni_sdk-3.0.2-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
nni_sdk-3.0.2-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for nni_sdk-3.0.2-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 1.2 MB

Release files / nni_sdk-3.0.2-cp311-abi3-win_amd64.whl

Download URL nni_sdk-3.0.2-cp311-abi3-win_amd64.whl
Size 259.8 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
de0e105b8ee5788c1564b596841b64bf9a9f000a9d1348cc3353c4a079f30150
BLAKE2b-256 checksum
How to use checksums
17fec0c1807aaa4ce3bf3fb2007f771cb8ab49875e55d31e5bff8064c517aba0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / nni_sdk-3.0.2-cp311-abi3-manylinux_2_34_x86_64.whl

Download URL nni_sdk-3.0.2-cp311-abi3-manylinux_2_34_x86_64.whl
Size 352.5 kB
Tags CPython 3.11 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
30ff5420ec09f18205c91061812f70dca288ea257c29df5255ed768008e0493c
BLAKE2b-256 checksum
How to use checksums
83f36c2731ea4f83f2e352e0d063175045c2af0a89869437ab355da6fd69468a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / nni_sdk-3.0.2-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL nni_sdk-3.0.2-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 323.4 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
27d6f46a4da1abcf95edc0c5272de18f2781171e60e2b714d08e521901845c6c
BLAKE2b-256 checksum
How to use checksums
001182008ba7577e04aa1f8db33fe4003fd1ce1ef61305d2c75d9c3d2ef8bdd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / nni_sdk-3.0.2-cp311-abi3-macosx_11_0_arm64.whl

Download URL nni_sdk-3.0.2-cp311-abi3-macosx_11_0_arm64.whl
Size 301.5 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
433f90673a6b810266e2996baa125959a8c4939bdd9716db6b3c2874a37d5167
BLAKE2b-256 checksum
How to use checksums
9ff54f3e093df0c243a0a036abb7ef21716733132f66bd3a8ec801b9821dccc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Security for nni-sdk 3.0.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

3.0.2 This release

4 release files No provenance

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