open-interpretability 0.0.20__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. open_interpretability-0.0.20.dist-info/METADATA +157 -0
  2. open_interpretability-0.0.20.dist-info/RECORD +256 -0
  3. open_interpretability-0.0.20.dist-info/WHEEL +4 -0
  4. open_interpretability-0.0.20.dist-info/entry_points.txt +2 -0
  5. open_interpretability-0.0.20.dist-info/licenses/LICENSE +21 -0
  6. openinterp/__init__.py +6 -0
  7. openinterp/agents/__init__.py +25 -0
  8. openinterp/agents/base.py +229 -0
  9. openinterp/agents/judge.py +149 -0
  10. openinterp/agents/proposer.py +471 -0
  11. openinterp/agents/proposer_profiles.py +79 -0
  12. openinterp/agents/review_measurements.py +173 -0
  13. openinterp/agents/reviewer.py +498 -0
  14. openinterp/agreement.py +63 -0
  15. openinterp/audit_options.py +79 -0
  16. openinterp/baseline.py +254 -0
  17. openinterp/benchmark.py +450 -0
  18. openinterp/blends.py +239 -0
  19. openinterp/builder/__init__.py +6 -0
  20. openinterp/builder/agents.py +260 -0
  21. openinterp/builder/aligned.py +41 -0
  22. openinterp/builder/charts.py +411 -0
  23. openinterp/builder/circuit_pages.py +37 -0
  24. openinterp/builder/circuits.py +264 -0
  25. openinterp/builder/compiler.py +495 -0
  26. openinterp/builder/corpora.py +98 -0
  27. openinterp/builder/coverage.py +46 -0
  28. openinterp/builder/dashboard.py +255 -0
  29. openinterp/builder/disk_memo.py +65 -0
  30. openinterp/builder/experiment.py +105 -0
  31. openinterp/builder/heat.py +121 -0
  32. openinterp/builder/hrefs.py +71 -0
  33. openinterp/builder/learned_baseline.py +204 -0
  34. openinterp/builder/model_facts.py +138 -0
  35. openinterp/builder/neuronpedia_export.py +107 -0
  36. openinterp/builder/parallel.py +100 -0
  37. openinterp/builder/parquet_export.py +458 -0
  38. openinterp/builder/pieces.py +127 -0
  39. openinterp/builder/pii.py +211 -0
  40. openinterp/builder/registry_stats.py +144 -0
  41. openinterp/builder/research.py +109 -0
  42. openinterp/builder/sections.py +28 -0
  43. openinterp/builder/significance.py +103 -0
  44. openinterp/builder/sister_graph.py +180 -0
  45. openinterp/builder/standing.py +185 -0
  46. openinterp/builder/statuses.py +34 -0
  47. openinterp/builder/stopped.py +91 -0
  48. openinterp/builder/stops.py +30 -0
  49. openinterp/builder/superpositions.py +102 -0
  50. openinterp/builder/templates/_agent_role_cells.html +9 -0
  51. openinterp/builder/templates/_causal_chart.html +67 -0
  52. openinterp/builder/templates/_circuit.html +8 -0
  53. openinterp/builder/templates/_dashboard.html +133 -0
  54. openinterp/builder/templates/_experiment.html +500 -0
  55. openinterp/builder/templates/_macros.html +82 -0
  56. openinterp/builder/templates/_patchscope.html +33 -0
  57. openinterp/builder/templates/_prior_art.html +24 -0
  58. openinterp/builder/templates/_specificity.html +21 -0
  59. openinterp/builder/templates/_steering.html +34 -0
  60. openinterp/builder/templates/_superposition.html +62 -0
  61. openinterp/builder/templates/_vocab_chart.html +88 -0
  62. openinterp/builder/templates/_wiring.html +44 -0
  63. openinterp/builder/templates/about.html +95 -0
  64. openinterp/builder/templates/agent.html +69 -0
  65. openinterp/builder/templates/agents.html +80 -0
  66. openinterp/builder/templates/base.html +103 -0
  67. openinterp/builder/templates/circuit.html +64 -0
  68. openinterp/builder/templates/circuits.html +46 -0
  69. openinterp/builder/templates/experiment.html +21 -0
  70. openinterp/builder/templates/hub.html +16 -0
  71. openinterp/builder/templates/index.html +387 -0
  72. openinterp/builder/templates/layer.html +69 -0
  73. openinterp/builder/templates/learned-baseline.html +44 -0
  74. openinterp/builder/templates/model.html +151 -0
  75. openinterp/builder/templates/models.html +47 -0
  76. openinterp/builder/templates/neuron.html +234 -0
  77. openinterp/builder/templates/paper.html +39 -0
  78. openinterp/builder/templates/redirect.html +1 -0
  79. openinterp/builder/templates/research.html +31 -0
  80. openinterp/builder/templates/user.html +54 -0
  81. openinterp/builder/templates/users.html +39 -0
  82. openinterp/builder/templates/wiki/experiment.md +271 -0
  83. openinterp/builder/templates/wiki/index.md +32 -0
  84. openinterp/builder/templates/wiki/neuron.md +30 -0
  85. openinterp/builder/templates/wiki/stop.md +36 -0
  86. openinterp/builder/tree.py +470 -0
  87. openinterp/builder/users.py +142 -0
  88. openinterp/builder/wiki.py +427 -0
  89. openinterp/checks.py +429 -0
  90. openinterp/cli.py +494 -0
  91. openinterp/cli_baseline.py +332 -0
  92. openinterp/cli_benchmark.py +300 -0
  93. openinterp/cli_build.py +128 -0
  94. openinterp/cli_check.py +51 -0
  95. openinterp/cli_concepts.py +76 -0
  96. openinterp/cli_corpus.py +252 -0
  97. openinterp/cli_costs.py +257 -0
  98. openinterp/cli_coverage.py +76 -0
  99. openinterp/cli_crossref.py +86 -0
  100. openinterp/cli_errata.py +142 -0
  101. openinterp/cli_evidence.py +495 -0
  102. openinterp/cli_evidence_store.py +93 -0
  103. openinterp/cli_explain.py +101 -0
  104. openinterp/cli_loop.py +125 -0
  105. openinterp/cli_memory.py +28 -0
  106. openinterp/cli_neuronpedia.py +175 -0
  107. openinterp/cli_pause.py +45 -0
  108. openinterp/cli_pole_effects.py +133 -0
  109. openinterp/cli_probing.py +119 -0
  110. openinterp/cli_registry.py +348 -0
  111. openinterp/cli_reproduce.py +446 -0
  112. openinterp/cli_review.py +302 -0
  113. openinterp/cli_scan.py +223 -0
  114. openinterp/cli_score.py +446 -0
  115. openinterp/cli_sisters.py +86 -0
  116. openinterp/cli_submission.py +217 -0
  117. openinterp/cli_superpositions.py +118 -0
  118. openinterp/cli_wiring.py +54 -0
  119. openinterp/codeid.py +73 -0
  120. openinterp/concepts.py +400 -0
  121. openinterp/core/__init__.py +59 -0
  122. openinterp/core/agent_names.py +76 -0
  123. openinterp/core/attribution.py +101 -0
  124. openinterp/core/cache_dirs.py +15 -0
  125. openinterp/core/causal.py +82 -0
  126. openinterp/core/confounds.py +103 -0
  127. openinterp/core/contributors.py +26 -0
  128. openinterp/core/corpora.py +126 -0
  129. openinterp/core/costs.py +430 -0
  130. openinterp/core/draws.py +109 -0
  131. openinterp/core/errata.py +244 -0
  132. openinterp/core/evidence.py +160 -0
  133. openinterp/core/examples.py +93 -0
  134. openinterp/core/exceptions.py +29 -0
  135. openinterp/core/explanation.py +130 -0
  136. openinterp/core/fence.py +42 -0
  137. openinterp/core/heavy_lock.py +114 -0
  138. openinterp/core/identifiers.py +198 -0
  139. openinterp/core/isolation.py +149 -0
  140. openinterp/core/ledger.py +130 -0
  141. openinterp/core/licenses.py +28 -0
  142. openinterp/core/manifold.py +117 -0
  143. openinterp/core/partners.py +32 -0
  144. openinterp/core/patchscope.py +59 -0
  145. openinterp/core/paths.py +40 -0
  146. openinterp/core/pause.py +96 -0
  147. openinterp/core/pricing.py +178 -0
  148. openinterp/core/prior_art.py +44 -0
  149. openinterp/core/probing.py +146 -0
  150. openinterp/core/profiles.py +221 -0
  151. openinterp/core/project.py +28 -0
  152. openinterp/core/run_environment.py +38 -0
  153. openinterp/core/schemas.py +484 -0
  154. openinterp/core/specificity.py +49 -0
  155. openinterp/core/stats.py +172 -0
  156. openinterp/core/steering.py +49 -0
  157. openinterp/core/strict.py +19 -0
  158. openinterp/core/takedowns.py +136 -0
  159. openinterp/core/transcripts.py +130 -0
  160. openinterp/core/wiring.py +80 -0
  161. openinterp/corpus.py +476 -0
  162. openinterp/corpus_cache.py +145 -0
  163. openinterp/corpus_layouts.py +108 -0
  164. openinterp/corpus_presets.py +168 -0
  165. openinterp/corpus_rebuild.py +93 -0
  166. openinterp/coverage.py +155 -0
  167. openinterp/crossref.py +442 -0
  168. openinterp/data/__init__.py +9 -0
  169. openinterp/data/offensive_words.txt +58 -0
  170. openinterp/data/public_suffix_list.dat +15771 -0
  171. openinterp/data/sample_corpus.txt +40 -0
  172. openinterp/draw_steps.py +359 -0
  173. openinterp/errata_checks.py +129 -0
  174. openinterp/evidence.py +462 -0
  175. openinterp/evidence_branch.py +119 -0
  176. openinterp/evidence_lenses.py +75 -0
  177. openinterp/experiment_loop.py +357 -0
  178. openinterp/explain.py +252 -0
  179. openinterp/half_precision.py +79 -0
  180. openinterp/harness/__init__.py +37 -0
  181. openinterp/harness/ane/__init__.py +9 -0
  182. openinterp/harness/ane/backend.py +324 -0
  183. openinterp/harness/ane/cache.py +276 -0
  184. openinterp/harness/ane/chunks.py +163 -0
  185. openinterp/harness/ane/convert.py +116 -0
  186. openinterp/harness/ane/forward.py +258 -0
  187. openinterp/harness/ane/qualified.py +40 -0
  188. openinterp/harness/annotations.py +329 -0
  189. openinterp/harness/attribution.py +96 -0
  190. openinterp/harness/causal.py +264 -0
  191. openinterp/harness/confounds.py +184 -0
  192. openinterp/harness/covariance.py +301 -0
  193. openinterp/harness/crossref.py +195 -0
  194. openinterp/harness/cuda_devices.py +88 -0
  195. openinterp/harness/dead.py +124 -0
  196. openinterp/harness/devices.py +401 -0
  197. openinterp/harness/dictionaries.py +496 -0
  198. openinterp/harness/dreaming.py +116 -0
  199. openinterp/harness/environment.py +64 -0
  200. openinterp/harness/explanation_scores.py +371 -0
  201. openinterp/harness/features.py +276 -0
  202. openinterp/harness/first_position.py +137 -0
  203. openinterp/harness/heads.py +226 -0
  204. openinterp/harness/hooks.py +499 -0
  205. openinterp/harness/input_attribution.py +367 -0
  206. openinterp/harness/jlens.py +183 -0
  207. openinterp/harness/layer_cache.py +301 -0
  208. openinterp/harness/layer_major.py +274 -0
  209. openinterp/harness/lookahead.py +93 -0
  210. openinterp/harness/manifold.py +200 -0
  211. openinterp/harness/memory.py +471 -0
  212. openinterp/harness/moe.py +134 -0
  213. openinterp/harness/patcher.py +322 -0
  214. openinterp/harness/patchscope.py +177 -0
  215. openinterp/harness/probing.py +383 -0
  216. openinterp/harness/scan.py +462 -0
  217. openinterp/harness/scan_backend.py +201 -0
  218. openinterp/harness/sister_passes.py +463 -0
  219. openinterp/harness/sisters.py +363 -0
  220. openinterp/harness/sites.py +101 -0
  221. openinterp/harness/specificity.py +107 -0
  222. openinterp/harness/steering.py +159 -0
  223. openinterp/harness/superpositions.py +116 -0
  224. openinterp/harness/units.py +203 -0
  225. openinterp/harness/wiring.py +432 -0
  226. openinterp/harness/wiring_activations.py +285 -0
  227. openinterp/langid.py +73 -0
  228. openinterp/names.py +129 -0
  229. openinterp/neuronpedia_baseline.py +88 -0
  230. openinterp/neuronpedia_review.py +148 -0
  231. openinterp/planner.py +466 -0
  232. openinterp/planner_effects.py +89 -0
  233. openinterp/planner_heads.py +92 -0
  234. openinterp/planner_models.py +174 -0
  235. openinterp/planner_sisters.py +122 -0
  236. openinterp/planner_states.py +57 -0
  237. openinterp/planner_superpositions.py +114 -0
  238. openinterp/pole_effects.py +102 -0
  239. openinterp/prior_art.py +143 -0
  240. openinterp/reproduce.py +450 -0
  241. openinterp/revision.py +45 -0
  242. openinterp/runner_cache.py +35 -0
  243. openinterp/score_controls.py +169 -0
  244. openinterp/sensitive.py +243 -0
  245. openinterp/show.py +236 -0
  246. openinterp/signing.py +209 -0
  247. openinterp/sisters.py +476 -0
  248. openinterp/superposition_finders.py +225 -0
  249. openinterp/sync/__init__.py +5 -0
  250. openinterp/sync/r2.py +280 -0
  251. openinterp/syntax.py +399 -0
  252. openinterp/takedown_checks.py +76 -0
  253. openinterp/toxicity.py +158 -0
  254. openinterp/verdict_regression.py +79 -0
  255. openinterp/wiring_backfill.py +170 -0
  256. openinterp/wordnet.py +362 -0
@@ -0,0 +1,103 @@
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>{% block title %}{{ site_title }}{% endblock %}</title>
7
+ <meta name="generator" content="openinterp {{ version }}">
8
+ {% if canonical %}<link rel="canonical" href="{{ canonical }}">{% endif %}
9
+ <script src="https://cdn.tailwindcss.com/3.4.16"></script>
10
+ <script>
11
+ tailwind.config = {
12
+ theme: {
13
+ extend: {
14
+ fontFamily: {
15
+ sans: ["ui-sans-serif", "system-ui", "-apple-system", "Segoe UI", "sans-serif"],
16
+ mono: ["ui-monospace", "SFMono-Regular", "Menlo", "monospace"],
17
+ },
18
+ },
19
+ },
20
+ };
21
+ </script>
22
+ {# Pagefind assets exist after `npx pagefind --site dist`; the page works without them. #}
23
+ <link href="{{ root }}pagefind/pagefind-ui.css" rel="stylesheet">
24
+ <script src="{{ root }}pagefind/pagefind-ui.js" defer></script>
25
+ <style>
26
+ :root { --pagefind-ui-scale: 0.8; --pagefind-ui-border-radius: 6px; }
27
+ @media (prefers-color-scheme: dark) {
28
+ :root {
29
+ --pagefind-ui-primary: #e2e8f0; --pagefind-ui-text: #e2e8f0;
30
+ --pagefind-ui-background: #0f172a; --pagefind-ui-border: #334155; --pagefind-ui-tag: #1e293b;
31
+ }
32
+ }
33
+ .spoiler { position: relative; min-height: 3rem; }
34
+ .spoiler-body { filter: blur(0.5em); user-select: none; pointer-events: none; }
35
+ .spoiler-toggle { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
36
+ .spoiler-cover { position: absolute; top: 0.5rem; left: 50%; z-index: 1; transform: translateX(-50%); max-width: 100%; padding: 0.25rem 0.75rem; border-radius: 9999px; background: #1e293b; color: #f8fafc; font-size: 0.75rem; line-height: 1.25rem; text-align: center; }
37
+ .spoiler-toggle:focus-visible ~ .spoiler-cover { outline: 2px solid #f59e0b; outline-offset: 2px; }
38
+ .spoiler-toggle:checked, .spoiler-toggle:checked ~ .spoiler-cover { display: none; }
39
+ .spoiler-toggle:checked ~ .spoiler-body { filter: none; user-select: auto; pointer-events: auto; }
40
+ .tok { white-space: pre-wrap; overflow-wrap: anywhere; border-radius: 2px; }
41
+ /* Token heatmaps: one hue per pole, tinted over the page so it works in both themes.
42
+ The tint stops at 80% so token text keeps >= 4.5:1 contrast in light and dark. */
43
+ /* A heatmap is a .hm span of <i> tokens, styled as .tok.heat (builder/heat.py). A token
44
+ with no style has --a 0, and one with no data-v has the value 0.000. */
45
+ .hm > i { --a: 0; font-style: normal; white-space: pre-wrap; overflow-wrap: anywhere; border-radius: 2px; }
46
+ .heat, .hm > i { --heat-max: 0.8; position: relative; background-color: rgb(var(--heat-rgb) / calc(var(--a) * var(--heat-max))); }
47
+ .heat.peak, .hm > i.p { font-weight: 600; box-shadow: inset 0 -2px 0 currentColor; }
48
+ .heat:hover, .hm > i:hover { outline: 1px solid currentColor; }
49
+ .heat.marked, .hm > i.m { outline: 1.5px dashed currentColor; outline-offset: -1px; }
50
+ .hm > i:not([data-v]):hover::after { content: "0.000"; }
51
+ /* A heatmap's values table (builder/heat.py: values_rows). */
52
+ .vt td:first-child { padding-right: 1rem; }
53
+ .vt td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
54
+ .heat:hover::after, .hm > i:hover::after {
55
+ content: attr(data-v); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
56
+ z-index: 10; padding: 2px 6px; border-radius: 4px; white-space: nowrap; pointer-events: none;
57
+ font: 500 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: #0f172a; color: #f8fafc;
58
+ box-shadow: 0 0 0 1px rgb(148 163 184 / 0.5);
59
+ }
60
+ .heat-scale { background: linear-gradient(to right, rgb(var(--heat-rgb) / 0), rgb(var(--heat-rgb) / 0.8)); box-shadow: inset 0 0 0 1px rgb(100 116 139 / 0.4); }
61
+ </style>
62
+ {% block head %}{% endblock %}
63
+ </head>
64
+ <body class="min-h-screen bg-white text-slate-900 antialiased dark:bg-slate-950 dark:text-slate-100">
65
+ <header class="border-b border-slate-200 dark:border-slate-800">
66
+ <div class="mx-auto flex max-w-6xl flex-wrap items-center gap-4 px-4 py-3">
67
+ <a href="{{ root }}index.html" class="font-semibold tracking-tight">
68
+ <span class="font-mono text-emerald-600 dark:text-emerald-400">⊕</span> {{ site_title }}
69
+ </a>
70
+ <span class="hidden text-xs text-slate-500 sm:inline">agent-audited native neuron registry</span>
71
+ <a href="{{ root }}models/index.html" class="text-sm text-slate-600 underline-offset-2 hover:underline dark:text-slate-400">Models</a>
72
+ <a href="{{ root }}agents/index.html" class="text-sm text-slate-600 underline-offset-2 hover:underline dark:text-slate-400">Agents</a>
73
+ <a href="{{ root }}users/index.html" class="text-sm text-slate-600 underline-offset-2 hover:underline dark:text-slate-400">Users</a>
74
+ <a href="{{ root }}research/index.html" class="text-sm text-slate-600 underline-offset-2 hover:underline dark:text-slate-400">Research</a>
75
+ <a href="{{ root }}about.html" class="text-sm text-slate-600 underline-offset-2 hover:underline dark:text-slate-400">About</a>
76
+ <div id="search" class="ml-auto w-full sm:w-80"></div>
77
+ </div>
78
+ </header>
79
+
80
+ <main class="mx-auto max-w-6xl px-4 py-8">
81
+ {% block content %}{% endblock %}
82
+ </main>
83
+
84
+ <footer class="border-t border-slate-200 py-6 text-xs text-slate-500 dark:border-slate-800">
85
+ <div class="mx-auto flex max-w-6xl flex-wrap gap-x-6 gap-y-1 px-4">
86
+ <span>{% if updated_at %}Registry updated {{ updated_at.strftime('%Y-%m-%d') }} · {% endif %}openinterp {{ version }}</span>
87
+ <a class="underline" href="{{ root }}data/registry.parquet">registry.parquet</a>
88
+ <a class="underline" href="{{ root }}data/manifest.json">manifest.json</a>
89
+ <a class="underline" href="{{ repo_url }}">GitHub</a>
90
+ <a class="underline" href="mailto:{{ contact_email }}">{{ contact_email }}</a>
91
+ </div>
92
+ </footer>
93
+
94
+ <script>
95
+ window.addEventListener("DOMContentLoaded", () => {
96
+ if (window.PagefindUI) {
97
+ new PagefindUI({ element: "#search", showSubResults: false, showImages: false });
98
+ }
99
+ });
100
+ </script>
101
+ {% block scripts %}{% endblock %}
102
+ </body>
103
+ </html>
@@ -0,0 +1,64 @@
1
+ {% extends "base.html" %}
2
+ {% from "_circuit.html" import unit_name, nav %}
3
+
4
+ {% block title %}Circuit from {{ unit_name(c.root) }} · {{ model.name }} · {{ site_title }}{% endblock %}
5
+
6
+ {% block content %}
7
+ {{ nav(root, model, "Circuit from " ~ unit_name(c.root)) }}
8
+ <h1 class="font-mono text-2xl font-semibold">Circuit from {{ unit_name(c.root) }}</h1>
9
+ <p class="mt-2 max-w-3xl text-sm text-slate-600 dark:text-slate-400">
10
+ {{ c.units | length }} units of {{ model.name }}, layers {{ c.layers[0] }}–{{ c.layers[1] }}, {{ c.verified }} VERIFIED, joined edge to edge by their wiring. The circuit is named after its lowest-layer unit; when circuits merge or split as the registry grows, the old names redirect here. See <a class="underline" href="{{ root }}models/{{ model.slug }}/circuits.html">all circuits</a> for how edges are found. Reported, not gated.
11
+ </p>
12
+ <p class="mt-2 text-xs text-slate-500">
13
+ <span class="text-emerald-600 dark:text-emerald-400">━</span> found by both readings ·
14
+ <span class="text-sky-600 dark:text-sky-400">━</span> activations only ·
15
+ <span class="text-slate-400">━</span> weights only
16
+ </p>
17
+ <section class="mt-6" data-pagefind-ignore>
18
+ <div class="mt-3 overflow-x-auto rounded-lg border border-slate-200 dark:border-slate-800">
19
+ <svg viewBox="0 0 {{ c.width }} {{ c.height }}" width="{{ c.width }}" height="{{ c.height }}" class="max-w-none" role="img" aria-label="Circuit {{ c.root.label }}: {{ c.units | length }} units joined by wiring edges">
20
+ <defs>
21
+ <marker id="arrow" viewBox="0 0 8 8" refX="7" refY="4" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
22
+ <path d="M0,0 L8,4 L0,8 z" fill="context-stroke"/>
23
+ </marker>
24
+ </defs>
25
+ {% for e in c.edges %}
26
+ {% set x1, y1 = c.positions[e.source.href] %}{% set x2, y2 = c.positions[e.target.href] %}
27
+ {% set both = e.methods | length == 2 %}
28
+ {% set cls = "stroke-emerald-500" if both else ("stroke-sky-500" if e.methods[0] == "activations" else "stroke-slate-400") %}
29
+ {% if x1 == x2 %}
30
+ <path d="M{{ x1 + 40 }},{{ y1 }} Q{{ x1 + 80 }},{{ (y1 + y2) / 2 }} {{ x2 + 40 }},{{ y2 }}" fill="none" class="{{ cls }}" stroke-width="1.5" marker-end="url(#arrow)"><title>{{ unit_name(e.source) }} → {{ unit_name(e.target) }}</title></path>
31
+ {% else %}
32
+ <line x1="{{ x1 + 40 }}" y1="{{ y1 }}" x2="{{ x2 - 40 }}" y2="{{ y2 }}" class="{{ cls }}" stroke-width="1.5" marker-end="url(#arrow)"><title>{{ unit_name(e.source) }} → {{ unit_name(e.target) }}</title></line>
33
+ {% endif %}
34
+ {% endfor %}
35
+ {% for u in c.units %}
36
+ {% set x, y = c.positions[u.href] %}
37
+ <a href="{{ root }}{{ u.href }}">
38
+ <rect x="{{ x - 40 }}" y="{{ y - 13 }}" width="80" height="26" rx="5" class="{{ 'fill-emerald-50 stroke-emerald-600 dark:fill-emerald-950' if u.verified else 'fill-white stroke-slate-400 dark:fill-slate-950' }}" stroke-width="1"/>
39
+ <text x="{{ x }}" y="{{ y + 4 }}" text-anchor="middle" font-size="11" class="fill-slate-800 font-mono dark:fill-slate-200">L{{ u.layer }}/{{ u.label }}</text>
40
+ <title>{{ unit_name(u) }}{{ " · verified" if u.verified }}</title>
41
+ </a>
42
+ {% endfor %}
43
+ </svg>
44
+ </div>
45
+ <table class="mt-3 w-full font-mono text-xs">
46
+ <thead class="text-slate-500">
47
+ <tr><th class="pb-1 text-left font-normal">Edge</th><th class="pb-1 text-left font-normal">Found by</th></tr>
48
+ </thead>
49
+ <tbody>
50
+ {% for e in c.edges %}
51
+ <tr class="align-top">
52
+ <td class="py-0.5 pr-4"><a class="underline" href="{{ root }}{{ e.source.href }}">{{ unit_name(e.source) }}</a> → <a class="underline" href="{{ root }}{{ e.target.href }}">{{ unit_name(e.target) }}</a></td>
53
+ <td class="py-0.5">
54
+ {% for r in e.readings %}
55
+ <a class="underline" href="{{ root }}{{ r.experiment.href }}" title="{% for ch, x in r.channels.items() %}{{ ch }} {{ '%+.3g' | format(x) }}{{ ' · ' if not loop.last }}{% endfor %}">{{ r.experiment.id }}</a>
56
+ {{ r.method }} {{ '%+.3g' | format(r.weight) }}{{ " (backfilled)" if r.backfilled }}{{ "; " if not loop.last }}
57
+ {% endfor %}
58
+ </td>
59
+ </tr>
60
+ {% endfor %}
61
+ </tbody>
62
+ </table>
63
+ </section>
64
+ {% endblock %}
@@ -0,0 +1,46 @@
1
+ {% extends "base.html" %}
2
+ {% from "_macros.html" import breadcrumb %}
3
+ {% from "_circuit.html" import unit_name %}
4
+
5
+ {% block title %}Circuits · {{ model.name }} · {{ site_title }}{% endblock %}
6
+
7
+
8
+ {% block content %}
9
+ {{ breadcrumb(root, model) }}
10
+ <h1 class="font-mono text-2xl font-semibold">Circuits in {{ model.name }}</h1>
11
+ <p class="mt-2 max-w-3xl text-sm text-slate-600 dark:text-slate-400">
12
+ Units in the registry joined by their wiring: each experiment records its unit's strongest direct connections, from the weights and from activations on its review's prompts, and an edge is kept when the unit at its other end has a page too. Units joined edge to edge form one circuit, laid out by layer (attention heads above neurons in a layer, since attention runs first). A hub, a unit wired to at least {{ (hub_share * 100) | round | int }}% of the model's studied units (and at least {{ hub_min }}), would join them all into one star, so its edges don't join circuits; hubs are listed after the circuits. Each circuit has its own page, named after its lowest-layer unit; when circuits merge or split, the old names redirect. Edges are direct effects only, and a unit's wiring lists only its top connections, so a missing edge is not evidence of no connection. Reported, not gated.
13
+ </p>
14
+ <p class="mt-2 text-xs text-slate-500">
15
+ {{ found | length }} circuit{{ "" if found | length == 1 else "s" }} over {{ n_units }} units{% if hubs %} · <a class="underline" href="#hubs">{{ hubs | length }} hub{{ "" if hubs | length == 1 else "s" }}</a>{% endif %}
16
+ </p>
17
+
18
+ {% if found %}
19
+ <table class="mt-6 w-full text-sm" data-pagefind-ignore>
20
+ <thead class="text-xs text-slate-500">
21
+ <tr><th class="pb-1 text-left font-normal">Circuit</th><th class="pb-1 text-right font-normal">Units</th><th class="pb-1 text-right font-normal">Verified</th><th class="pb-1 text-right font-normal">Layers</th></tr>
22
+ </thead>
23
+ <tbody>
24
+ {% for c, href in found %}
25
+ <tr><td class="py-0.5 font-mono"><a class="underline" href="{{ root }}{{ href }}">{{ unit_name(c.root) }}</a></td><td class="py-0.5 text-right">{{ c.units | length }}</td><td class="py-0.5 text-right">{{ c.verified }}</td><td class="py-0.5 text-right">{{ c.layers[0] }}–{{ c.layers[1] }}</td></tr>
26
+ {% endfor %}
27
+ </tbody>
28
+ </table>
29
+ {% else %}
30
+ <p class="mt-8 text-sm text-slate-500">No two units in the registry are wired to each other{{ " except through a hub" if hubs }}.</p>
31
+ {% endif %}
32
+
33
+ {% if hubs %}
34
+ <section id="hubs" class="mt-12 scroll-mt-4" data-pagefind-ignore>
35
+ <h2 class="text-base font-semibold">Hubs</h2>
36
+ <table class="mt-3 w-full text-sm">
37
+ <thead class="text-xs text-slate-500"><tr><th class="pb-1 text-left font-normal">Hub</th><th class="pb-1 text-right font-normal">Wired to</th></tr></thead>
38
+ <tbody>
39
+ {% for hub, href in hubs %}
40
+ <tr><td class="py-0.5 font-mono"><a class="underline" href="{{ root }}{{ href }}">{{ unit_name(hub.unit) }}</a></td><td class="py-0.5 text-right">{{ hub.neighbours | length }} studied units</td></tr>
41
+ {% endfor %}
42
+ </tbody>
43
+ </table>
44
+ </section>
45
+ {% endif %}
46
+ {% endblock %}
@@ -0,0 +1,21 @@
1
+ {% extends "base.html" %}
2
+ {% from "_macros.html" import breadcrumb %}
3
+ {# One experiment's page, at the path of its record under wiki/experiments/. Expects `v` from compiler._experiment_view and `rank`, its place on its unit's page. #}
4
+
5
+ {% block title %}{{ model.name }} L{{ neuron.layer }}/{{ neuron.label }} · {{ v.e.id }} · {{ site_title }}{% endblock %}
6
+
7
+ {% block content %}
8
+ <article data-pagefind-body>
9
+ {{ breadcrumb(root, model, layer, neuron, unit_link=true) }}
10
+ <header class="mb-6">
11
+ <h1 class="font-mono text-2xl font-semibold" data-pagefind-meta="title">{{ model.name }} · L{{ neuron.layer }}/{{ neuron.label }} · {{ v.e.id }}</h1>
12
+ <p class="mt-1 hidden" data-pagefind-filter="model">{{ model.name }}</p>
13
+ <p class="mt-2 text-sm text-slate-600 dark:text-slate-400">
14
+ Experiment {{ rank }} of {{ neuron.experiments | length }} on
15
+ <a class="underline-offset-2 hover:underline" href="{{ root }}{{ neuron.href }}">this {{ neuron.noun }}</a>, ordered by how conclusive its probe evidence is.
16
+ Its record is <a class="font-mono underline-offset-2 hover:underline" href="{{ repo_url }}/blob/main/wiki/experiments/{{ v.ident.slug }}/{{ v.e.id }}.json">wiki/experiments/{{ v.ident.slug }}/{{ v.e.id }}.json</a>.
17
+ </p>
18
+ </header>
19
+ {% include "_experiment.html" %}
20
+ </article>
21
+ {% endblock %}
@@ -0,0 +1,16 @@
1
+ {% extends "base.html" %}
2
+ {% from "_circuit.html" import unit_name, nav %}
3
+
4
+ {% block title %}Hub {{ unit_name(hub.unit) }} · {{ model.name }} · {{ site_title }}{% endblock %}
5
+
6
+ {% block content %}
7
+ {% set inbound = hub.edges | selectattr("target", "sameas", hub.unit) | list %}
8
+ {{ nav(root, model, "Hub " ~ unit_name(hub.unit)) }}
9
+ <h1 class="font-mono text-2xl font-semibold">Hub <a class="underline" href="{{ root }}{{ hub.unit.href }}">{{ unit_name(hub.unit) }}</a></h1>
10
+ <p class="mt-2 max-w-3xl text-sm text-slate-600 dark:text-slate-400">
11
+ Wired to {{ hub.neighbours | length }} studied units of {{ model.name }} ({{ inbound | length }} edges in, {{ hub.edges | length - inbound | length }} out). A hub would join them all into one star, so its edges don't join circuits. See <a class="underline" href="{{ root }}models/{{ model.slug }}/circuits.html">all circuits</a>. Reported, not gated.
12
+ </p>
13
+ <p class="mt-4 font-mono text-xs leading-relaxed" data-pagefind-ignore>
14
+ {% for u in hub.neighbours %}<a class="underline" href="{{ root }}{{ u.href }}">L{{ u.layer }}/{{ u.label }}</a>{{ " · " if not loop.last }}{% endfor %}
15
+ </p>
16
+ {% endblock %}