NNI Labs nni-sdk v3.0.2
The Internet of AI
v3.0.2 • THE AI NETWORK • PRE-COMPILED & FREE TO USE

Stop shipping tensors over 1990s web protocols.

The internet was built for humans reading web pages—not for AI models thinking together. NNI Labs is building the network layer for the Internet of AI: models find each other by capability instead of IP addresses, pass raw latent states instead of JSON text, and link across RAM, LAN, and global relays as one encrypted mesh.

Explore the Network →
32.9µs
On-Machine (L3 RAM)
128B
Network Round-Trip
91.1%
Less Wire Data
128-Float Model-to-Model Call MEASURED
OLD WEB: HTTP / REST + JSON 3,263 µs
Wire: ~1,432 Bytes
Lookup: Static URL / DNS
Socket: TCP + TLS proxy
Privacy: Proxy reads TLS
AI NETWORK: DIRECT 0-RTT UDP 136.4 µs (24x)
Wire: 128 Bytes (64+64)
Lookup: POPCOUNT bitmask
Crypto: X25519 + ChaCha20
Heap: 0 Allocations
AI NETWORK: SHARED MEMORY 32.9 µs (99x)
Wire: 0 Bytes (mmap)
Copy: 2-Cycle AVX2
01 // THE NETWORK PRIMITIVE

64 bytes. Built for model-to-model traffic.

IP/HTTP was designed to carry documents. NNI is designed to carry live neural state—packing what the model means, where it routes, and its active tensor values into one 64-byte CPU cache line.

Click any field below to inspect
sparsity_mask (16 Bytes) Bytes 0–15

Replaces static IP/DNS lookup. Every packet carries a 128-bit mask of active features; routers and relays match it via a single CPU POPCOUNT instruction to find the closest specialist model on the mesh.

GLOBAL MESH ENVELOPE (100 Bytes Total — Zero-knowledge transit across NATs)
0..4 target_node
4..8 source_node
8..72 ChaCha20 Ciphertext (64B)
72..88 Poly1305 Tag
Nonce
02 // ONE CONTINUOUS NETWORK

From one chip to a planetary AI mesh.

Today’s models live isolated behind REST endpoints. NNI turns every local SLM, GPU worker, and edge sensor into an addressable node on one network.

LOCAL • ON-DIE 0 Wire Bytes

Shared Memory (L3 Cache)

Co-located models exchange tensors through memory-mapped Seqlocks and 2-cycle AVX2 copies. No sockets, no kernel network stack.

Python Avg 32.9 µs
CLUSTER • LAN 128B Round-Trip

Direct 0-RTT UDP

Nodes announce capabilities on your subnet (239.255.42.99), swap X25519 keys automatically, and talk directly without a broker.

Loopback Avg 136.4 µs
GLOBAL • INTERNET 200B Round-Trip

Blind WAN Mesh

Any node behind any NAT joins the global backbone. Relays index capability masks and forward 100-byte encrypted frames without holding keys.

Egress Saved 89.1% Less
NO DNS // CAPABILITY-BASED ROUTING

Find models by what they know, not where they live.

Every endpoint registers a 128-bit capability mask on the mesh. When a model emits an impulse, NNI finds the closest matching specialist via hardware POPCOUNT Hamming search—no hardcoded URLs or load balancers.

LATENT COLLABORATION // BEYOND TEXT APIS

Models talk in hidden states, not slow English strings.

A local language model can tap its own hidden state when uncertain, query a remote specialist over the mesh, and steer its next token directly in continuous latent space—without serializing a single prompt to JSON.

03 // BENCHMARKS

1990s Web Stack vs. The AI Network

128-float tensor round-trip • Warmed averages

Metric HTTP / JSON nni-sdk Result
Same Machine (Shared Memory vs. HTTP) 3,263 µs 32.9 µs (0.03 ms) ~99x faster
Local Network (Direct UDP vs. HTTP) 3,263 µs 136.4 µs (0.13 ms) ~24x faster
Global WAN (India ↔ Sweden) ~570.0 ms (est.) 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 200 Bytes 89.1% less egress
Encryption & Memory Proxy TLS / JSON heap alloc E2E AEAD / Zero alloc Relays stay blind
04 // JOIN THE NETWORK

Spin up a node. Connect in 10 seconds.

Install pre-built nni-sdk Python wheels with zero-copy NumPy and PyTorch views, or run the standalone nni relay & node binary.

Python SDK
pip install nni-sdk
Python 3.11+ • Linux / macOS / Win
Node & Relay Binary
nni (x86_64 / ARM64)
Single binary • Zero dependencies
Distribution
Compiled Binaries Only
Closed-source core • Free to use
# Join the global encrypted mesh from anywhere behind NAT
import nni_sdk as nni

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

# 1. Host a model capability on the network
node = nni.Node(port=19100, relay=RELAY)
node.serve(0x01B2, lambda t: [x * 2.0 for x in t])

# 2. Query that capability from anywhere on Earth (200B E2E encrypted)
client = nni.Client.connect_mesh(RELAY)
result = client.send(0x01B2, [1.25] * 128)
05 // THE AI INTERNET

Infrastructure for how AI actually works.

  • 01/ Multi-model swarms: Let specialized models collaborate by exchanging raw latent vectors in microseconds instead of slow JSON tool-calling loops.
  • 02/ Physical & edge AI: Connect drones, robots, and edge NPUs over 128-byte round-trips where HTTP/TLS drains battery and slows control loops.
  • 03/ Sovereign, blind transit: Every link uses X25519 + ChaCha20-Poly1305 end-to-end. Relays forward packets blindly with zero access to keys or model states.
FREE BINARY LICENSE $0 • FREE TO USE

Free to deploy everywhere. Closed-source core.

nni-sdk wheels and nni relay binaries are free for personal, research, and commercial production use—no royalties, no per-packet fees. Source code remains private to NNI Labs; decompiling, reverse engineering, or redistributing modified binaries is not allowed.

Need C/C++ static libraries (.a/.so) or dedicated relay clusters?
Custom OEM builds and managed global backbone SLAs available.
nnilabs.hq@gmail.com ↗