File size: 2,232 Bytes
732c41e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
title: Phox BQSM Model Weights
organization: emerging.systems
license: apache-2.0
tags:
  - bqsm
  - ternary
  - wave-rider
  - phoenix
  - oscillator
  - kuramoto
  - inference-engine
  - cpu
language: en
---

# Phox — BQSM Ternary Model Weights

Model weights for the Phox BQSM (Basin-Quotient-Machine) wave-rider inference engine.

## Overview

This repository contains ternary-quantized model weights for the Phoenix Brain — a Kuramoto oscillator interference engine that performs inference through traveling wave activation rather than traditional matrix multiplication.

### Architecture

- **Engine**: Phoenix Brain (`phoenix_brain.c`) — 4-ring Kuramoto core + demand-driven tendrils
- **Weights**: 4-level ternary quantization (80% sparsity, 2 bits per weight)
- **Compute**: AVX2 SIMD + OpenMP parallelism (CPU only)
- **No GPU required**: Engine is pure C with AVX2, runs on any x86-64 CPU

### Models

| File | Size | Description |
|------|------|-------------|
| `gemma4-12b-ternary-normed.bqsm` | 2.8GB | Gemma-4-12B ternary weights (normalized) |
| `gemma4-12b-bf16-ternary.bqsm` | 1.2GB | Gemma-4-12B BF16-derived ternary |
| `gemma4-12b.vocab` | 2.8MB | Token vocabulary |
| `hermes-3b-ternary.bqsm` | 766MB | Hermes-3-3B ternary weights |
| `hermes-3b.vocab` | 1.3MB | Token vocabulary |
| `phoenix-evolved.pbrain` | ~2MB | Evolved brain state file |

### Files

- `gemma4-12b-ternary-normed.bqsm` — Main 12B parameter model with normalized weights
- `tokenizer/` — Gemma 4 tokenizer files (compatible with HuggingFace transformers)
- `gemma4-12b.vocab` — Token-to-ID vocabulary mapping for the C engine

### Usage

**Compile the engine:**
```bash
cc -O3 -std=c11 -march=native -fopenmp phoenix_brain.c -o phoenix -lm
```

**Run inference:**
```bash
./phoenix gemma4-12b-ternary-normed.bqsm 20
```

**Chat mode (with ring buffer I/O):**
```bash
./phoenix gemma4-12b-ternary-normed.bqsm --chat
```

### Performance

- ~4.9 tok/s on 12B model (12-core CPU, AVX2)
- Model loaded via mmap (no RAM duplication)
- 48 layers of wave-rider physics per token

### Citation

If you use this work, please reference:
- Nicholas Bumgarner, emerging.systems
- "Basin-Quotient-Machine: Cross-Harmonic Computation"