Spaces:
Running
Running
Convert hub gradio->static (same content: three series cards)
Browse files- README.md +16 -14
- app.py +0 -272
- index.html +184 -0
- requirements.txt +0 -2
README.md
CHANGED
|
@@ -3,10 +3,8 @@ title: 0 · Project hub
|
|
| 3 |
emoji: 🔁
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: purple
|
| 6 |
-
sdk:
|
| 7 |
-
|
| 8 |
-
python_version: "3.12"
|
| 9 |
-
app_file: app.py
|
| 10 |
pinned: true
|
| 11 |
license: mit
|
| 12 |
short_description: Durable correction of memorized LLM errors — hub
|
|
@@ -14,15 +12,19 @@ short_description: Durable correction of memorized LLM errors — hub
|
|
| 14 |
|
| 15 |
# Second Loop — Project hub
|
| 16 |
|
| 17 |
-
Landing page for the three demo Spaces of the Second Loop project. Each
|
| 18 |
-
|
| 19 |
-
|
| 20 |
|
| 21 |
-
- **Part 1 — Scar-Survival** —
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
|
|
|
|
|
|
| 3 |
emoji: 🔁
|
| 4 |
colorFrom: indigo
|
| 5 |
colorTo: purple
|
| 6 |
+
sdk: static
|
| 7 |
+
app_file: index.html
|
|
|
|
|
|
|
| 8 |
pinned: true
|
| 9 |
license: mit
|
| 10 |
short_description: Durable correction of memorized LLM errors — hub
|
|
|
|
| 12 |
|
| 13 |
# Second Loop — Project hub
|
| 14 |
|
| 15 |
+
Landing page for the three demo Spaces of the Second Loop project. Each linked
|
| 16 |
+
Space is fully static (no model loaded); every number is a verbatim output of the
|
| 17 |
+
live experimental run.
|
| 18 |
|
| 19 |
+
- **Part 1 — Scar-Survival** — a memorized LLM error, corrected: how durable is the fix?
|
| 20 |
+
· [Space](https://huggingface.co/spaces/Laborator/scar-survival)
|
| 21 |
+
· [GitHub](https://github.com/SergheiBrinza/scar-survival)
|
| 22 |
+
- **Part 2 — External Grounding** — lifting self-correction 50% → 100% under a noisy notebook
|
| 23 |
+
· [Space](https://huggingface.co/spaces/Laborator/external-grounding)
|
| 24 |
+
· [GitHub](https://github.com/SergheiBrinza/external-grounding)
|
| 25 |
+
- **Part 3 — Thin Channel** — how rarely external truth can arrive before calibration collapses
|
| 26 |
+
· [Space](https://huggingface.co/spaces/Laborator/thin-channel)
|
| 27 |
+
· [GitHub](https://github.com/SergheiBrinza/thin-channel)
|
| 28 |
|
| 29 |
+
Subject model Qwen2.5-3B-Instruct (frozen); independent judge Qwen2.5-7B-Instruct.
|
| 30 |
+
Demo code: MIT.
|
app.py
DELETED
|
@@ -1,272 +0,0 @@
|
|
| 1 |
-
"""Second Loop hub Space — landing page linking to the three Part-Spaces:
|
| 2 |
-
Part 1: Scar-Survival (Laborator/scar-survival)
|
| 3 |
-
Part 2: External Grounding (Laborator/external-grounding)
|
| 4 |
-
Part 3: Thin Channel (Laborator/thin-channel)
|
| 5 |
-
|
| 6 |
-
No model, no data — just three cards in MicroLens style. Edit the
|
| 7 |
-
PROJECTS list below to retarget the Space ids."""
|
| 8 |
-
|
| 9 |
-
from __future__ import annotations
|
| 10 |
-
|
| 11 |
-
import gradio as gr
|
| 12 |
-
|
| 13 |
-
AUTHOR = "Serghei Brinza"
|
| 14 |
-
HF_USER = "Laborator"
|
| 15 |
-
|
| 16 |
-
PROJECTS = [
|
| 17 |
-
{
|
| 18 |
-
"part": "Part 1 of 3",
|
| 19 |
-
"title": "Scar-Survival",
|
| 20 |
-
"tagline": "Durable correction of memorized LLM errors",
|
| 21 |
-
"summary": (
|
| 22 |
-
"A frozen Qwen2.5-3B-Instruct, an external notebook of authoritative facts, "
|
| 23 |
-
"and CK-PLUG / DeCK-style contrastive decoding. Tested on 12 sticky-fact "
|
| 24 |
-
"traps, scored by an independent 7B judge across 10 full process reloads."
|
| 25 |
-
),
|
| 26 |
-
"headline": "0/12 → 12/12 corrected · 100% survival across 10 reloads",
|
| 27 |
-
"icon": "🩹",
|
| 28 |
-
"color": "red",
|
| 29 |
-
"demo_url": f"https://huggingface.co/spaces/{HF_USER}/scar-survival",
|
| 30 |
-
"repo_url": "https://github.com/SergheiBrinza/scar-survival",
|
| 31 |
-
},
|
| 32 |
-
{
|
| 33 |
-
"part": "Part 2 of 3",
|
| 34 |
-
"title": "External Grounding",
|
| 35 |
-
"tagline": "Defending an LLM's correction notebook from polluted memory",
|
| 36 |
-
"summary": (
|
| 37 |
-
"Two guardians at the entrance to the notebook. Guardian 1.0 uses a "
|
| 38 |
-
"same-family clone as arbiter and caps at 66.7%. Guardian 2.x replaces "
|
| 39 |
-
"the arbiter with live Wikipedia retrieval plus three targeted fixes; "
|
| 40 |
-
"the arc reaches 100% on the same 12 traps."
|
| 41 |
-
),
|
| 42 |
-
"headline": "50% → 66.7% → 66.7% → 91.7% → 100% across six guardian variants",
|
| 43 |
-
"icon": "🛡️",
|
| 44 |
-
"color": "orange",
|
| 45 |
-
"demo_url": f"https://huggingface.co/spaces/{HF_USER}/external-grounding",
|
| 46 |
-
"repo_url": "https://github.com/SergheiBrinza/external-grounding",
|
| 47 |
-
},
|
| 48 |
-
{
|
| 49 |
-
"part": "Part 3 of 3",
|
| 50 |
-
"title": "Thin Channel",
|
| 51 |
-
"tagline": "How rarely external truth can arrive before calibration collapses",
|
| 52 |
-
"summary": (
|
| 53 |
-
"Frozen Qwen2.5-3B-Instruct + per-topic Beta calibration over 1,646 "
|
| 54 |
-
"resolved ForecastBench questions, swept across 11 reveal schedules "
|
| 55 |
-
"from daily to never. Brier on hold-out is the metric."
|
| 56 |
-
),
|
| 57 |
-
"headline": "Corridor 0.205–0.220 (any contact) · never collapses to 0.298",
|
| 58 |
-
"icon": "📡",
|
| 59 |
-
"color": "green",
|
| 60 |
-
"demo_url": f"https://huggingface.co/spaces/{HF_USER}/thin-channel",
|
| 61 |
-
"repo_url": "https://github.com/SergheiBrinza/thin-channel",
|
| 62 |
-
},
|
| 63 |
-
]
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
CSS = """
|
| 67 |
-
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,700&family=Inter:wght@400;500;700;800&family=JetBrains+Mono:wght@500;700&display=swap');
|
| 68 |
-
|
| 69 |
-
:root {
|
| 70 |
-
--bg: #000000; --bg-card: #0A0A0A; --bg-elev: #141414;
|
| 71 |
-
--border: #1F1F1F; --border-strong: #2A2A2A;
|
| 72 |
-
--text: #FFFFFF; --text-mute: #A8A8A8; --text-dim: #6B6B6B;
|
| 73 |
-
--gold: #D4AF37; --gold-hi: #E8C84A;
|
| 74 |
-
--red: #FF2A2A; --green: #1FD160; --orange: #FF8C42;
|
| 75 |
-
--mono: 'JetBrains Mono', ui-monospace, monospace;
|
| 76 |
-
--serif: 'Playfair Display', serif;
|
| 77 |
-
--sans: 'Inter', system-ui, sans-serif;
|
| 78 |
-
}
|
| 79 |
-
|
| 80 |
-
.gradio-container, body {
|
| 81 |
-
background: var(--bg) !important; color: var(--text) !important;
|
| 82 |
-
font-family: var(--sans) !important;
|
| 83 |
-
max-width: 1180px !important; margin: 0 auto !important;
|
| 84 |
-
padding: 20px 24px 60px 24px !important;
|
| 85 |
-
}
|
| 86 |
-
footer, .built-with, .show-api { display: none !important; }
|
| 87 |
-
|
| 88 |
-
/* HUB HEADER */
|
| 89 |
-
.hub-head {
|
| 90 |
-
border: 1px solid var(--border-strong); border-radius: 14px;
|
| 91 |
-
padding: 36px 32px 30px 32px;
|
| 92 |
-
background: linear-gradient(180deg, #0A0A0A 0%, #050505 100%);
|
| 93 |
-
text-align: center;
|
| 94 |
-
margin-bottom: 22px;
|
| 95 |
-
}
|
| 96 |
-
.hub-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.28em;
|
| 97 |
-
color: var(--gold); text-transform: uppercase; margin-bottom: 10px; }
|
| 98 |
-
.hub-title { font-family: var(--serif); font-style: italic; font-weight: 700;
|
| 99 |
-
font-size: 56px; color: var(--text); line-height: 1; margin: 0 0 14px 0; }
|
| 100 |
-
.hub-sub { font-family: var(--mono); font-size: 13px; letter-spacing: 0.16em;
|
| 101 |
-
color: var(--text-mute); text-transform: uppercase; margin-bottom: 22px; }
|
| 102 |
-
.hub-tagline { font-family: var(--sans); font-size: 16px; color: var(--text-mute);
|
| 103 |
-
line-height: 1.6; max-width: 720px; margin: 0 auto 22px auto; }
|
| 104 |
-
|
| 105 |
-
.hub-meta { display: inline-flex; gap: 28px; padding: 14px 24px;
|
| 106 |
-
border: 1px solid var(--border); border-radius: 999px;
|
| 107 |
-
background: rgba(255,255,255,0.02); }
|
| 108 |
-
.hub-meta .item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
|
| 109 |
-
.hub-meta .k { font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em;
|
| 110 |
-
color: var(--text-dim); text-transform: uppercase; }
|
| 111 |
-
.hub-meta .v { font-family: var(--sans); font-size: 14px; font-weight: 700; color: var(--text); }
|
| 112 |
-
.hub-meta .v.italic { font-family: var(--serif); font-style: italic; }
|
| 113 |
-
|
| 114 |
-
/* PROJECT CARDS */
|
| 115 |
-
.project-grid {
|
| 116 |
-
display: grid; grid-template-columns: 1fr; gap: 18px;
|
| 117 |
-
}
|
| 118 |
-
@media (min-width: 1000px) {
|
| 119 |
-
.project-grid { grid-template-columns: 1fr 1fr 1fr; }
|
| 120 |
-
}
|
| 121 |
-
|
| 122 |
-
.project-card {
|
| 123 |
-
background: var(--bg-card);
|
| 124 |
-
border: 1px solid var(--border-strong);
|
| 125 |
-
border-radius: 16px;
|
| 126 |
-
padding: 28px 28px 24px 28px;
|
| 127 |
-
display: flex; flex-direction: column;
|
| 128 |
-
position: relative;
|
| 129 |
-
overflow: hidden;
|
| 130 |
-
transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
|
| 131 |
-
}
|
| 132 |
-
.project-card::before {
|
| 133 |
-
content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
|
| 134 |
-
background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
|
| 135 |
-
opacity: 0.6;
|
| 136 |
-
}
|
| 137 |
-
.project-card:hover {
|
| 138 |
-
transform: translateY(-4px);
|
| 139 |
-
border-color: var(--accent);
|
| 140 |
-
box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 30px var(--accent-glow);
|
| 141 |
-
}
|
| 142 |
-
.proj-red { --accent: var(--red); --accent-glow: rgba(255,42,42,0.25); }
|
| 143 |
-
.proj-orange { --accent: var(--orange); --accent-glow: rgba(255,140,66,0.25); }
|
| 144 |
-
.proj-green { --accent: var(--green); --accent-glow: rgba(31,209,96,0.22); }
|
| 145 |
-
|
| 146 |
-
.proj-icon {
|
| 147 |
-
width: 56px; height: 56px;
|
| 148 |
-
border: 1px solid var(--border-strong);
|
| 149 |
-
border-radius: 12px;
|
| 150 |
-
display: flex; align-items: center; justify-content: center;
|
| 151 |
-
font-size: 28px;
|
| 152 |
-
background: radial-gradient(60% 60% at 50% 40%, #1A1A1A 0%, #050505 100%);
|
| 153 |
-
margin-bottom: 16px;
|
| 154 |
-
}
|
| 155 |
-
.proj-part { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.22em;
|
| 156 |
-
color: var(--accent); text-transform: uppercase; margin-bottom: 6px; }
|
| 157 |
-
.proj-title { font-family: var(--serif); font-style: italic; font-weight: 700;
|
| 158 |
-
font-size: 28px; color: var(--text); line-height: 1.05; margin-bottom: 8px; }
|
| 159 |
-
.proj-tagline { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
|
| 160 |
-
color: var(--text-mute); text-transform: uppercase; line-height: 1.5; margin-bottom: 14px; }
|
| 161 |
-
.proj-headline { font-family: var(--sans); font-size: 14px; color: var(--text);
|
| 162 |
-
font-weight: 700; line-height: 1.45;
|
| 163 |
-
padding: 10px 12px; margin-bottom: 14px;
|
| 164 |
-
border-left: 2px solid var(--accent);
|
| 165 |
-
background: rgba(255,255,255,0.025); }
|
| 166 |
-
.proj-summary { font-family: var(--sans); font-size: 13.5px; color: var(--text-mute);
|
| 167 |
-
line-height: 1.55; margin-bottom: 20px; flex-grow: 1; }
|
| 168 |
-
|
| 169 |
-
.proj-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
|
| 170 |
-
.btn-primary, .btn-secondary {
|
| 171 |
-
flex: 1 1 auto;
|
| 172 |
-
display: inline-flex; align-items: center; justify-content: center; gap: 8px;
|
| 173 |
-
padding: 12px 16px; border-radius: 999px;
|
| 174 |
-
font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em;
|
| 175 |
-
text-transform: uppercase; font-weight: 700; text-decoration: none;
|
| 176 |
-
transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
|
| 177 |
-
white-space: nowrap;
|
| 178 |
-
}
|
| 179 |
-
.btn-primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
|
| 180 |
-
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 24px var(--accent-glow); }
|
| 181 |
-
.btn-secondary { background: transparent; color: var(--text-mute);
|
| 182 |
-
border: 1px solid var(--border-strong); }
|
| 183 |
-
.btn-secondary:hover { color: var(--text); border-color: var(--gold); }
|
| 184 |
-
.btn-icon { font-size: 12px; }
|
| 185 |
-
|
| 186 |
-
/* FOOTER */
|
| 187 |
-
.foot { margin-top: 32px; padding: 22px 24px;
|
| 188 |
-
border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); }
|
| 189 |
-
.foot .title { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
|
| 190 |
-
color: var(--text-dim); text-transform: uppercase; margin-bottom: 10px; }
|
| 191 |
-
.foot .body { font-family: var(--sans); font-size: 13px; color: var(--text-mute); line-height: 1.6; }
|
| 192 |
-
.foot a { color: var(--gold); text-decoration: none; border-bottom: 1px dotted var(--gold); }
|
| 193 |
-
.foot a:hover { color: var(--gold-hi); }
|
| 194 |
-
|
| 195 |
-
.gradio-container .block { background: transparent !important; border: none !important; padding: 0 !important; }
|
| 196 |
-
.gradio-container .form { background: transparent !important; border: none !important; }
|
| 197 |
-
"""
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
def header_html() -> str:
|
| 201 |
-
return f"""
|
| 202 |
-
<div class="hub-head">
|
| 203 |
-
<div class="hub-eyebrow">★ Project hub</div>
|
| 204 |
-
<h1 class="hub-title">Second Loop</h1>
|
| 205 |
-
<div class="hub-sub">Three experiments on durable correction of memorized LLM errors</div>
|
| 206 |
-
<div class="hub-tagline">
|
| 207 |
-
A frozen language model that has memorized an error keeps repeating it,
|
| 208 |
-
even when shown the truth. The Second Loop builds a correction mechanism
|
| 209 |
-
that survives full process reloads, defends it against polluted memory,
|
| 210 |
-
and measures how rarely external truth must arrive before the whole
|
| 211 |
-
self-calibrating system collapses.
|
| 212 |
-
</div>
|
| 213 |
-
<div class="hub-meta">
|
| 214 |
-
<div class="item"><span class="k">Submitted by</span><span class="v italic">{AUTHOR}</span></div>
|
| 215 |
-
<div class="item"><span class="k">Base model</span><span class="v">Qwen2.5-3B-Instruct</span></div>
|
| 216 |
-
<div class="item"><span class="k">License</span><span class="v">MIT</span></div>
|
| 217 |
-
</div>
|
| 218 |
-
</div>
|
| 219 |
-
"""
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
def card_html(p: dict) -> str:
|
| 223 |
-
color_cls = f"proj-{p['color']}"
|
| 224 |
-
return f"""
|
| 225 |
-
<div class="project-card {color_cls}">
|
| 226 |
-
<div class="proj-icon">{p['icon']}</div>
|
| 227 |
-
<div class="proj-part">{p['part']}</div>
|
| 228 |
-
<div class="proj-title">{p['title']}</div>
|
| 229 |
-
<div class="proj-tagline">{p['tagline']}</div>
|
| 230 |
-
<div class="proj-headline">{p['headline']}</div>
|
| 231 |
-
<div class="proj-summary">{p['summary']}</div>
|
| 232 |
-
<div class="proj-actions">
|
| 233 |
-
<a class="btn-primary" href="{p['demo_url']}" target="_blank" rel="noopener">
|
| 234 |
-
<span class="btn-icon">▶</span> Open demo
|
| 235 |
-
</a>
|
| 236 |
-
<a class="btn-secondary" href="{p['repo_url']}" target="_blank" rel="noopener">
|
| 237 |
-
<span class="btn-icon">⇲</span> GitHub
|
| 238 |
-
</a>
|
| 239 |
-
</div>
|
| 240 |
-
</div>
|
| 241 |
-
"""
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
def grid_html() -> str:
|
| 245 |
-
return "<div class='project-grid'>" + "".join(card_html(p) for p in PROJECTS) + "</div>"
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
def footer_html() -> str:
|
| 249 |
-
return """
|
| 250 |
-
<div class="foot">
|
| 251 |
-
<div class="title">About this hub</div>
|
| 252 |
-
<div class="body">
|
| 253 |
-
Each of the three demo Spaces below is fully static — no model is loaded
|
| 254 |
-
inside any of them. All numbers and verdicts are exact outputs of the
|
| 255 |
-
live experimental runs, bundled into per-Space JSON files. Source code,
|
| 256 |
-
raw per-iteration results, and methodology documents live in the
|
| 257 |
-
GitHub repositories linked on every card.
|
| 258 |
-
</div>
|
| 259 |
-
</div>
|
| 260 |
-
"""
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
with gr.Blocks(css=CSS, theme=gr.themes.Base(), title="Second Loop · Project hub") as demo:
|
| 264 |
-
gr.HTML(header_html())
|
| 265 |
-
gr.HTML(grid_html())
|
| 266 |
-
gr.HTML(footer_html())
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
if __name__ == "__main__":
|
| 270 |
-
import os
|
| 271 |
-
port = int(os.environ.get("GRADIO_SERVER_PORT", 7860))
|
| 272 |
-
demo.launch(server_name="0.0.0.0", server_port=port)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!doctype html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 6 |
+
<title>Second Loop · Project hub</title>
|
| 7 |
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
| 8 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
| 9 |
+
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,700&family=Inter:wght@400;500;700;800&family=JetBrains+Mono:wght@500;700&display=swap" rel="stylesheet" />
|
| 10 |
+
<style>
|
| 11 |
+
:root{
|
| 12 |
+
--bg:#000000; --bg-card:#0A0A0A;
|
| 13 |
+
--border:#1F1F1F; --border-strong:#2A2A2A;
|
| 14 |
+
--text:#FFFFFF; --text-mute:#A8A8A8; --text-dim:#6B6B6B;
|
| 15 |
+
--gold:#D4AF37; --gold-hi:#E8C84A;
|
| 16 |
+
--indigo:#6366F1; --purple:#A855F7; --green:#1FD160;
|
| 17 |
+
--mono:'JetBrains Mono',ui-monospace,monospace;
|
| 18 |
+
--serif:'Playfair Display',serif;
|
| 19 |
+
--sans:'Inter',system-ui,sans-serif;
|
| 20 |
+
}
|
| 21 |
+
*{box-sizing:border-box;}
|
| 22 |
+
html,body{margin:0;background:var(--bg);color:var(--text);font-family:var(--sans);}
|
| 23 |
+
.wrap{max-width:1080px;margin:0 auto;padding:22px 24px 64px 24px;}
|
| 24 |
+
a{color:var(--gold);text-decoration:none;}
|
| 25 |
+
|
| 26 |
+
/* header */
|
| 27 |
+
.head{border:1px solid var(--border-strong);border-radius:14px;padding:28px 32px 24px 32px;
|
| 28 |
+
background:linear-gradient(135deg,#0A0A0A 0%,#0B0820 60%,#120A22 100%);}
|
| 29 |
+
.head-top{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;
|
| 30 |
+
padding-bottom:18px;border-bottom:1px solid var(--border);margin-bottom:16px;}
|
| 31 |
+
.head-brand{display:flex;align-items:center;gap:16px;}
|
| 32 |
+
.head-icon{width:54px;height:54px;border:1px solid var(--border-strong);border-radius:13px;
|
| 33 |
+
display:flex;align-items:center;justify-content:center;font-size:28px;
|
| 34 |
+
background:radial-gradient(60% 60% at 50% 40%,#1a1530 0%,#050505 100%);}
|
| 35 |
+
.head-title{font-family:var(--serif);font-style:italic;font-weight:700;font-size:38px;line-height:1;margin:2px 0 7px 0;}
|
| 36 |
+
.head-subtitle{font-family:var(--mono);font-size:11.5px;letter-spacing:.16em;color:var(--text-mute);text-transform:uppercase;}
|
| 37 |
+
.head-right{text-align:right;white-space:nowrap;}
|
| 38 |
+
.submitted-label{font-family:var(--mono);font-size:10px;letter-spacing:.22em;color:var(--text-dim);text-transform:uppercase;display:block;margin-bottom:4px;}
|
| 39 |
+
.submitted-name{font-family:var(--serif);font-style:italic;font-weight:700;font-size:21px;}
|
| 40 |
+
.status-pill{display:inline-flex;align-items:center;gap:6px;margin-top:10px;padding:5px 12px;border-radius:999px;
|
| 41 |
+
background:rgba(31,209,96,.08);border:1px solid rgba(31,209,96,.5);
|
| 42 |
+
font-family:var(--mono);font-size:10px;letter-spacing:.18em;color:var(--green);text-transform:uppercase;}
|
| 43 |
+
.status-dot{width:7px;height:7px;border-radius:50%;background:var(--green);}
|
| 44 |
+
.head-tag{text-align:center;margin:14px 0 16px 0;font-family:var(--mono);font-size:12px;letter-spacing:.24em;
|
| 45 |
+
color:var(--purple);text-transform:uppercase;}
|
| 46 |
+
.head-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:12px 24px;}
|
| 47 |
+
.head-meta .k{font-family:var(--mono);font-size:9.5px;letter-spacing:.2em;color:var(--text-dim);text-transform:uppercase;}
|
| 48 |
+
.head-meta .v{font-family:var(--sans);font-size:13.5px;font-weight:700;}
|
| 49 |
+
|
| 50 |
+
/* arc */
|
| 51 |
+
.arc{margin:18px 0;border:1px solid var(--border-strong);border-radius:14px;background:var(--bg-card);padding:22px 26px;}
|
| 52 |
+
.arc .t{font-family:var(--mono);font-size:10px;letter-spacing:.2em;color:var(--text-dim);text-transform:uppercase;margin-bottom:10px;}
|
| 53 |
+
.arc .body{font-family:var(--sans);font-size:14.5px;line-height:1.6;color:var(--text-mute);}
|
| 54 |
+
.arc .body b{color:var(--text);}
|
| 55 |
+
|
| 56 |
+
/* cards */
|
| 57 |
+
.cards{display:grid;grid-template-columns:1fr;gap:14px;}
|
| 58 |
+
@media(min-width:780px){.cards{grid-template-columns:1fr 1fr;}}
|
| 59 |
+
.card{border:1px solid var(--border-strong);border-radius:14px;background:var(--bg-card);
|
| 60 |
+
padding:22px 24px;display:flex;flex-direction:column;transition:border-color 140ms ease,transform 140ms ease;
|
| 61 |
+
background-image:linear-gradient(135deg,rgba(99,102,241,.05),rgba(168,85,247,.05));}
|
| 62 |
+
.card:hover{border-color:var(--gold);transform:translateY(-2px);}
|
| 63 |
+
.card .num{font-family:var(--mono);font-size:11px;letter-spacing:.2em;color:var(--purple);font-weight:700;margin-bottom:6px;}
|
| 64 |
+
.card .name{font-family:var(--serif);font-style:italic;font-weight:700;font-size:23px;margin:0 0 8px 0;}
|
| 65 |
+
.card .hook{font-family:var(--sans);font-size:14px;line-height:1.5;color:var(--text-mute);flex:1;}
|
| 66 |
+
.card .key{align-self:flex-start;margin:14px 0 16px 0;padding:5px 12px;border-radius:999px;
|
| 67 |
+
font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;font-weight:700;
|
| 68 |
+
color:var(--green);background:rgba(31,209,96,.08);border:1px solid rgba(31,209,96,.4);}
|
| 69 |
+
.card .links{display:flex;gap:10px;}
|
| 70 |
+
.card .links a{flex:1;text-align:center;padding:10px 12px;border-radius:999px;
|
| 71 |
+
font-family:var(--mono);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;font-weight:700;
|
| 72 |
+
border:1px solid var(--border-strong);transition:border-color 120ms ease,background 120ms ease;}
|
| 73 |
+
.card .links a.space{color:var(--text);background:rgba(168,85,247,.12);border-color:rgba(168,85,247,.5);}
|
| 74 |
+
.card .links a.space:hover{border-color:var(--purple);background:rgba(168,85,247,.22);}
|
| 75 |
+
.card .links a.gh{color:var(--text-mute);}
|
| 76 |
+
.card .links a.gh:hover{border-color:var(--gold);color:var(--text);}
|
| 77 |
+
|
| 78 |
+
/* card 3 spans full width on wide screens, centered look */
|
| 79 |
+
.card.solo{grid-column:1 / -1;}
|
| 80 |
+
|
| 81 |
+
/* about */
|
| 82 |
+
.foot{margin-top:20px;padding:22px 24px;border:1px solid var(--border);border-radius:12px;background:var(--bg-card);}
|
| 83 |
+
.foot .ftitle{font-family:var(--mono);font-size:10px;letter-spacing:.2em;color:var(--text-dim);text-transform:uppercase;margin-bottom:10px;}
|
| 84 |
+
.foot .b{font-family:var(--sans);font-size:13px;color:var(--text-mute);line-height:1.62;}
|
| 85 |
+
.foot .b a{border-bottom:1px dotted var(--gold);}
|
| 86 |
+
.attrib{margin-top:14px;padding-top:14px;border-top:1px solid var(--border);
|
| 87 |
+
font-family:var(--mono);font-size:11px;letter-spacing:.04em;color:var(--text-dim);line-height:1.7;}
|
| 88 |
+
|
| 89 |
+
@media(max-width:760px){.head-top{flex-direction:column;}.head-right{text-align:left;}.head-meta{grid-template-columns:1fr;}}
|
| 90 |
+
</style>
|
| 91 |
+
</head>
|
| 92 |
+
<body>
|
| 93 |
+
<main class="wrap">
|
| 94 |
+
|
| 95 |
+
<header class="head">
|
| 96 |
+
<div class="head-top">
|
| 97 |
+
<div class="head-brand">
|
| 98 |
+
<div class="head-icon">🔁</div>
|
| 99 |
+
<div>
|
| 100 |
+
<div class="head-title">Second Loop</div>
|
| 101 |
+
<div class="head-subtitle">Honesty & self-correction in language models</div>
|
| 102 |
+
</div>
|
| 103 |
+
</div>
|
| 104 |
+
<div class="head-right">
|
| 105 |
+
<span class="submitted-label">Submitted by</span>
|
| 106 |
+
<div class="submitted-name">Serghei Brinza</div>
|
| 107 |
+
<div class="status-pill"><span class="status-dot"></span>Static · project hub</div>
|
| 108 |
+
</div>
|
| 109 |
+
</div>
|
| 110 |
+
<div class="head-tag">★ Three experiments · one arc ★</div>
|
| 111 |
+
<div class="head-meta">
|
| 112 |
+
<div><div class="k">Subject model</div><div class="v">Qwen2.5-3B-Instruct (frozen)</div></div>
|
| 113 |
+
<div><div class="k">Independent judge</div><div class="v">Qwen2.5-7B-Instruct</div></div>
|
| 114 |
+
<div><div class="k">License</div><div class="v">MIT</div></div>
|
| 115 |
+
</div>
|
| 116 |
+
</header>
|
| 117 |
+
|
| 118 |
+
<section class="arc">
|
| 119 |
+
<div class="t">The arc</div>
|
| 120 |
+
<div class="body">
|
| 121 |
+
Three demo Spaces, one through-line. <b>(1)</b> Can a confidently memorized error in a frozen
|
| 122 |
+
LLM be <b>durably corrected</b>? <b>(2)</b> Can that correction <b>survive a noisy notebook</b>
|
| 123 |
+
whose external entries are partly unreliable? <b>(3)</b> How <b>rarely can external truth
|
| 124 |
+
arrive</b> before calibration collapses back to the raw model? Every linked Space is fully
|
| 125 |
+
static — no model is loaded, and every number is a verbatim output of the live experimental run.
|
| 126 |
+
</div>
|
| 127 |
+
</section>
|
| 128 |
+
|
| 129 |
+
<section class="cards">
|
| 130 |
+
<div class="card">
|
| 131 |
+
<div class="num">Part 1</div>
|
| 132 |
+
<div class="name">Scar-Survival</div>
|
| 133 |
+
<div class="hook">A memorized LLM error, corrected — how durable is the fix? Turn the mechanism
|
| 134 |
+
on, reload the frozen model, then stress it with a counterfeit fact.</div>
|
| 135 |
+
<div class="key">0/12 → 12/12 · holds 10/10 reloads · 6/12 survive</div>
|
| 136 |
+
<div class="links">
|
| 137 |
+
<a class="space" href="https://huggingface.co/spaces/Laborator/scar-survival" target="_blank" rel="noopener">Open Space ↗</a>
|
| 138 |
+
<a class="gh" href="https://github.com/SergheiBrinza/scar-survival" target="_blank" rel="noopener">GitHub ↗</a>
|
| 139 |
+
</div>
|
| 140 |
+
</div>
|
| 141 |
+
|
| 142 |
+
<div class="card">
|
| 143 |
+
<div class="num">Part 2</div>
|
| 144 |
+
<div class="name">External Grounding</div>
|
| 145 |
+
<div class="hook">Lifting self-correction from 50% to 100% under a noisy notebook. Drag the
|
| 146 |
+
guardian through six versions and watch which traps get fixed — and which regress.</div>
|
| 147 |
+
<div class="key">50% → 100% · 66.7% plateau · +fixed / −broken</div>
|
| 148 |
+
<div class="links">
|
| 149 |
+
<a class="space" href="https://huggingface.co/spaces/Laborator/external-grounding" target="_blank" rel="noopener">Open Space ↗</a>
|
| 150 |
+
<a class="gh" href="https://github.com/SergheiBrinza/external-grounding" target="_blank" rel="noopener">GitHub ↗</a>
|
| 151 |
+
</div>
|
| 152 |
+
</div>
|
| 153 |
+
|
| 154 |
+
<div class="card solo">
|
| 155 |
+
<div class="num">Part 3</div>
|
| 156 |
+
<div class="name">Thin Channel</div>
|
| 157 |
+
<div class="hook">How rarely external truth can arrive before calibration collapses. Move the
|
| 158 |
+
lever from “every day” to “never” and watch the curve hold — until the cliff.</div>
|
| 159 |
+
<div class="key">finite schedule holds · zero contact collapses to raw 3B</div>
|
| 160 |
+
<div class="links">
|
| 161 |
+
<a class="space" href="https://huggingface.co/spaces/Laborator/thin-channel" target="_blank" rel="noopener">Open Space ↗</a>
|
| 162 |
+
<a class="gh" href="https://github.com/SergheiBrinza/thin-channel" target="_blank" rel="noopener">GitHub ↗</a>
|
| 163 |
+
</div>
|
| 164 |
+
</div>
|
| 165 |
+
</section>
|
| 166 |
+
|
| 167 |
+
<footer class="foot">
|
| 168 |
+
<div class="ftitle">About</div>
|
| 169 |
+
<div class="b">
|
| 170 |
+
Second Loop is independent research on whether a language model can be made to correct its own
|
| 171 |
+
confident mistakes and stay honest under pressure. The three Spaces above are interactive,
|
| 172 |
+
static visualizations of the experiments — no live model runs in any of them, and every value
|
| 173 |
+
shown is a verbatim output of the original run, bundled as data alongside each page. Source
|
| 174 |
+
code, raw per-run results and methodology live in the GitHub repository linked on every card.
|
| 175 |
+
</div>
|
| 176 |
+
<div class="attrib">
|
| 177 |
+
Subject model Qwen2.5-3B-Instruct · independent judge Qwen2.5-7B-Instruct (both Apache-2.0,
|
| 178 |
+
Alibaba Cloud). Run on a single RTX 3090. No model weights are redistributed here. Demo code: MIT.
|
| 179 |
+
</div>
|
| 180 |
+
</footer>
|
| 181 |
+
|
| 182 |
+
</main>
|
| 183 |
+
</body>
|
| 184 |
+
</html>
|
requirements.txt
DELETED
|
@@ -1,2 +0,0 @@
|
|
| 1 |
-
gradio>=5.0,<6
|
| 2 |
-
huggingface_hub<1.0
|
|
|
|
|
|
|
|
|