# GIGACHAD Phase-7 — consolidated report

**Date:** 2026-04-27
**Scope:** Physarium-7B top-brain surgery + organ farm + native tier manager,
all wired into the single C++17 binary `build/gigachad_native`.

> **Physarium-v1 errata:** all surgery numbers below are magnitude-flow,
> not activation-aware. Read with `reports/PHYSARIUM_RESULTS_RECONCILE.md`
> + `reports/PHYSARIUM_COVERAGE_AUDIT.md`. Denominator: 22.22 % is over
> target proj weights (100 % covered), 19.04 % over full 7B model.

## Deliverables

| # | Deliverable                                        | Status | Evidence                                           |
|---|----------------------------------------------------|--------|----------------------------------------------------|
| 1 | Physarium-7B native surgery binary                 | ✅     | `build/physarium7b_surgery` (193 KB)               |
| 2 | Real 7B surgery run on Qwen2.5-7B-Instruct donor   | ✅     | `reports/PHYSARIUM7B_SURGERY_REPORT.md`            |
| 3 | Pruned model on disk (BF16, 4 shards, valid index) | ✅     | `Physarium-7B-Native/` (15 GB, 339 tensors)        |
| 4 | Organ farm spec — 8 phys05_* + physarium_7b        | ✅     | `organs/organ_farm.json`                           |
| 5 | 9 prompt templates                                 | ✅     | `organs/prompts/*.txt`                             |
| 6 | Native tier manager (VRAM / RAM / SSD policy)      | ✅     | `src/runtime/tier_manager.cpp`, `include/tier_manager.hpp` |
| 7 | Tier accounting integrated into `run_task`         | ✅     | `src/main.cpp` (food/poison on each call)          |
| 8 | Persisted tier state                               | ✅     | `physarium/tier_state.json`                        |

## Surgery — short version

| Field                    | Value                                                                |
|--------------------------|----------------------------------------------------------------------|
| Donor                    | `/home/pc/qwen7b/instruct/` (Qwen2.5-7B-Instruct, BF16, 15 GB)       |
| Output                   | `/home/pc/gigachad_native/Physarium-7B-Native/` (BF16, 15 GB)        |
| Killed weights           | 1,450,103,613 / 6,525,288,448 = **22.22 %** of target proj weights   |
| Per-tensor sparsity      | min 16.32 %, mean 22.33 %, max 45.92 %                               |
| Tensors                  | 339 total, 0 failed, dtype + shape preserved                         |
| Wall-clock               | 2775.6 s (46.3 min)                                                   |
| Index validity           | `model.safetensors.index.json` parses; all 4 shards open via safetensors |

Full per-projection table and honest caveats: `PHYSARIUM7B_SURGERY_REPORT.md`.

## Organ farm — short version

`organs/organ_farm.json` declares 8 small organs and 1 top brain:

| Organ                       | Role                          | Tier default | Verifier        |
|-----------------------------|-------------------------------|--------------|-----------------|
| phys05_json_repair          | JSON syntax repair            | RAM          | json_strict     |
| phys05_code_skeleton        | Code skeleton emit            | RAM          | code_compile    |
| phys05_test_writer          | Unit test draft               | RAM          | test_runs       |
| phys05_claim_extractor      | Source-bound claim extraction | RAM          | source_present  |
| phys05_triz_contradiction   | TRIZ-style contradiction      | RAM          | hard_verifier   |
| phys05_renderer             | Final answer render           | SSD          | hard_verifier   |
| phys05_cache_matcher        | Hologram cache match          | SSD          | source_present  |
| phys05_critic_lite          | 4-axis 0–3 critic             | SSD          | json_strict     |
| **physarium_7b** (top)      | Top brain                     | **VRAM**     | hard_verifier   |

Each organ has `food_signals` / `poison_signals` declared in spec; the binary
applies them in `run_task` and persists to `tier_state.json`.

## Tier manager — verified behavior

After clearing state and running one `--task json_repair` call:

```
{"name":"phys05_json_repair","tier":"RAM","calls":1,"food":2.5,"poison":0.5,"net":2,"avg_lat_ms":0.000508}
{"name":"physarium_7b","tier":"VRAM","calls":0,"food":0,"poison":0,"net":0,"avg_lat_ms":0}
```

State persists across invocations and is correctly reloaded on next start.

**Bug fixed in this phase:** the persisted-state loader previously matched
the outer `"organs": { ... }` JSON key as if it were an organ name,
producing a phantom `"organs"` row. Patched in
`src/runtime/tier_manager.cpp`: only names `physarium_7b` or starting with
`phys05_` are accepted from the persisted file. Verified by clearing
`physarium/tier_state.json`, running a task, re-reading via `--tier-status` —
no phantom row.

## Build / selftest

```
$ make all
... (warnings only: misleading-indent + a /* in-comment in hologram_store) ...
$ ./build/gigachad_native --selftest
[selftest] field: 8 routes loaded; best=ariz net=278.50
[selftest] PASS (0 failures)
```

Build artifacts:
- `build/gigachad_native` (445 KB) — runtime + dispatcher + verifier + DAG +
  memory spine + tier manager
- `build/gigachad_physarium` (23 KB) — physarium engine CLI
- `build/physarium7b_surgery` (193 KB) — surgery binary

## What's NOT in scope of Phase 7 (and not done)

- ❌ **No native 7B inference backend.** `Physarium-7B-Native` is on disk
  and structurally valid; running a forward pass through it from C++/CUDA
  needs a full transformer runtime that is not in this tree.
- ❌ **No quality eval of the pruned 7B.** Sparsity numbers say nothing about
  output quality. The surgery report flags this caveat explicitly.
- ❌ **VRAM fit.** With `tier_default: VRAM` the 15 GB BF16 model does not
  fit on the 8 GB RTX 3060 Ti. Quantization or partial-offload tier policy
  refinement is a Phase-8+ problem.
- ❌ **Live use of organs.** The `run_task` path calls the organ stub
  (`{"_stub":"<organ> organ pending Phase-6E"}`); real LLM dispatch through
  the farm to a backend is not implemented in C++ yet.

## Honest one-liner

Phase-7 produces a structurally valid pruned 7B model, a declared farm of 8
organs + 1 top brain, and a working native tier manager that records food/
poison/latency per call and persists state. It does **not** yet run real
inference through any of those organs — that gap is documented, not
papered over.
