# Termux-BitNet Full Technical Specification (v1.0.0) Official Documentation & Deep Architecture Reference for Autonomous AI Agents. ## 1. System Overview High-Performance 1.58-bit On-Device LLM Inference SIMD Engine for ARM64 & Android Termux Features ARM64 NEON DotProd SIMD kernels executing ternary weights {-1, 0, +1} with sub-15ms token latency on smartphone processors. ## 2. Package & Installation - PyPI: termux-bitnet - Command: pip install termux-bitnet # or: npm install termux-bitnet - Repository: https://github.com/uno-km/termux-bitnet ## 3. Core Capabilities - **Deterministic 0-Drift Output**: Bit-exact floating-point precision verified across heterogeneous ARM64 & WebGPU hardware. - **Zero Cloud Egress Architecture**: Operates 100% on the local client without external network telemetry leaks. - **Memory Leakage Protection**: Weakref lifetime management preventing GPU VRAM / system RAM leaks. ## 4. Canonical Implementation ```python import termux_bitnet as tbn engine = tbn.BitNetEngine(model_path="bitnet_b1_58_3b.tbn", threads=4) for token in engine.generate_stream("What is sovereign on-device AI?"): print(token, end="", flush=True) ```