Chapter 69
Lucy density — synthetic organism
github.com/openfluke/welvet/lucy✅ BuildLPD
Why it exists
A new host (char LM, MNIST, a layer sprint) should not copy tide's goldilocks math. The question is always the same: can the net run and train at the same time in a small box, then how far that live-fit condenses without becoming a trap. That ruler belongs in the engine.
What it is
lucy.BuildLPD ranks Samples for consciousness (Acc / Throughput / Availability keep vs learner peaks) then Lucy density (Q × shrink vs Acc-champ RAM). Gold / near / keep / trap bands, consciousness radar, and memory-density radar are computed here. Tide dash and Lucy PDF only draw the board.
WHY Industry ships dead calculators: INT8 inference, no on-device train. Synthetic organism = serve while learning, then shrink without falling into chance-Acc "tiny & fast" traps. PILLARS (consciousness) Acc = argmax % (did it learn?) Thru = outputs / second (can it act while live?) Avail = InferMs / busy (can you still talk to it while it trains?) Score = T × Avail × Acc / 10_000 live-fit SoftAcc is serve-confidence — not a pillar. DENSITY (memory intelligence) Acc champ = RAM reference (best learner, not the Score champ) Learner = RelAcc ≥ 70% of Acc champ (traps do not set Thru/Avail peaks) Q = geomean(RelAcc, RelThru, RelAvail) shrink = AccChampRAM / thisRAM (capped ×32) LPD = Q × shrink if RelAcc ≥ 70% else 0 BANDS gold all 3 pillars ≥80% and RAM ≤20% of Acc champ near Acc + (Thru or Avail) ≥80% at ≤50% RAM trap RAM ≤20% and Acc keep <70% (binary looking dense) Score/MiB is the trap metric — do not use it for goldilocks. RADARS (for PDF / dash — math here, drawing in tide) Consciousness = (RelAcc, RelThru, RelAvail) Memory density = (RelAcc, RelThru, RelAvail) × shrink traps at origin
Why we measure this
The goal is not a better chatbot and not a paper for a faculty board. It is a synthetic organism: a net that owns time — continuous serve, continuous train, no turn-based halt, no phone-home. Lucy Score asks the thermodynamic question tide was built for: does SGD that blocks inference die, and do proxy / Split / Sparse paths keep the live loop while still learning?
Hard Acc is whether it learned. Availability is whether it still breathes. Throughput is how many actions it took while both were happening. Multiply them and you get live-fit. SoftAcc is how confident the serve looked — useful, not the Acc term.
Memory density asks the second question: once you have a learner, how far can dtype / quant / cameral width condense that live-fit versus the Acc champ's RAM without collapsing to chance Acc. A binary cell that is 30× smaller and 4× faster with 12% Acc is a trap (LPD = 0). An int8 that keeps ≥70% of Acc-champ Acc at a fifth the RAM is goldilocks.
Formulas
| Symbol | Formula | Meaning |
|---|---|---|
| Availability | InferMs / (InferMs + TrainMs) × 100 | Duty cycle. SGD that blocks serve dies here. |
| Throughput T | TotalOutputs / duration_s | Actions per second while the sweep is live. |
| Acc | argmax % (AvgAccuracy) | Learning. Acc champ is the RAM reference. |
| Lucy Score | T × Avail × Acc / 10_000 | Live-fit. SoftAcc is not this term. |
| Realtime | T × Avail / 100 | Duty-cycle speed without Acc. |
| ZeroDowntime | Acc × Avail / 100 | Still serving while learning. |
| RelAcc / RelThru / RelAvail | value / learner peak, clamped [0,1] | Keep vs cells that actually learn. |
| Q | geomean of the three Rel* | Consciousness mix. Traps do not set Thru/Avail peaks. |
| shrink | min(AccChampRAM / thisRAM, 32) | How much smaller than the Acc champ. |
| LPD | Q × shrink if RelAcc ≥ 0.70 else 0 | Lucy density. Weeds Score/MiB traps. |
| Gold | all 3 Rel* ≥ 0.80 and RAM ≤ 20% Acc champ | Trifecta in a small box. |
| Gold-std | Acc ≥ 80% plus Thru or Avail, then smallest then fastest | Two-or-more of the trifecta. |
| Trap | RAM ≤ 20% Acc champ and RelAcc < 0.70 | Tiny and fast with chance Acc. |
| MobileScore | Score / WeightMiB | The binary trap. Use LPD instead. |
What tide still owns
Tide is the race: serve+train pulses, permute matrix, dashboard, Lucy PDF
(including drawing the two radars). tide/report.BuildLPD pretty-prints cell IDs
then calls lucy.BuildLPD. A new thing that only needs the ruler:
import "github.com/openfluke/welvet/lucy"
board := lucy.BuildLPD(samples)
_ = board.Top[0].Consciousness() // Acc, Thru, Avail keep
_ = board.Top[0].MemoryDensity() // same × shrink; traps at 0
Classification hosts should train with TrainStackCE so the Acc pillar can leave chance;
MSE on a one-hot stays uniform. That is a loss gap in layers/parallel, not a Lucy formula.
Pulse math: §66. Train modes: §67.
Go example
examples/69-lucy-density/main.go
cd welvet/examples/69-lucy-density && source ../env.sh && go run .package main
import (
"fmt"
"github.com/openfluke/welvet/lucy"
)
func main() {
board := lucy.BuildLPD([]lucy.Sample{
{ID: "f32", Mode: "sgd", Acc: 90, Thru: 200, Avail: 40, Score: 100, RAMKiB: 1000},
{ID: "int8", Mode: "sgd", Acc: 82, Thru: 180, Avail: 38, Score: 85, RAMKiB: 180},
{ID: "bin", Mode: "sgd", Acc: 12, Thru: 400, Avail: 50, Score: 40, RAMKiB: 40},
})
top := board.Top[0]
fmt.Printf("lead=%s band=%s LPD=%.2f trap=%s\n",
top.ID, top.Band, top.LPD, board.Trap[0].ID)
}
Output
lead=int8 band=gold LPD=5.11 trap=bin