summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorYuren Hao <yurenh2@illinois.edu>2026-07-11 07:03:59 -0500
committerYuren Hao <yurenh2@illinois.edu>2026-07-11 07:03:59 -0500
commitc1a44c3e9181c98d6d3bf8207dbc73a026a077fa (patch)
tree8ecb5b3629bf06de84dffda46aae8db87ed608f0 /docs
parent0440158a311b6e5e814a17904d3033572d4b061a (diff)
Component->analog-hardware map: full stack (forward path A.1-10, training machinery B.11-17, cross-cutting physics C, demo scoping D) with reuse sources, feedback-path costs, tolerance status per item
Diffstat (limited to 'docs')
-rw-r--r--docs/hardware/COMPONENT_HW_MAP.md58
1 files changed, 58 insertions, 0 deletions
diff --git a/docs/hardware/COMPONENT_HW_MAP.md b/docs/hardware/COMPONENT_HW_MAP.md
new file mode 100644
index 0000000..95c5689
--- /dev/null
+++ b/docs/hardware/COMPONENT_HW_MAP.md
@@ -0,0 +1,58 @@
+# Component → analog-hardware map (cascade-EP, OLMo2-standard block)
+
+**2026-07-11.** The full stack of the current recipe (the stage1b/Stage-2 architecture), component by
+component: what it computes, the analog primitive it maps to, the reuse source (doctrine: COTS/eval
+modules/FPGA — never tapeout), what the EP feedback path needs from it, and tolerance status.
+Companion docs: `HW_RESEARCH_FINDINGS.md` (softmax dossier, OLMo2 analog audit, optimizer BoM),
+`CLAIM_LARGEST_NOBP.md` (the headline this hardware underwrites).
+
+## A. Forward path (free phase = the inference pass)
+
+| # | Component | Computes | Analog primitive | Reuse source (no tapeout) | Feedback path (nudged phase) | Tolerance status |
+|---|---|---|---|---|---|---|
+| 1 | Token embedding | table lookup | **digital** (SRAM lookup + DAC line drivers) | any MCU/FPGA + DAC array | none (input boundary) | n/a |
+| 2 | RoPE | fixed per-position 2×2 rotations on q,k | **I/Q quadrature mixer**: cos/sin DDS + multiplying DACs | century-old RF practice; COTS mixer/DDS chips | transpose = rotation by −θ — **same mixer, negated sin** | phase error ≈ position blur — expect very tolerant; **E-tier item (queued)** |
+| 3 | qkv / attn-proj / SwiGLU w1,w3,w2 / head | matrix–vector products | **crossbar arrays** (the bulk of all compute) | Demo-0/1: **SRAM-CIM (Shanbhag DIMA class)**; alternatives: Mythic flash CIM, IBM HERMES PCM eval | J^T reads = **bidirectional crossbar access** (the known PAR price; standard in every analog-EP proposal) | wq8 safe / wq6 marginal (looped-era static-tolerance); **re-run on cascade in E-tier** |
+| 4 | QK-norm (full-width RMS) | q,k ← q/rms(q)·g | **divisive normalization**: square-law devices + KCL current sum + divider/AGC | same primitive class as softmax normalization periphery | Jacobian symmetric — self-transpose, no extra hardware | divider mismatch/offset — **E-tier item (queued)** |
+| 5 | Softmax (causal) | exp + row-normalize | **Elfadel–Wyatt "entropic resistor"**: subthreshold-exp devices + KCL normalization (log-sum-exp co-content) | classic analog-VLSI circuit family; small arrays demonstrated | softmax Jacobian diag(p)−pp^T is symmetric; the QKV coupling around it is the non-reciprocal part | ±1% device mismatch → ±1% softmax error (linear); QK-norm bounds its input range. Dynamic-noise cliff (fnoise ≥1e-3, looped-era) **re-test on cascade = E-tier** |
+| 6 | SwiGLU gate | silu(w1x) ⊙ (w3x) | sigmoid = differential pair (native); ⊙ = **Gilbert/translinear multiplier** per unit | textbook standard cells | transpose of ⊙ = multiply by the partner signal — cheap | per-multiply mismatch/noise, 1408 wide — **E-tier item (queued)** |
+| 7 | RMSNorm ×2 per block (norm-after-sublayer) | bound each sublayer output | divisive normalization (as #4), **no mean-subtraction path** (cheaper than LayerNorm) | same as #4 | symmetric Jacobian | as #4; ~4L+1 normalizers total = the largest NEW periphery count |
+| 8 | Residual stream | z + branch outputs | **current-summing bus (KCL node)** | wires | pass-through | norm-after bounds every injection — the arch change is itself the tolerance fix |
+| 9 | Final RMSNorm | bound pre-readout state | as #4 | as #4 | symmetric | bounds the **ADC** dynamic range at the digital boundary |
+| 10 | LM head + CE + sampling | logits, loss | **digital** (ADC → digital head) | GPU/FPGA at the boundary | the top nudge −β·∇CE is computed digitally and injected as a **force via DACs** | ADC bits vs late-training SNR: couples to the β-floor story (see C.3) |
+
+## B. Training machinery (EP two-phase; nothing here touches inference)
+
+| # | Component | Computes | Analog/digital split | Notes |
+|---|---|---|---|---|
+| 11 | Free phase | plain forward | pure analog settle (A.1–A.9) | = the inference pass; zero relaxation by construction (cascade) |
+| 12 | Nudged relaxation (fb, K=3) | per-block feedback d_l = J_{l+1}^T d_{l+1}; state rebuild | bidirectional crossbar reads (#3) + diagonal activation-derivative gating (local sample-and-multiply) + mixer/norm transposes (#2,#4 — free) | K=3 settle cycles; kretry = "settle longer on flagged batches" = a longer integration window, natively analog |
+| 13 | Two-phase θ-readout | ∇θ = per-block energy contrast between phases | **local outer-product reads at each crossbar** (activity × co-activity), differenced across phases | the EP core; single-sided legal (free phase ∂E/∂θ ≡ 0) — one nudged settle per step |
+| 14 | β_t + floor-ramp controller | scalar nudge amplitude schedule | trivial digital scalar | the late-SNR fix (dose-response 3e-4→1e-3 measured); on hardware the analog r-indifference bonus applies: big nudges are free against multiplicative noise |
+| 15 | Drift/gn guards + kretry | reject/retry non-settled batches | residual monitor = analog comparator on ‖Δz‖; retry logic digital | wall-2 is architecture-cured (zero events over 58.8k steps); guards are belt-and-suspenders |
+| 16 | Optimizer (Adam/Muon) | parameter updates | **digital-side co-processor** (standing doctrine): digital accumulate → threshold-program crossbar writes | Muon = GPU-era choice; analog story stays factored-Adam. Write pricing (pulse count/endurance) = **E-tier item** |
+| 17 | cos telemetry gate | EP-vs-autograd check | GPU-only diagnostic; `--gate_every 0` for the audited fully-BP-free mode | does not exist on hardware |
+
+## C. The three cross-cutting physics items
+
+1. **Non-reciprocity budget.** Exactly two non-reciprocal elements in the whole stack: the QKV
+ coupling through attention, and crossbar transpose reads. Everything OLMo2 added (RoPE, RMS/QK
+ norms, gate) is symmetric-or-orthogonal — transposes reuse the same hardware. PAR wall unchanged.
+2. **Dynamic range.** Norm-after bounds every bus injection; QK-norm bounds the softmax input; final
+ RMSNorm bounds the ADC. The architecture the digital world adopted for training stability is the
+ architecture analog needs for range compliance.
+3. **Estimator SNR = the hardware constraint rehearsed in fp32.** The measured late-training SNR
+ decline (cos 0.994 at floor 1e-3; dose-response table) is the same physics as device/readout noise
+ vs nudge amplitude; the β-floor/ramp schedule developed on GPU is the chip's operating manual, and
+ ADC bits at the readout (#10) buy the same margin as β.
+
+## D. Demo scoping (reuse-doctrine currency)
+
+- **Demo-0 (spec target of E-tier):** single cascade block, SRAM-CIM eval module + FPGA harness +
+ COTS mixer/DAC/ADC periphery; goal = demonstrate the two-phase θ-read on one block with measured
+ tolerances. Board-BOM class: $5–20k.
+- **Demo-1:** time-multiplex ONE physical trainable block through L logical positions (cascade's
+ per-block locality makes depth a **memory line-item**, not a silicon line-item); digital-side Adam.
+- **E-tier queue feeding this map:** softmax dynamic-noise cliff (cascade re-test), wq8/wq6 static
+ quantization (cascade re-test), divider mismatch (#4/#7), Gilbert-gate mismatch (#6), RoPE phase
+ error (#2), write pricing (#16), QK-norm vs tanh-logit-softcap A/B, error-channel SNR ledger.