The Awakening
Pre-release
Pre-release
This release marks the successful completion of the core Proof of Concept. The custom WebGPU runtime is now running the full 30-layer microsoft/bitnet-b1.58-2B-4T model natively in the browser, outputting coherent, context-aware English at ~5 tokens per second.
Key Architectural Updates:
- Full Neural Stack: Upgraded the engine from a single layer to the complete 30-layer architecture.
- Llama 3 RoPE: Fixed the Rotary Positional Embedding (RoPE) implementation to correctly use Llama-style
rotate_halfdimension pairing (paired within heads) and updated the base frequency (ROPE_THETA) to500000.0. - BitLinear Weight Scales: Extracted and implemented the floating-point
weight_scalefor all 210 ternary matrices, preventing activation explosion during integer math. - Sub-Layer Normalization (SubLN): Extracted and wired the 60 learned SubLN vectors required to stabilize the 1.58-bit architecture.
- Bit-Packing Alignment: Fixed a critical bug in the Python extraction script to correctly interpret Hugging Face's
uint8offset ternary encoding (0b00 -> -1,0b10 -> +1), restoring the AI's semantic reasoning. - Squared ReLU: Swapped the standard SiLU activation for the BitNet-specific
ReLU²function.
Performance Benchmarks (Warmed-up Inference):
- MacBook Pro M2 Max: ~190 ms/token (~5.2 tokens/sec) for the full 2B parameter pipeline.