# KAI Native Ternary — Owner checklist (you approve, I build)

## Right now (while RunPod trains)

| You | Me (done) |
|-----|-----------|
| Let A100 train finish (GEN at 1k steps can be gibberish — normal) | Rust **forward/decode** wired for kai-native |
| Watch loss go down over epochs | `install_kai_native.ps1` + `check_kai_native.ps1` |
| Do **not** stop for messy GEN samples early | Export improved (tokenizer + MANIFEST) |
| | RSTS sandbox design (lattice path) ready separately |

### GEN at step ~1000
```
[GEN] 'Who are you' -> 'The system are"etime warps...'
```
= **learning, not failure**. Early next-token is noisy. Trust **loss trend** + later epochs + final export.

---

## When training finishes (on RunPod)

```bash
ls -lah /workspace/Kai_volume/kai-native/
# need: weights.bin  config.json  (+ tokenizer.json if exported)
# also fine: checkpoint_latest.pt  training.log
```

If only checkpoints exist (export crashed), re-export is automatic at end of train script; or we can add a small export-only command.

**Download whole folder** `kai-native` to your PC (Jupyter download or scp).

---

## On Windows (you run / I can run when you say)

```powershell
cd C:\KAI
.\tools\install_kai_native.ps1 -FromDir "PATH\TO\downloaded\kai-native"
cargo build --release --bin kai
.\Start-KAI.ps1
.\tools\check_kai_native.ps1
```

Boot log should include:
```
[LanguageWarehouse] KAI native model: LOADED
[LanguageWarehouse] KAI native structured: ...
[Hybrid Router] Routing → KAI native ternary model ...
```

---

## What I already coded for you

1. **`language_warehouse.rs`** — parse weights, structure layers, **RoPE + ternary attn + SwiGLU + sample**, `kai_native_decode`, router uses it first  
2. **`ternary_math.rs`** — `kai_i2` unpack + matvec matching train export  
3. **Train export** — tokenizer copy + MANIFEST  
4. **Scripts** — install / check  
5. **RSTS sandbox** — lattice-native cousin path (not blocking this ship)

---

## What you only need to approve later

- [ ] Train finished, weights downloaded  
- [ ] Install script run  
- [ ] Engine restart + smoke chat “Who are you”  
- [ ] If output still weak: more train epochs / more data / smaller temp (I adjust)  
- [ ] Optional next phase: RSTS lattice spine hybrid gate  

---

## Pod: keep training healthy

```bash
# tail log
tail -f /workspace/Kai_volume/kai-native/training.log

# if dead, resume from latest checkpoint (after script has --resume support)
ls /workspace/Kai_volume/kai-native/checkpoint*.pt
```

If process dies after export, you’re done — just download.
