File size: 4,714 Bytes
ef6eb55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# PAX-Coder Demo Installation & Quick Start

## Installation

No installation required! The demo works out of the box with Python 3.10+.

```bash

cd C:/Users/jessi/Desktop/pax-coder

python3 demo/demo.py

```

## Quick Start

### 1. Default Demo (Mock Mode, RTX 3080)
```bash

python3 demo/demo.py

```
Shows all 5 kernel categories with interactive pauses between demos.

### 2. Non-Interactive (Perfect for CI/Scripting)
```bash

python3 demo/demo.py --no-pause

```
Runs all 5 demos back-to-back without pausing.

### 3. Target H100 (Hopper, sm_90)

```bash

python3 demo/demo.py --arch sm_90 --no-pause
```

Same 5 demos but with sm_90 target instead of sm_86.



### 4. Plain Text (No Colored Output)

```bash

python3 demo/demo.py --no-rich --no-pause

```
Works on minimal terminals without color support.

## Optional Dependencies

Install `rich` for prettier terminal output:
```bash

pip install rich

```

For live Ollama mode, install `requests`:
```bash

pip install requests

```

Then run Ollama in one terminal:
```bash

ollama serve

ollama run Snapkitty/pax-coder-7b  # Download model

```

And query in another:
```bash

python3 demo/demo.py --live

```

## What Each Flag Does

| Flag | Purpose | Example |
|------|---------|---------|
| `--help` | Show all options | `python3 demo.py --help` |
| `--no-pause` | Skip pauses (CI mode) | `python3 demo.py --no-pause` |
| `--no-rich` | Plain text only | `python3 demo.py --no-rich` |
| `--arch sm_90` | Target H100 (default: sm_86) | `python3 demo.py --arch sm_90` |
| `--live` | Use Ollama model | `python3 demo.py --live` |
| `--speed 2.0` | 2x faster animation | `python3 demo.py --speed 2.0` |

## Expected Output

The demo produces ~680 lines showing:

1. **Banner** (14 lines) β€” PAX-Coder branding + copyright
2. **5 Demos** (~130 lines each):
   - Prompt
   - Lean 4 proof
   - PTX kernel
   - Futhark spec
   - PAX certificate
3. **VRAM Stats** (~10 lines) β€” RTX 3080 breakdown
4. **CTA** (~10 lines) β€” Sovereign Node Key link
5. **Footer** (~5 lines) β€” GitHub/HuggingFace links

Total: 680+ lines when run with `--no-pause`.

## Output Format

Each demo shows:

```

================================================================================

DEMO 1/5: FP16

================================================================================



πŸ“‹ PROMPT:

  [User's request for verified kernel]



πŸ” LEAN 4 PROOF:

  [15-26 lines of Lean 4 theorem + lemmas]



βš™οΈ  PTX KERNEL:

  [34-77 lines of Ampere/Hopper assembly]



🌐 FUTHARK SPEC:

  [10-26 lines of functional reference]



βœ“ PAX CERTIFICATE: [PO1 | PO3 | PO5 | PO7 | PO8]

```

## Troubleshooting

### "UnicodeEncodeError" on Windows
The demo handles UTF-8 automatically. If issues persist:
```bash

python3 demo/demo.py --no-rich --no-pause

```

### "No module named 'rich'"
Rich is optional. Just run without it:
```bash

python3 demo/demo.py --no-rich

```

### Ollama connection refused (--live)
Ensure Ollama is running:
```bash

# Terminal 1: Start Ollama server

ollama serve



# Terminal 2: Download model (first time)

ollama pull Snapkitty/pax-coder-7b



# Terminal 3: Run demo with --live

python3 demo/demo.py --live

```

## File Structure

```

pax-coder/

β”œβ”€β”€ demo/

β”‚   β”œβ”€β”€ demo.py                  ← Main demo script

β”‚   β”œβ”€β”€ README.md                ← Full documentation

β”‚   β”œβ”€β”€ INSTALLATION.md          ← This file

β”‚   └── DEMO_SUMMARY.txt         ← Detailed manifest

β”œβ”€β”€ PAX/                         ← Lean 4 proofs

β”œβ”€β”€ src/                         ← GPU kernels

β”œβ”€β”€ docs/                        ← Architecture docs

└── README.md                    ← Main project README

```

## Next Steps

1. **Run the demo**:
   ```bash

   python3 demo/demo.py --no-pause

   ```

2. **Read the architecture**:
   - See `../PAX/` for Lean 4 proofs
   - See `../src/` for actual GPU kernels
   - See `../docs/` for detailed docs

3. **Get a Sovereign Node Key** (for production):
   - Submit request: See `../CONTACT.md`
   - Select tier (Community $0, Individual $250-500, Commercial $12-25K/yr)
   - Receive provisioned authorization
   - Required for production use

4. **Fine-tune your own**:
   ```bash

   python3 ../export_training_data.py

   pip install -r ../requirements.txt

   ./run_training.sh

   ```

## License

PAX-Coder is tri-licensed:
- BSL-1.1 (until 2028-08-08)
- AGPL-3.0 (from 2028-08-08)
- MPL-2.0 (alternative)

Copyright: Ahmad Ali Parr, Bel Esprit D'Accord Irrevocable Trust

---

Happy kernel proving! πŸš€