PeetPedro commited on
Commit
8215cbd
Β·
verified Β·
1 Parent(s): 0149a70

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +131 -0
README.md ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 🧠 eightb β€” Eight-Bit Intelligence Systems
2
+
3
+ <p align="center">
4
+ <img src="https://img.shields.io/badge/rust-%23dea584.svg?logo=rust&logoColor=white"/>
5
+ <img src="https://img.shields.io/badge/cloudflare-F38020?logo=cloudflare&logoColor=white"/>
6
+ <img src="https://img.shields.io/badge/webassembly-654FF0?logo=webassembly&logoColor=white"/>
7
+ <img src="https://img.shields.io/badge/mlx-ECEEF1?logo=apple&logoColor=black"/>
8
+ </p>
9
+
10
+ **Ultra-low precision neural networks β€’ Quantization-native architectures β€’ Edge-first inference**
11
+
12
+ ---
13
+
14
+ ## Philosophy
15
+
16
+ Modern LLMs are bloated. We believe intelligence doesn't need FP32β€”or even FP16. By designing **from the ground up for ternary (-1, 0, +1) and low-bit representations**, we unlock:
17
+
18
+ | Precision | Storage | MAC Energy | Typical Quality |
19
+ |-----------|---------|------------|-----------------|
20
+ | BF16 | 2Γ— | 1Γ— | Baseline |
21
+ | INT8 | ΒΌΓ— | ~β…“Γ— | Near-baseline |
22
+ | **INT2/I2_S** | **β…›Γ—** | **~¹⁄₁₂×** | **Surprisingly good** |
23
+
24
+ Our flagship: **BitNet 1.58-bit** β€” ternary weights trained straight-through estimator, no distillation tax.
25
+
26
+ ---
27
+
28
+ ## Repositories
29
+
30
+ | Repo | Description | Status |
31
+ |------|-------------|--------|
32
+ | [`smart-tree`](https://huggingface.co/eightb/smart-tree) | SIMD-accelerated ternary inference engine (ARM NEON / AVX2 / WASM) | βœ… Active |
33
+ | [`enthea`](https://github.com/peterlodri-sec/enthea) | Pure-Rust quantized linear algebra: GEMM, attention, MoE routing | βœ… Active |
34
+ | [`felix-assembly`](https://github.com/peterlodri-sec/felix-assembly) | CPU-agnostic FELIX ISA for portable SIMD kernels | πŸ”¬ Experimental |
35
+ | [`quantlab`](https://github.com/peterlodri-sec/quantlab) | Automated quantization search: Pareto-Q, KD pipelines, RL tuning | 🚧 Building |
36
+
37
+ ---
38
+
39
+ ## Quick Start: `smart-tree` Binary
40
+
41
+ ```bash
42
+ # Download latest release
43
+ curl -LO https://huggingface.co/eightb/smart-tree/resolve/main/st
44
+ chmod +x st
45
+
46
+ # Validate GGUF I2_S (Falcon3-3B-I2_S compatible)
47
+ ./st gguf validate
48
+
49
+ # Convert BitNetWave64 β†’ I2_S hex
50
+ ./st gguf convert --wave DEADBEEFDEADBEEF:FEEDFACEFEEDFACE
51
+
52
+ # Inspect GGUF for ternary tensors
53
+ ./st gguf inspect --file falcon3-3b-i2s.gguf
54
+ ```
55
+
56
+ ### As Library
57
+
58
+ ```toml
59
+ [dependencies]
60
+ smart-tree = { git = "https://github.com/peterlodri-sec/smart-tree" }
61
+ ```
62
+
63
+ ```rust
64
+ use smart_tree::{BitNetWave64, gguf_interop::{I2SPacker, GgufI2SBridge}};
65
+
66
+ // Pack ternary weights to GGUF I2_S format
67
+ let packed = I2SPacker::pack_trits(&[-1, 0, 1, 0, -1, 1]);
68
+
69
+ // Full Wave64 ↔ I2_S roundtrip
70
+ let i2s_bytes = GgufI2SBridge::wave64_to_i2s(&wave)?;
71
+ let recovered = GgufI2SBridge::i2s_to_wave64(&i2s_bytes)?;
72
+ ```
73
+
74
+ ---
75
+
76
+ ## Architecture Highlights
77
+
78
+ ### Ternary Bridge (Lossless)
79
+ ```
80
+ BF16 ──► INT8 ◄──┐
81
+ FP8(E4M3)◄───────┼─► TERNARY {-1,0,+1} ──► I2_S (GGUF type 36)
82
+ FP8(E5M2)β—„β”€β”€β”€β”€β”€β”€β”€β”˜
83
+ ```
84
+ Zero-copy conversions with exact arithmetic guarantees.
85
+
86
+ ### SIMD Kernels
87
+ - **ARM64 NEON**: 128-bit loads, `tbl` lut unpack, pairwise madd
88
+ - **AVX2**: VPBLENDVB mask blend, VPMADDWD horizontal sum
89
+ - **Scalar fallback**: Branch-free, predictable latency
90
+
91
+ ### GGUF Native
92
+ First-class support for `quantization_type = 36 (I2_S)`:
93
+ - MSB-first 4-trits/byte (Bits 6-7, 4-5, 2-3, 0-1)
94
+ - Embedded/scales/env-configurable dequantization
95
+ - Falcon3, BitNet.cpp, llama.cpp compatible
96
+
97
+ ---
98
+
99
+ ## Roadmap
100
+
101
+ - [ ] **Experiment 3**: ARM64 NEON / AVX2 SIMD kernels for ternary GEMM
102
+ - [ ] **Experiment 4**: QLoRA-style ternary fine-tuning (LoRA-T)
103
+ - [ ] **Experiment 5**: Mixed-precision profiler (layer-wise sensitivity)
104
+ - [ ] **Experiment 6**: Residual injection scheduler (dynamic precision)
105
+ - [ ] **Experiment 7**: Pareto-Q sequential allocator
106
+ - [ ] **Experiment 8**: KD pipeline teacher→student (ternary)
107
+ - [ ] **Experiment 9**: BITCOS cosine similarity retrieval
108
+
109
+ ---
110
+
111
+ ## Community
112
+
113
+ - Discord: coming soon
114
+ - Issues: [GitHub](https://github.com/peterlodri-sec/smart-tree/issues)
115
+ - Papers: See [`SCIENCE.md`](https://github.com/peterlodri-sec/enthea/blob/main/SCIENCE.md)
116
+
117
+ ---
118
+
119
+ ## License
120
+
121
+ MIT OR Apache-2.0 β€” Choose your adventure.
122
+
123
+ ---
124
+
125
+ <div align="center">
126
+
127
+ **"Eight bits ought to be enough for anybody"** β€” *Probably not Bill Gates*
128
+
129
+ Built with ❀️ by the eightb collective
130
+
131
+ </div>