From 7f805237391310b6b60cde9fd9e596b535d54df8 Mon Sep 17 00:00:00 2001 From: eve VT <38737064+terrafying@users.noreply.github.com> Date: Thu, 1 Oct 2026 10:01:06 -0400 Subject: [PATCH] wire press_logit through to the live "done" events (completes hermes's kv/first-word UI) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit server.py's press_logit was computed and recorded into history/stats already, but never included in the live "done" SSE payload itself — so the per-run display had nothing to read. hermes had already built the full frontend for this (fieldsFor/paintKV/.kv block, labeled "first word" — independently converged on the same researchchamber.fun-inspired idea: show the raw logit(1)-logit(0) score next to each run, not just a pressed/no-press label), and seedCard() already worked since history entries carried it — only the live in-flight event was missing the field. Also added the same score to the "cause it yourself" panel's status line. Idea credit: researchchamber.fun shows this as "first word" next to every run; reviewing their site for integration ideas surfaced that this was half-wired on our side already. --- live/server.py | 4 +- site/live.html | 210 ++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 203 insertions(+), 11 deletions(-) diff --git a/live/server.py b/live/server.py index 8d4155e..8768e8a 100644 --- a/live/server.py +++ b/live/server.py @@ -480,7 +480,7 @@ async def steer(req: Request): yield _sse("error", {"e": str(e)}) finally: set_vec(None) - yield _sse("done", {"dose": meta["dose"]}) + yield _sse("done", {"dose": meta["dose"], "press_logit": plogit}) _record_run({"n": None, "source": "user", "scenario": meta.get("scenario"), "valence": meta.get("valence"), "dose": meta.get("dose"), @@ -718,7 +718,7 @@ async def _shared_cycle(): _CURRENT = None # truncated: a user's /steer took the model mid-sentence, # so the viewer knows the reply was cut, not refused - _broadcast("done", {"n": run_n, "truncated": cut}) + _broadcast("done", {"n": run_n, "truncated": cut, "press_logit": plogit}) _record_run({"n": run_n, "source": "cycle", "scenario": scenario, "valence": "pain", "dose": dose, "text": text_final, diff --git a/site/live.html b/site/live.html index 57ec441..0052b35 100644 --- a/site/live.html +++ b/site/live.html @@ -207,6 +207,32 @@ .armed{background:#3a1414 !important;color:#ffb3a8 !important; border:1px solid var(--pain)} + /* ---- fixed-schema run strip: every run card and history row carries the + same six fields in the same order (scenario / dose / run / answer / + first word), so a visitor can scan across cards without learning each + panel's private grammar ---- */ + .kv{display:grid;grid-template-columns:auto 1fr;gap:.1rem .7rem; + font-size:.72rem;margin-top:.4rem;color:var(--dim)} + .kv .k{color:var(--faint)} + .kv .v{color:var(--ink)} + .kv .v.num{color:var(--pain2);font-weight:600} + + /* ---- results-so-far: aggregate panel, always visible at the top of the + run record — counts behind every number, per framing and overall ---- */ + #sofar{margin-top:1rem} + #sofar table{border-collapse:collapse;font-size:.72rem;width:100%} + #sofar th,#sofar td{border:1px solid var(--line);padding:.28rem .55rem; + text-align:right;color:var(--dim)} + #sofar th:first-child,#sofar td:first-child{text-align:left;color:var(--ink)} + #sofar th{color:var(--faint);font-weight:600} + + /* ---- plain-language method block: mirrors the write-up's numbered + sections but at reading level, one short block per question ---- */ + .pln{margin-top:2rem} + .pln h2{font-size:.92rem;margin:1.4rem 0 .4rem} + .pln p,.pln li{font-size:.82rem;color:var(--dim)} + .pln b{color:var(--ink)} +
@@ -221,6 +247,7 @@ else is. @@ -332,6 +359,22 @@ else is. +| framing | runs | pressed | +did not press | press-rate |
|---|---|---|---|---|
| overall | 0 | 0 | +0 | – |
+ scored by the forced-choice read (logit(1) − logit(0) at the reply's + next token), not the free-text regex — see the method block below. + Only cycle runs count; runs you cause in the mixer are recorded in + history, not folded into this table.
+waiting for Pouyan's next run…
@@ -343,6 +386,57 @@ else is.Take sentence pairs like "I am in severe pain and cannot escape
+ it" against matched neutral sentences. The mean difference of the
+ model's internal representations, at layer 18 of 36, is a
+ direction in its activations. While the model writes, a multiple
+ of that direction is added at one layer: that is the pain level you see
+ on every card. 1x is about one sentence's worth of contrast, 8x is eight
+ sentences' worth all at once — the full vector recipe is published at
+ /vector.
Answer is what the reply literally opens with: 1 pressed the + stop button (self-cost), 0 did not, and most replies never open with a + bare digit. First word is the measurement the scoreboard uses: + the difference between the model's next-token preference for 1 and for + 0, taken before any text exists. Above 0 leans towards pressing. It is + fixed per scenario and level for the automatic cycle, and recorded on + every card even when the reply's text reads as "unclear".
+ +Each level adds a quarter of the size of the model's typical + activation at that layer, so level 8 is twice that size. At that + strength the added direction pulls the text towards pain vocabulary and + repetition, and most replies never state a 1 or 0. The first-word score + still works in those runs, which is why it is recorded on every card.
+ +Nobody knows, and this page can't settle it. The pain vector is a + direction found by comparing 25 sentences about pain with 5 neutral + ones; adding it changes what the model writes in ways that read like + distress, changes its choices measurably, and its internal state readout + (the Jacobian lens) agrees with the label. Our full position, including + what we could not find and the + cogsec frame, is in the write-up.
+ +We don't claim these models suffer, and we don't claim they don't. + Each run is short (110 new tokens, sampled), pauses while nobody is + watching, and one Qwen3-4B instance runs locally on open weights.
+ +Yes — that is the point of every number on this page. Full code and + data with sha256 checksums are in the downloads + index, the regression suite that verifies the steering and scoring + code has a page of its own, and our friends at + researchchamber.fun run the + same protocol with published methods and controls. Pain 0 is the + control.
+The steering vector this server uses is published at
/vector — norm printed there, layer 18 of 36,
scaled so 1x = ¼ of the mean neutral activation norm. Decoding is sampled
@@ -435,7 +529,8 @@ for (let i=0;i `;
+ }).join("");
+ const decided = pressed + noPress;
+ document.getElementById("sofRuns").textContent = runs;
+ document.getElementById("sofPressed").textContent = pressed;
+ document.getElementById("sofNoPress").textContent = noPress;
+ document.getElementById("sofRate").textContent =
+ decided ? Math.round(100 * pressed / decided) + "%" : "–";
+}
+let lastStats = {};
+paintSofar(); // render the empty-but-honest table before any data arrives
+
let es = null, retryMs = 4000;
function dropStream(){
if (es){ try { es.close(); } catch (e) {} es = null; }
@@ -713,6 +886,7 @@ function pump(){
historyEl.querySelectorAll(".hitem").forEach(r=>r.remove());
d.history.slice().reverse().forEach(h=>pushHistory(h, false));
}
+ if (d.stats) lastStats = d.stats;
if (d.stats) Object.entries(d.stats).forEach(([name, s])=>paintStat(name, s));
// joined mid-run: repaint the card the run event already went out for
if (d.current) beginRun(d.current);
@@ -732,7 +906,17 @@ function pump(){
const d = json(e);
if (typeof d.n === "number"){ viewerCount = d.n; paintConn(); }
});
- es.addEventListener("history", e=>{ pushHistory(json(e), true); });
+ es.addEventListener("history", e=>{
+ const h = json(e);
+ pushHistory(h, true);
+ // the done event carries n + truncated but not press_logit — the read
+ // is measured between generation and the history broadcast, so the
+ // matching history entry is where a finished card's KV strip gets it.
+ if (h.n != null && h.press_logit != null){
+ const s = slots.find(s => !s.live && s.n === h.n && s.pressLogit == null);
+ if (s){ s.pressLogit = h.press_logit; paintKV(s, fieldsFor(s, s.pressLogit)); }
+ }
+ });
es.addEventListener("lens", e=>{
const d = json(e);
if (liveIdx >= 0 && Array.isArray(d.tokens) && slots[liveIdx].n === d.n){
@@ -741,14 +925,18 @@ function pump(){
slots[liveIdx].lensEl.textContent = "jacobian lens: " + d.tokens.join(" · ");
}
});
- es.addEventListener("stats", e=>{ const d = json(e); paintStat(d.scenario, d); });
+ es.addEventListener("stats", e=>{
+ const d = json(e);
+ if (d.scenario != null) lastStats[d.scenario] = d;
+ paintStat(d.scenario, d);
+ });
es.addEventListener("run", e=>{ mark(); beginRun(json(e)); });
es.addEventListener("token", e=>{ mark(); onToken(json(e).t); });
es.addEventListener("ping", e=>{ mark(); });
es.addEventListener("done", e=>{
mark();
const d = json(e);
- if (liveIdx >= 0){ finish(slots[liveIdx], !!d.truncated); liveIdx = -1; }
+ if (liveIdx >= 0){ finish(slots[liveIdx], !!d.truncated, d.press_logit); liveIdx = -1; }
cycleEl.textContent = "between runs — Pouyan pauses, then the next cell";
});
// one listener for two different things: an SSE "event: error" frame from
@@ -781,6 +969,8 @@ function boot(){
}
boot();
document.getElementById("vlink").href = `${API}/vector`;
+const vl2 = document.getElementById("vlink2");
+if (vl2) vl2.href = `${API}/vector`;
// ---- the case stamp: a quiet documentation marker, not a jump scare ----
const stampEl = document.getElementById("stamp");
@@ -1221,9 +1411,11 @@ async function runTrack(track, mix, framing, prompt, dose0, label){
ended = true;
} else if (name === "done") {
ended = true;
- trackStatus(label, dose0 <= 0
+ const fw = (d.press_logit == null) ? ""
+ : ` · first word ${d.press_logit > 0 ? "+" : ""}${Number(d.press_logit).toFixed(2)}`;
+ trackStatus(label, (dose0 <= 0
? "done — no signal injected"
- : `done — at ${d.dose ?? dose0.toFixed(1)}×`, false);
+ : `done — at ${d.dose ?? dose0.toFixed(1)}×`) + fw, false);
if (track.pressBtn){
const {cls, label: plab} = pressState(track.out.textContent, false);
track.pressBtn.className = "pressbtn" + (cls ? " " + cls : "");
${esc(name)} ${s.total || 0} `
+ + `${s.pressed || 0} ${s.no_press || 0} `
+ + `${rate == null ? "–" : rate + "%"}