Low-level systems · On-device AI acceleration · Decentralized networks
I build systems at the boundary of C-level performance engineering and applied ML: inference engines on Apple Silicon, single-file P2P distribution, and ML pipelines measured against reproducible baselines. The constraint is usually physical — memory bandwidth, cache residency, verification cost, or network interference.
github.com/ayush6288 · Raipur, India
C11 · ARM NEON · Apple Silicon · Source
Problem & architecture.
Autoregressive decoding on edge hardware is bounded by per-token weight streaming and the cost of verifying draft tokens. SPEL is a bare-metal C11 engine that pairs a 2-bit ternary draft with a 12-layer hybrid target — 9 Gated-DeltaNet recurrent layers and 3 RoPE attention layers — verifies K+1 tokens in one batched pass, and rolls back attention KV and recurrent state transactionally.
Engineering highlights.
- 1.45×–1.48× net decode speedup over autoregressive generation at speculative depth
K=4, measured on the 21M-parameter trained checkpoint with 4 draft threads and an in-domain prompt. - 2.7×–3.1× the FP32 per-MAC rate from hand-written, vectorized NEON 2-bit ternary GEMV kernels on a 4096×1536 shape. Packed weights occupy 1.50 MiB versus 24.00 MiB in FP32.
- ~0.5 ns commit/rollback for attention and recurrent state, against 108.2–112.7 µs to copy the 21M model's 4.50 MiB KV cache.
- Bit-identical verification in strict mode, with a dynamic speculation governor that detects low acceptance and falls back to autoregressive decode.
- Persistent draft thread pool removes per-GEMV thread creation; 4-worker draft throughput reaches 4,394–4,628 tok/s.
Stack / primitives. C11 · ARMv9-A NEON (vdotq_s32) · Apple Accelerate/AMX · pthreads · packed 2-bit weights · int8 activation quantization
Raw captures and derived rates are committed in results/.
TypeScript · WebRTC · P2P · Source · v0.3.0
Problem & architecture.
Centralized publishing fails at the origin, the CDN, or the account layer. SPORE is a local-first, censorship-resistant distribution client compiled into one self-contained HTML file: signed packets propagate over WebRTC DataChannels in room-scoped swarms, with no required server, database, or origin, targeting high-interference networks where public signaling may be blocked.
Engineering highlights.
- Single ~320 KB artifact with zero network requests at boot; runs from
file://and serves embedded media with no peers online. - Local verification only: secp256k1 Schnorr signatures, SHA-256 packet IDs, and Hashcash proof of work. Unknown authors must clear a 16-bit work floor before entering the live feed.
- Chunked media transport: 64 KiB SHA-256-verified chunks over WebRTC DataChannels, 4–6 chunk request windows, and deterministic room scoping per creator and media hash.
- Offline payload paths: lossless RGB LSB steganographic PNG carriers and HTML quine snapshots carrying up to 200 verified packets.
- Interference tolerance: BitTorrent WebSocket trackers and Nostr relays for signaling, plus a compressed manual SDP bridge when public signaling is unavailable.
- Documented threat model: Dandelion++-style source obfuscation with explicit non-goals — not anonymity, not confidentiality.
Stack / primitives. TypeScript · WebRTC DataChannels · secp256k1/BIP340 Schnorr · Hashcash PoW · IndexedDB · PNG LSB steganography · Vite · Vitest
Python · PyTorch · MPS/Metal · Private repository
Problem & architecture.
ML prototypes usually break between the notebook and the service boundary: feature logic diverges, inference depends on a cloud round-trip, and evaluation is added after deployment. This pipeline treats ingestion, feature materialization, local inference, and evaluation as one system with shared schemas and explicit interfaces.
Engineering highlights.
- Vectorized feature store with one schema shared by training and serving, removing train/serve skew at the boundary.
- Local MPS/Metal inference path for on-device execution, keeping the hot path off the network and the runtime footprint bounded.
- Lightweight evaluation at every stage — ingestion, feature materialization, inference latency, and output quality — with regression checks before release.
- REST and gRPC interfaces with versioned request/response contracts and explicit service boundaries.
- Runtime footprint treated as a first-class metric alongside model quality: artifact size, startup time, and peak memory.
Measured surface. Ingestion throughput · feature materialization latency · inference p50/p95 · artifact size · peak RSS · evaluation delta per release
Stack / primitives. Python · PyTorch · MPS/Metal · FastAPI · gRPC · SQL · vectorized feature batches
| Domain | Primitives |
|---|---|
| Systems & Low-Level | C11, ARM NEON/SIMD, cache-aware memory layout, custom memory management, packed low-bit weights, int8 quantization, pthreads, Apple Accelerate/AMX, Clang, profiling |
| ML / Inference Engineering | Python, PyTorch, MPS/Metal, speculative decoding, transformer internals (RoPE, Gated DeltaNet), feature pipelines, evaluation harnesses |
| Protocols & Networking | TypeScript, WebRTC DataChannels, P2P mesh topologies, chunked transfer, BitTorrent/Nostr signaling, secp256k1 Schnorr, Hashcash PoW, LSB steganography |
| Tooling | Git, Make, Vite, Vitest, FastAPI, gRPC, Supabase, Vercel, Linux/macOS |
- Pair every performance claim with a baseline and a committed capture.
- Optimize the memory path before the arithmetic.
- Prefer one self-contained artifact over a service graph when the problem allows it.
- Treat threat models and negative results as deliverables, not footnotes.
Open to conversations on inference kernels, P2P transport, and ML infrastructure.
