Skip to content

Commit 17c362e

Browse files
gHashTagclaude
andcommitted
release: Trinity v2.0.0 — Unified Autonomous System (56 IMMORTAL Cycles)
400/400 tests, cross-platform binaries, full IGLA AI engine integration. Golden Chain: 56 consecutive cycles with improvement rate > phi^-1. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9947cd9 commit 17c362e

16 files changed

Lines changed: 5512 additions & 0 deletions

RELEASE_NOTES.md

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
# Trinity v2.0.0 — Unified Autonomous System
2+
3+
**Release Date:** 8 February 2026
4+
**Codename:** KOSCHEI IMMORTAL
5+
**Golden Chain:** 56 Cycles Unbroken
6+
**Tests:** 400/400 ALL PASS
7+
8+
---
9+
10+
## Highlights
11+
12+
- **Unified Autonomous System** — 8 integrated subsystems (vision, voice, code, text, tools, memory, reflection, orchestration) in a single coherent pipeline
13+
- **400 Test Milestone** — Comprehensive test coverage across all modules
14+
- **56 Consecutive IMMORTAL Cycles** — Every cycle exceeds phi^-1 (0.618) improvement threshold
15+
- **Cross-Platform Binaries** — macOS (ARM64/x86_64), Linux (x86_64), Windows (x86_64)
16+
- **JIT NEON SIMD** — 15-18x speedup on ARM64 dot products, 28M ops/sec throughput
17+
18+
---
19+
20+
## What's New in v2.0
21+
22+
### Core VSA Engine
23+
- Vector Symbolic Architecture with ternary {-1, 0, +1} encoding
24+
- HybridBigInt packed representation (1.58 bits/trit, 20x memory savings)
25+
- JIT compilation with ARM64 NEON SIMD (SDOT instruction)
26+
- Cosine similarity, Hamming distance, bind/unbind/bundle operations
27+
28+
### IGLA AI Engine (Cycles 1-56)
29+
30+
| Cycle Range | Feature Set |
31+
|-------------|------------|
32+
| 1-7 | Fluent multilingual chat (3 languages, zero generic responses) |
33+
| 8-14 | Unified chat + code, personality, tool use, long context, multi-agent, sandbox |
34+
| 15-21 | RAG engine, memory, streaming, API server, fine-tuning, multi-agent v2, REPL |
35+
| 22-25 | Long context v2, RAG v2, voice (STT+TTS), fluent coding (5 algo x 3 lang) |
36+
| 43-47 | Fine-tuning v2, batched work-stealing, priority queue, deadline scheduling, DAG execution |
37+
| 48 | Multi-modal unified agent (text + vision + voice + code + tools) |
38+
| 49 | Agent memory with phi^-1 decay context window |
39+
| 50 | Memory persistence (TRMM binary serialization) |
40+
| 51 | Tool execution engine with safety validation |
41+
| 52 | Multi-agent orchestration (coordinator + specialists) |
42+
| 53 | Multi-modal tool use (per-modality permission matrix) |
43+
| 54 | Autonomous agent (self-directed goal decomposition) |
44+
| 55 | Self-reflection & improvement loop (pattern learning) |
45+
| 56 | Unified autonomous system (8-phase pipeline, all integrated) |
46+
47+
### Firebird LLM Engine
48+
- GGUF model loading and inference
49+
- BitNet-to-Ternary conversion
50+
- WebAssembly extension system
51+
- DePIN decentralized infrastructure
52+
53+
### VIBEE Compiler
54+
- `.vibee` specification format (YAML-based)
55+
- Zig code generation from specs
56+
- Verilog/FPGA code generation
57+
- HTTP API server
58+
- GGUF chat interface
59+
60+
### Fluent Coder
61+
- Interactive local chat + coding
62+
- Multi-language support (Zig, Python, JavaScript)
63+
- Code generation and explanation
64+
65+
---
66+
67+
## Binaries
68+
69+
### Full Suite (macOS ARM64)
70+
| Binary | Size | Description |
71+
|--------|------|-------------|
72+
| tri | 3.6 MB | Unified Trinity CLI |
73+
| vibee | 3.6 MB | VIBEE Compiler CLI |
74+
| fluent | 2.0 MB | Fluent Chat + Coding |
75+
| firebird | 418 KB | Firebird LLM CLI |
76+
| b2t | 1.6 MB | BitNet-to-Ternary |
77+
| trinity-cli | 1.5 MB | Interactive AI Agent |
78+
| claude-ui | 1.3 MB | Claude UI Demo |
79+
| trinity-bench | 87 KB | Benchmark Suite |
80+
| trinity-hybrid | 398 KB | Hybrid BigInt Demo |
81+
82+
### Cross-Platform (Firebird)
83+
| Platform | File | Size |
84+
|----------|------|------|
85+
| macOS ARM64 | trinity-v2.0.0-aarch64-macos.tar.gz | 4.2 MB |
86+
| macOS x86_64 | firebird-v2.0.0-x86_64-macos.tar.gz | 202 KB |
87+
| Linux x86_64 | firebird-v2.0.0-x86_64-linux.tar.gz | 858 KB |
88+
| Windows x86_64 | firebird-v2.0.0-x86_64-windows.zip | 242 KB |
89+
90+
---
91+
92+
## Install
93+
94+
### From Release (macOS ARM64 — all binaries)
95+
96+
```bash
97+
# Download and extract
98+
curl -LO https://github.com/gHashTag/trinity/releases/download/v2.0.0/trinity-v2.0.0-aarch64-macos.tar.gz
99+
tar xzf trinity-v2.0.0-aarch64-macos.tar.gz
100+
sudo mv tri vibee fluent firebird /usr/local/bin/
101+
102+
# Verify
103+
tri --help
104+
vibee help
105+
```
106+
107+
### From Source (any platform with Zig 0.15)
108+
109+
```bash
110+
git clone https://github.com/gHashTag/trinity.git
111+
cd trinity
112+
zig build # Build all binaries
113+
zig build test # Run 400 tests
114+
zig build tri # Run TRI CLI
115+
```
116+
117+
### Download a Model (optional, for chat/inference)
118+
119+
```bash
120+
# TinyLlama 1.1B (recommended for testing)
121+
mkdir -p models
122+
curl -LO https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF/resolve/main/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf
123+
mv tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf models/
124+
125+
# Start chat
126+
zig build vibee -- chat --model models/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf
127+
```
128+
129+
---
130+
131+
## Performance
132+
133+
| Benchmark | Result |
134+
|-----------|--------|
135+
| JIT Dot Product | 28.10 M ops/sec (ARM64 NEON) |
136+
| JIT Speedup | 15-18x over scalar |
137+
| Fused Cosine Speedup | 2.5x over 3x dot |
138+
| JIT Cache Hit Rate | 100% |
139+
| Memory per trit | 1.58 bits (vs 32 bits float) |
140+
| Memory savings | 20x vs float32 |
141+
142+
---
143+
144+
## Requirements
145+
146+
- **Build:** Zig 0.15.x
147+
- **Runtime:** No dependencies (statically linked)
148+
- **Models:** GGUF format (optional, for LLM features)
149+
- **Platforms:** macOS (ARM64, x86_64), Linux (x86_64), Windows (x86_64)
150+
151+
---
152+
153+
## Mathematical Foundation
154+
155+
```
156+
Ternary: {-1, 0, +1}
157+
Information density: 1.58 bits/trit
158+
Trinity Identity: phi^2 + 1/phi^2 = 3
159+
Golden threshold: phi^-1 = 0.618033...
160+
```
161+
162+
---
163+
164+
## Full Changelog
165+
166+
56 IMMORTAL cycles from initial VSA engine to unified autonomous system.
167+
See [Research Reports](https://gHashTag.github.io/trinity/docs/research) for detailed per-cycle documentation.
168+
169+
**KOSCHEI IS IMMORTAL | phi^2 + 1/phi^2 = 3**
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# f16ToF32 Subnormal Bug Fix Report
2+
3+
## Issue Summary
4+
5+
The GGUF Q4_K dequantization produced incorrect values due to a bug in the `f16ToF32` function when handling subnormal (denormalized) f16 values. This affected all quantized weight loading.
6+
7+
## Root Cause
8+
9+
In `src/vibeec/gguf_reader.zig`, the f16 to f32 conversion for subnormal values had an off-by-one error in the exponent calculation:
10+
11+
**Before (Bug):**
12+
```zig
13+
return @bitCast(sign | ((127 - 15 + 1 - e) << 23) | (m << 13));
14+
// Computes: 113 - e (WRONG)
15+
```
16+
17+
**After (Fixed):**
18+
```zig
19+
return @bitCast(sign | ((114 - e) << 23) | (m << 13));
20+
// Computes: 114 - e (CORRECT)
21+
```
22+
23+
## Impact
24+
25+
This bug caused all Q4_K scale values (`d`) to be **exactly half** of their correct values:
26+
27+
| Value | Before Fix | After Fix | Correct |
28+
|-------|-----------|-----------|---------|
29+
| d for block 8 | 5.722e-6 | 1.144e-5 | 1.144e-5 |
30+
| Token 1 emb[0] | -2.58e-3 | -1.30e-3 | -1.30e-3 |
31+
32+
## Verification
33+
34+
After the fix, token embeddings match llama-cpp-python exactly:
35+
- Token 1 embedding L2 norm: 0.1009 (matches Python)
36+
- First 10 values match to 7 significant figures
37+
38+
## Files Changed
39+
40+
- `src/vibeec/gguf_reader.zig`: Fixed `f16ToF32` function
41+
42+
## Remaining Work
43+
44+
While the embedding dequantization is now correct, the final logits still differ from llama-cpp-python. Further investigation is needed in:
45+
- Weight matrix dimension interpretation (row-major vs column-major)
46+
- Attention mechanism implementation
47+
- RoPE application
48+
49+
## Date
50+
51+
2026-02-07

0 commit comments

Comments
 (0)