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.
- open_interpretability-0.0.20.dist-info/METADATA +157 -0
- open_interpretability-0.0.20.dist-info/RECORD +256 -0
- open_interpretability-0.0.20.dist-info/WHEEL +4 -0
- open_interpretability-0.0.20.dist-info/entry_points.txt +2 -0
- open_interpretability-0.0.20.dist-info/licenses/LICENSE +21 -0
- openinterp/__init__.py +6 -0
- openinterp/agents/__init__.py +25 -0
- openinterp/agents/base.py +229 -0
- openinterp/agents/judge.py +149 -0
- openinterp/agents/proposer.py +471 -0
- openinterp/agents/proposer_profiles.py +79 -0
- openinterp/agents/review_measurements.py +173 -0
- openinterp/agents/reviewer.py +498 -0
- openinterp/agreement.py +63 -0
- openinterp/audit_options.py +79 -0
- openinterp/baseline.py +254 -0
- openinterp/benchmark.py +450 -0
- openinterp/blends.py +239 -0
- openinterp/builder/__init__.py +6 -0
- openinterp/builder/agents.py +260 -0
- openinterp/builder/aligned.py +41 -0
- openinterp/builder/charts.py +411 -0
- openinterp/builder/circuit_pages.py +37 -0
- openinterp/builder/circuits.py +264 -0
- openinterp/builder/compiler.py +495 -0
- openinterp/builder/corpora.py +98 -0
- openinterp/builder/coverage.py +46 -0
- openinterp/builder/dashboard.py +255 -0
- openinterp/builder/disk_memo.py +65 -0
- openinterp/builder/experiment.py +105 -0
- openinterp/builder/heat.py +121 -0
- openinterp/builder/hrefs.py +71 -0
- openinterp/builder/learned_baseline.py +204 -0
- openinterp/builder/model_facts.py +138 -0
- openinterp/builder/neuronpedia_export.py +107 -0
- openinterp/builder/parallel.py +100 -0
- openinterp/builder/parquet_export.py +458 -0
- openinterp/builder/pieces.py +127 -0
- openinterp/builder/pii.py +211 -0
- openinterp/builder/registry_stats.py +144 -0
- openinterp/builder/research.py +109 -0
- openinterp/builder/sections.py +28 -0
- openinterp/builder/significance.py +103 -0
- openinterp/builder/sister_graph.py +180 -0
- openinterp/builder/standing.py +185 -0
- openinterp/builder/statuses.py +34 -0
- openinterp/builder/stopped.py +91 -0
- openinterp/builder/stops.py +30 -0
- openinterp/builder/superpositions.py +102 -0
- openinterp/builder/templates/_agent_role_cells.html +9 -0
- openinterp/builder/templates/_causal_chart.html +67 -0
- openinterp/builder/templates/_circuit.html +8 -0
- openinterp/builder/templates/_dashboard.html +133 -0
- openinterp/builder/templates/_experiment.html +500 -0
- openinterp/builder/templates/_macros.html +82 -0
- openinterp/builder/templates/_patchscope.html +33 -0
- openinterp/builder/templates/_prior_art.html +24 -0
- openinterp/builder/templates/_specificity.html +21 -0
- openinterp/builder/templates/_steering.html +34 -0
- openinterp/builder/templates/_superposition.html +62 -0
- openinterp/builder/templates/_vocab_chart.html +88 -0
- openinterp/builder/templates/_wiring.html +44 -0
- openinterp/builder/templates/about.html +95 -0
- openinterp/builder/templates/agent.html +69 -0
- openinterp/builder/templates/agents.html +80 -0
- openinterp/builder/templates/base.html +103 -0
- openinterp/builder/templates/circuit.html +64 -0
- openinterp/builder/templates/circuits.html +46 -0
- openinterp/builder/templates/experiment.html +21 -0
- openinterp/builder/templates/hub.html +16 -0
- openinterp/builder/templates/index.html +387 -0
- openinterp/builder/templates/layer.html +69 -0
- openinterp/builder/templates/learned-baseline.html +44 -0
- openinterp/builder/templates/model.html +151 -0
- openinterp/builder/templates/models.html +47 -0
- openinterp/builder/templates/neuron.html +234 -0
- openinterp/builder/templates/paper.html +39 -0
- openinterp/builder/templates/redirect.html +1 -0
- openinterp/builder/templates/research.html +31 -0
- openinterp/builder/templates/user.html +54 -0
- openinterp/builder/templates/users.html +39 -0
- openinterp/builder/templates/wiki/experiment.md +271 -0
- openinterp/builder/templates/wiki/index.md +32 -0
- openinterp/builder/templates/wiki/neuron.md +30 -0
- openinterp/builder/templates/wiki/stop.md +36 -0
- openinterp/builder/tree.py +470 -0
- openinterp/builder/users.py +142 -0
- openinterp/builder/wiki.py +427 -0
- openinterp/checks.py +429 -0
- openinterp/cli.py +494 -0
- openinterp/cli_baseline.py +332 -0
- openinterp/cli_benchmark.py +300 -0
- openinterp/cli_build.py +128 -0
- openinterp/cli_check.py +51 -0
- openinterp/cli_concepts.py +76 -0
- openinterp/cli_corpus.py +252 -0
- openinterp/cli_costs.py +257 -0
- openinterp/cli_coverage.py +76 -0
- openinterp/cli_crossref.py +86 -0
- openinterp/cli_errata.py +142 -0
- openinterp/cli_evidence.py +495 -0
- openinterp/cli_evidence_store.py +93 -0
- openinterp/cli_explain.py +101 -0
- openinterp/cli_loop.py +125 -0
- openinterp/cli_memory.py +28 -0
- openinterp/cli_neuronpedia.py +175 -0
- openinterp/cli_pause.py +45 -0
- openinterp/cli_pole_effects.py +133 -0
- openinterp/cli_probing.py +119 -0
- openinterp/cli_registry.py +348 -0
- openinterp/cli_reproduce.py +446 -0
- openinterp/cli_review.py +302 -0
- openinterp/cli_scan.py +223 -0
- openinterp/cli_score.py +446 -0
- openinterp/cli_sisters.py +86 -0
- openinterp/cli_submission.py +217 -0
- openinterp/cli_superpositions.py +118 -0
- openinterp/cli_wiring.py +54 -0
- openinterp/codeid.py +73 -0
- openinterp/concepts.py +400 -0
- openinterp/core/__init__.py +59 -0
- openinterp/core/agent_names.py +76 -0
- openinterp/core/attribution.py +101 -0
- openinterp/core/cache_dirs.py +15 -0
- openinterp/core/causal.py +82 -0
- openinterp/core/confounds.py +103 -0
- openinterp/core/contributors.py +26 -0
- openinterp/core/corpora.py +126 -0
- openinterp/core/costs.py +430 -0
- openinterp/core/draws.py +109 -0
- openinterp/core/errata.py +244 -0
- openinterp/core/evidence.py +160 -0
- openinterp/core/examples.py +93 -0
- openinterp/core/exceptions.py +29 -0
- openinterp/core/explanation.py +130 -0
- openinterp/core/fence.py +42 -0
- openinterp/core/heavy_lock.py +114 -0
- openinterp/core/identifiers.py +198 -0
- openinterp/core/isolation.py +149 -0
- openinterp/core/ledger.py +130 -0
- openinterp/core/licenses.py +28 -0
- openinterp/core/manifold.py +117 -0
- openinterp/core/partners.py +32 -0
- openinterp/core/patchscope.py +59 -0
- openinterp/core/paths.py +40 -0
- openinterp/core/pause.py +96 -0
- openinterp/core/pricing.py +178 -0
- openinterp/core/prior_art.py +44 -0
- openinterp/core/probing.py +146 -0
- openinterp/core/profiles.py +221 -0
- openinterp/core/project.py +28 -0
- openinterp/core/run_environment.py +38 -0
- openinterp/core/schemas.py +484 -0
- openinterp/core/specificity.py +49 -0
- openinterp/core/stats.py +172 -0
- openinterp/core/steering.py +49 -0
- openinterp/core/strict.py +19 -0
- openinterp/core/takedowns.py +136 -0
- openinterp/core/transcripts.py +130 -0
- openinterp/core/wiring.py +80 -0
- openinterp/corpus.py +476 -0
- openinterp/corpus_cache.py +145 -0
- openinterp/corpus_layouts.py +108 -0
- openinterp/corpus_presets.py +168 -0
- openinterp/corpus_rebuild.py +93 -0
- openinterp/coverage.py +155 -0
- openinterp/crossref.py +442 -0
- openinterp/data/__init__.py +9 -0
- openinterp/data/offensive_words.txt +58 -0
- openinterp/data/public_suffix_list.dat +15771 -0
- openinterp/data/sample_corpus.txt +40 -0
- openinterp/draw_steps.py +359 -0
- openinterp/errata_checks.py +129 -0
- openinterp/evidence.py +462 -0
- openinterp/evidence_branch.py +119 -0
- openinterp/evidence_lenses.py +75 -0
- openinterp/experiment_loop.py +357 -0
- openinterp/explain.py +252 -0
- openinterp/half_precision.py +79 -0
- openinterp/harness/__init__.py +37 -0
- openinterp/harness/ane/__init__.py +9 -0
- openinterp/harness/ane/backend.py +324 -0
- openinterp/harness/ane/cache.py +276 -0
- openinterp/harness/ane/chunks.py +163 -0
- openinterp/harness/ane/convert.py +116 -0
- openinterp/harness/ane/forward.py +258 -0
- openinterp/harness/ane/qualified.py +40 -0
- openinterp/harness/annotations.py +329 -0
- openinterp/harness/attribution.py +96 -0
- openinterp/harness/causal.py +264 -0
- openinterp/harness/confounds.py +184 -0
- openinterp/harness/covariance.py +301 -0
- openinterp/harness/crossref.py +195 -0
- openinterp/harness/cuda_devices.py +88 -0
- openinterp/harness/dead.py +124 -0
- openinterp/harness/devices.py +401 -0
- openinterp/harness/dictionaries.py +496 -0
- openinterp/harness/dreaming.py +116 -0
- openinterp/harness/environment.py +64 -0
- openinterp/harness/explanation_scores.py +371 -0
- openinterp/harness/features.py +276 -0
- openinterp/harness/first_position.py +137 -0
- openinterp/harness/heads.py +226 -0
- openinterp/harness/hooks.py +499 -0
- openinterp/harness/input_attribution.py +367 -0
- openinterp/harness/jlens.py +183 -0
- openinterp/harness/layer_cache.py +301 -0
- openinterp/harness/layer_major.py +274 -0
- openinterp/harness/lookahead.py +93 -0
- openinterp/harness/manifold.py +200 -0
- openinterp/harness/memory.py +471 -0
- openinterp/harness/moe.py +134 -0
- openinterp/harness/patcher.py +322 -0
- openinterp/harness/patchscope.py +177 -0
- openinterp/harness/probing.py +383 -0
- openinterp/harness/scan.py +462 -0
- openinterp/harness/scan_backend.py +201 -0
- openinterp/harness/sister_passes.py +463 -0
- openinterp/harness/sisters.py +363 -0
- openinterp/harness/sites.py +101 -0
- openinterp/harness/specificity.py +107 -0
- openinterp/harness/steering.py +159 -0
- openinterp/harness/superpositions.py +116 -0
- openinterp/harness/units.py +203 -0
- openinterp/harness/wiring.py +432 -0
- openinterp/harness/wiring_activations.py +285 -0
- openinterp/langid.py +73 -0
- openinterp/names.py +129 -0
- openinterp/neuronpedia_baseline.py +88 -0
- openinterp/neuronpedia_review.py +148 -0
- openinterp/planner.py +466 -0
- openinterp/planner_effects.py +89 -0
- openinterp/planner_heads.py +92 -0
- openinterp/planner_models.py +174 -0
- openinterp/planner_sisters.py +122 -0
- openinterp/planner_states.py +57 -0
- openinterp/planner_superpositions.py +114 -0
- openinterp/pole_effects.py +102 -0
- openinterp/prior_art.py +143 -0
- openinterp/reproduce.py +450 -0
- openinterp/revision.py +45 -0
- openinterp/runner_cache.py +35 -0
- openinterp/score_controls.py +169 -0
- openinterp/sensitive.py +243 -0
- openinterp/show.py +236 -0
- openinterp/signing.py +209 -0
- openinterp/sisters.py +476 -0
- openinterp/superposition_finders.py +225 -0
- openinterp/sync/__init__.py +5 -0
- openinterp/sync/r2.py +280 -0
- openinterp/syntax.py +399 -0
- openinterp/takedown_checks.py +76 -0
- openinterp/toxicity.py +158 -0
- openinterp/verdict_regression.py +79 -0
- openinterp/wiring_backfill.py +170 -0
- openinterp/wordnet.py +362 -0
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
{# One experiment, on its own page (experiment.html). Expects `v` from compiler._experiment_view and `rank`. #}
|
|
2
|
+
{% from "_macros.html" import status_badge, evidence_badge, self_review_badge, builtin_sample_badge, pole_mark, heat_tokens, spoiler, errata_notes %}
|
|
3
|
+
{% set e = v.e %}{% set sub = v.sub %}{% set verdict = v.verdict %}{% set ident = v.ident %}
|
|
4
|
+
{% set c = v.c %}{% set bars = v.bars %}{% set examples = v.examples %}
|
|
5
|
+
{% set is_head = ident.kind == "attn_head" %}
|
|
6
|
+
{% set is_feature = ident.kind == "dictionary_feature" %}{% set is_sup = ident.kind == "superposition" %}
|
|
7
|
+
{% set positive = ident.pole != "negative" %}{# heads and features share the positive pole's colours #}
|
|
8
|
+
{% set what = "head" if is_head else ("feature" if is_feature else ("superposition" if is_sup else "pole")) %}
|
|
9
|
+
{% set peer = "head" if is_head else ("latent" if is_feature else ("null direction" if is_sup else "neuron")) %}
|
|
10
|
+
{% set peers = peer ~ "s" %}
|
|
11
|
+
{% set strength = "head strength" if is_head else ("latent activation" if is_feature else ("superposition strength" if is_sup else ident.pole ~ "-pole strength")) %}
|
|
12
|
+
<section id="{{ e.anchor }}" class="scroll-mt-4 rounded-xl border border-slate-200 dark:border-slate-800">
|
|
13
|
+
<header class="p-5">
|
|
14
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
15
|
+
<span class="font-mono text-sm font-semibold">#{{ rank }} · {% if is_head %}attention head{% elif is_feature %}{{ ident.dictionary }} latent{% elif is_sup %}superposition{% else %}{{ ident.pole }} pole {{ pole_mark(ident.pole) }}{% endif %}</span>
|
|
16
|
+
{{ status_badge(verdict.status) }}
|
|
17
|
+
{{ evidence_badge(e.sig.conclusiveness, e.sig.direction) }}
|
|
18
|
+
{% if e.record.self_reviewed %}{{ self_review_badge() }}{% endif %}
|
|
19
|
+
{% if e.record.scanned_on_builtin_sample %}{{ builtin_sample_badge() }}{% endif %}
|
|
20
|
+
<span class="rounded bg-slate-100 px-2 py-0.5 text-xs dark:bg-slate-800{{ '' if e.counts else ' text-slate-500' }}" title="How this experiment counts toward the {{ what }}'s status">{{ roles[e.role] }}</span>
|
|
21
|
+
{% if sub.lookahead.is_lookahead %}<span class="rounded bg-violet-100 px-2 py-0.5 text-xs text-violet-800 dark:bg-violet-900 dark:text-violet-200">lookahead</span>{% endif %}
|
|
22
|
+
<span class="ml-auto font-mono text-xs text-slate-500">{{ verdict.timestamp.strftime("%Y-%m-%d") }} · {{ e.id }}</span>
|
|
23
|
+
</div>
|
|
24
|
+
{{ errata_notes(e.errata, e.edits, repo_url) }}<p class="mt-3 max-w-3xl text-base leading-relaxed">{{ sub.natural_language_explanation }}</p>
|
|
25
|
+
<p class="mt-2 text-xs text-slate-500">
|
|
26
|
+
Hard negatives {{ "%g" | format(e.sig.negatives.passed) }}/{{ e.sig.negatives.clusters }} rejected ·
|
|
27
|
+
holdouts {{ "%g" | format(e.sig.holdouts.passed) }}/{{ e.sig.holdouts.clusters }} fired
|
|
28
|
+
<span title="Near-duplicate probes count as one observation">(independent observations; {{ e.sig.negatives.raw + e.sig.holdouts.raw }} probes)</span> ·
|
|
29
|
+
P(useful) {{ e.sig.p_useful | num(2) }}
|
|
30
|
+
{% if not e.independent %}· <span class="text-amber-700 dark:text-amber-400">re-measures the probes of {{ e.reuses }}; not independent evidence</span>{% endif %}
|
|
31
|
+
</p>
|
|
32
|
+
{% if v.sister_of %}
|
|
33
|
+
<p class="mt-1 text-xs text-slate-500">Sister study: tests the explanation of <a class="font-mono underline" href="{{ root }}{{ v.sister_of.href }}">{{ v.sister_of.ref }}</a>, unchanged</p>
|
|
34
|
+
{% endif %}
|
|
35
|
+
{% if e.revises or e.revised_by %}
|
|
36
|
+
<p class="mt-1 text-xs text-slate-500">
|
|
37
|
+
{% if e.revises %}Revises <a class="font-mono underline" href="{{ root }}{{ e.revises.href }}">{{ e.revises.id }}</a> ({{ e.revises.record.verdict.status }}){% endif %}
|
|
38
|
+
{% if e.revises and e.revised_by %} · {% endif %}
|
|
39
|
+
{% if e.revised_by %}Revised by {% for r in e.revised_by %}<a class="font-mono underline" href="{{ root }}{{ r.href }}">{{ r.id }}</a> ({{ r.record.verdict.status }}){{ ", " if not loop.last }}{% endfor %}{% endif %}
|
|
40
|
+
</p>
|
|
41
|
+
{% endif %}
|
|
42
|
+
{% if sub.activating_tokens %}
|
|
43
|
+
<p class="mt-3 flex flex-wrap gap-1.5">
|
|
44
|
+
{% for tok in sub.activating_tokens %}<code class="tok rounded border border-slate-300 px-1.5 py-0.5 text-xs dark:border-slate-700">{{ tok }}</code>{% endfor %}
|
|
45
|
+
</p>
|
|
46
|
+
{% endif %}
|
|
47
|
+
</header>
|
|
48
|
+
<details class="border-t border-slate-200 p-5 dark:border-slate-800" open>
|
|
49
|
+
<summary class="cursor-pointer text-sm font-medium text-slate-600 dark:text-slate-400">Evidence and review</summary>
|
|
50
|
+
<div class="mt-5">
|
|
51
|
+
<section class="mb-10 grid gap-px overflow-hidden rounded-lg border border-slate-200 bg-slate-200 sm:grid-cols-2 lg:grid-cols-4 dark:border-slate-800 dark:bg-slate-800" data-pagefind-ignore>
|
|
52
|
+
{% for label, value, hint in [
|
|
53
|
+
("Balanced accuracy", verdict.confidence_score if verdict else none, "Mean of hard-negative specificity and holdout sensitivity"),
|
|
54
|
+
("Sufficiency", c.sufficiency_score if c else none, "Clean→corrupted patch: percentile of the " ~ what ~ "'s effect among comparable " ~ peers if c and c.target else "Clean→corrupted patch: fraction of clean prediction restored"),
|
|
55
|
+
("Necessity", c.necessity_score if c else none, "Corrupted→clean patch: percentile of the " ~ what ~ "'s effect among comparable " ~ peers if c and c.target else "Corrupted→clean patch: fraction of prediction lost"),
|
|
56
|
+
("Lookahead KL", none, "KL(clean ‖ " ~ ("head mean-ablated" if is_head else ("latent-ablated" if is_feature else ("superposition-ablated" if is_sup else "pole-ablated"))) ~ ") over next-token distributions"),
|
|
57
|
+
] %}
|
|
58
|
+
<div class="bg-white p-4 dark:bg-slate-950" title="{{ hint }}">
|
|
59
|
+
<div class="text-xs uppercase tracking-wide text-slate-500">{{ label }}</div>
|
|
60
|
+
{% if label == "Lookahead KL" %}
|
|
61
|
+
<div class="mt-1 font-mono text-2xl tabular-nums">{{ sub.lookahead.kl_divergence | num(4) }}</div>
|
|
62
|
+
{% else %}
|
|
63
|
+
<div class="mt-1 font-mono text-2xl tabular-nums">{{ value | num(2) }}</div>
|
|
64
|
+
<div class="mt-2 h-1.5 rounded bg-slate-200 dark:bg-slate-800">
|
|
65
|
+
<div class="h-1.5 rounded bg-emerald-500" style="width: {{ ((value or 0) * 100) | round(1) }}%"></div>
|
|
66
|
+
</div>
|
|
67
|
+
{% endif %}
|
|
68
|
+
</div>
|
|
69
|
+
{% endfor %}
|
|
70
|
+
</section>
|
|
71
|
+
{% if c %}
|
|
72
|
+
<p class="-mt-8 mb-10 text-xs text-slate-500">
|
|
73
|
+
{% if c.target %}
|
|
74
|
+
Causal scores rank the {{ what }}'s patch effect against the {{ c.null_neurons }} same-layer {{ peers }} that change as much between each minimal pair (0.5 = typical), median over {{ c.pairs_scored }} non-control pairs, scored on
|
|
75
|
+
{% if c.target == "claimed_tokens" %}the claimed tokens{% for t in c.target_tokens %} <code class="tok rounded bg-violet-100 px-1 dark:bg-violet-900">{{ t }}</code>{% endfor %}{% else %}next-token KL{% endif %}.
|
|
76
|
+
Median effect {{ '%.3g' | format(c.sufficiency_effect) }} (sufficiency) / {{ '%.3g' | format(c.necessity_effect) }} (necessity).
|
|
77
|
+
{% else %}
|
|
78
|
+
Causal scores are medians over minimal pairs on the base prompt's top-1 token logit (protocol < 0.5).
|
|
79
|
+
{% endif %}
|
|
80
|
+
Self-repair (hydra effect) {{ 'mitigated by freezing downstream MLP outputs' if c.hydra_mitigated else 'not mitigated' }}.
|
|
81
|
+
</p>
|
|
82
|
+
{% endif %}
|
|
83
|
+
{% include "_causal_chart.html" %}
|
|
84
|
+
|
|
85
|
+
<div class="mb-10 grid gap-8 lg:grid-cols-2">
|
|
86
|
+
<section>
|
|
87
|
+
<h3 class="mb-3 text-base font-semibold">Activation distribution</h3>
|
|
88
|
+
{% if bars %}
|
|
89
|
+
<svg viewBox="0 0 600 160" class="w-full" role="img" aria-label="Histogram of {{ strength }} over the scanned corpus">
|
|
90
|
+
{% for b in bars %}
|
|
91
|
+
<rect x="{{ b.x }}" y="{{ b.y }}" width="{{ b.w }}" height="{{ b.h }}" class="{{ 'fill-orange-500' if positive else 'fill-sky-500' }}"><title>{{ b.label }}</title></rect>
|
|
92
|
+
{% endfor %}
|
|
93
|
+
<line x1="0" y1="140.5" x2="600" y2="140.5" class="stroke-slate-400" stroke-width="1"/>
|
|
94
|
+
<text x="0" y="156" class="fill-slate-500 font-mono" font-size="11">{{ sub.activation_histogram.bin_edges[0] | num(2) }}</text>
|
|
95
|
+
<text x="600" y="156" text-anchor="end" class="fill-slate-500 font-mono" font-size="11">{{ sub.activation_histogram.bin_edges[-1] | num(2) }}</text>
|
|
96
|
+
</svg>
|
|
97
|
+
<p class="mt-1 text-xs text-slate-500">{{ strength | capitalize }} per token{% if is_head %} (|W_O (z − z̄)|: distance from the head's mean write){% endif %}; bar height is log(1 + count).</p>
|
|
98
|
+
{% else %}
|
|
99
|
+
<p class="text-sm text-slate-500">No histogram recorded.</p>
|
|
100
|
+
{% endif %}
|
|
101
|
+
</section>
|
|
102
|
+
|
|
103
|
+
<section>
|
|
104
|
+
<h3 class="mb-3 text-base font-semibold">Mechanism</h3>
|
|
105
|
+
<p class="text-sm">
|
|
106
|
+
{% if sub.lookahead.is_lookahead %}
|
|
107
|
+
Claimed <strong>lookahead</strong>: prepares upcoming tokens
|
|
108
|
+
{% for tok in sub.lookahead.target_upcoming_tokens %}<code class="tok mx-0.5 rounded bg-violet-100 px-1 text-xs dark:bg-violet-900">{{ tok }}</code>{% endfor %}.
|
|
109
|
+
{% else %}
|
|
110
|
+
Claimed <strong>retrospective</strong>: responds to tokens already in context.
|
|
111
|
+
{% endif %}
|
|
112
|
+
</p>
|
|
113
|
+
{% if sub.input_attribution and sub.input_attribution.examples %}
|
|
114
|
+
{% set ia = sub.input_attribution %}
|
|
115
|
+
<h4 class="mt-4 mb-1 text-sm font-medium" title="Integrated gradients over the input token embeddings at each top example's peak (Sundararajan et al., 2017)">Input attribution</h4>
|
|
116
|
+
{% if ia.distances %}
|
|
117
|
+
<dl class="grid grid-cols-6 gap-px overflow-hidden rounded border border-slate-200 bg-slate-200 text-center text-xs dark:border-slate-800 dark:bg-slate-800">
|
|
118
|
+
{% for d in ia.distances %}
|
|
119
|
+
<div class="bg-white p-1 dark:bg-slate-950" title="Share of |attribution| on tokens this far back from the peak"><dt class="text-slate-500">{{ d.label }} back</dt><dd class="font-mono tabular-nums">{{ d.share | pct }}</dd></div>
|
|
120
|
+
{% endfor %}
|
|
121
|
+
</dl>
|
|
122
|
+
{% endif %}
|
|
123
|
+
<ul class="mt-2 space-y-1 text-xs">
|
|
124
|
+
{% for ex in ia.examples %}
|
|
125
|
+
<li>{% call spoiler(ex.example in v.offensive_examples) %}<span class="text-slate-500">#{{ ex.example + 1 }}{{ "" if ex.converged else " (not converged)" }} at</span> <code class="tok rounded bg-slate-100 px-1 dark:bg-slate-800">{{ ex.peak_token }}</code>:
|
|
126
|
+
{% for t in ex.top %}<code class="tok mr-1 rounded px-1" title="offset {{ t.offset }}; attribution {{ t.attribution | num(2) }}; replacing it alone {{ t.ablation_effect | num(2) }}">{{ t.token }}<sub class="text-slate-500">{{ t.offset }}</sub> {{ t.attribution | num(2) }}</code>{% endfor %}{% endcall %}</li>
|
|
127
|
+
{% endfor %}
|
|
128
|
+
</ul>
|
|
129
|
+
<p class="mt-1 text-xs text-slate-500">
|
|
130
|
+
Shares of the gap to <code>{{ ia.baseline_token }}</code> at every position but the first · converged on {{ ia.converged }} of {{ ia.examples | length }} · mean {{ ia.mean_distance | num(1) }} tokens back ·
|
|
131
|
+
agreement with replacing one token at a time ρ = {{ ia.ablation_agreement | num(2) }} · reported, not gated
|
|
132
|
+
</p>
|
|
133
|
+
{% endif %}
|
|
134
|
+
{% if sub.head_profile %}
|
|
135
|
+
{% set hp = sub.head_profile %}
|
|
136
|
+
<dl class="mt-4 grid grid-cols-3 gap-px overflow-hidden rounded border border-slate-200 bg-slate-200 text-center text-xs dark:border-slate-800 dark:bg-slate-800">
|
|
137
|
+
{% for label, value, hint in [
|
|
138
|
+
("Previous token", hp.previous_token_score, "Mean attention to the token before"),
|
|
139
|
+
("Duplicate token", hp.duplicate_token_score, "Mean attention from a repeated token to its earlier copy"),
|
|
140
|
+
("Induction", hp.induction_score, "Mean attention to the token after the earlier copy of the current token"),
|
|
141
|
+
] %}
|
|
142
|
+
<div class="bg-white p-2 dark:bg-slate-950" title="{{ hint }}"><dt class="text-slate-500">{{ label }}</dt><dd class="mt-0.5 font-mono text-base tabular-nums">{{ value | num(2) }}</dd></div>
|
|
143
|
+
{% endfor %}
|
|
144
|
+
</dl>
|
|
145
|
+
<p class="mt-1 text-xs text-slate-500">Attention-pattern scores on {{ hp.pattern_sequences }} random {{ hp.pattern_length }}-token sequences repeated twice (reported, not gated). Strength is measured from the head's mean output over {{ "{:,}".format(hp.mean_tokens) }} scanned tokens.</p>
|
|
146
|
+
{% endif %}
|
|
147
|
+
{% if sub.dictionary_profile %}
|
|
148
|
+
{% set dp = sub.dictionary_profile %}
|
|
149
|
+
<dl class="mt-4 grid grid-cols-2 gap-px overflow-hidden rounded border border-slate-200 bg-slate-200 text-center text-xs sm:grid-cols-4 dark:border-slate-800 dark:bg-slate-800">
|
|
150
|
+
{% for label, value, hint in [
|
|
151
|
+
("Explained variance", dp.explained_variance | num(2) if dp.explained_variance is not none else "–", "Fraction of the " ~ ("residual stream" if dp.output_site == "resid_post" else "MLP output") ~ "'s variance the whole dictionary reconstructs on the scan"),
|
|
152
|
+
("Mean L0", dp.mean_l0 | num(1) if dp.mean_l0 is not none else "–", "Active latents per scanned token"),
|
|
153
|
+
("Dead latents", dp.dead_share | pct if dp.dead_share is not none else "–", "Share of the dictionary's latents inactive on every scanned token"),
|
|
154
|
+
("Density", dp.density | pct_fine, "Share of scanned tokens on which this latent is non-zero"),
|
|
155
|
+
] %}
|
|
156
|
+
<div class="bg-white p-2 dark:bg-slate-950" title="{{ hint }}"><dt class="text-slate-500">{{ label }}</dt><dd class="mt-0.5 font-mono text-base tabular-nums">{{ value }}</dd></div>
|
|
157
|
+
{% endfor %}
|
|
158
|
+
</dl>
|
|
159
|
+
<p class="mt-1 text-xs text-slate-500">A latent of a {{ dp.kind }} with {{ "{:,}".format(dp.n_features) }} latents ({{ dp.repo }}{% if dp.revision %}@{{ dp.revision[:8] }}{% endif %}, <code>{{ dp.path }}</code>), reading <code>{{ dp.input_site }}</code>: a learned-basis baseline, not a native unit. Fit measured on {{ "{:,}".format(dp.tokens) }} scanned tokens (reported, not gated).</p>
|
|
160
|
+
{% endif %}
|
|
161
|
+
<dl class="mt-4 grid grid-cols-2 gap-2 text-sm">
|
|
162
|
+
<dt class="text-slate-500">Submitted by</dt><dd class="font-mono text-xs"><a class="underline-offset-2 hover:underline" href="{{ root }}{{ agent_href(sub.submitting_agent_model) }}" title="recorded as {{ sub.submitting_agent_model }}">{{ agent_name(sub.submitting_agent_model) }}</a>{% if sub.contributor %} <span class="font-sans text-slate-500">run by</span> {{ sub.contributor }}{% endif %}</dd>
|
|
163
|
+
{% if verdict %}
|
|
164
|
+
<dt class="text-slate-500">Reviewed by</dt><dd class="font-mono text-xs"><a class="underline-offset-2 hover:underline" href="{{ root }}{{ agent_href(verdict.reviewer_agent_model) }}" title="recorded as {{ verdict.reviewer_agent_model }}">{{ agent_name(verdict.reviewer_agent_model) }}</a>{% if verdict.contributor %} <span class="font-sans text-slate-500">run by</span> {{ verdict.contributor }}{% endif %}{% if e.record.self_reviewed %} <span class="font-sans text-amber-700 dark:text-amber-400">(same model as the proposer: not an independent review)</span>{% endif %}</dd>
|
|
165
|
+
<dt class="text-slate-500">Reviewed at</dt><dd class="font-mono text-xs">{{ verdict.timestamp.strftime("%Y-%m-%d %H:%M UTC") }}</dd>
|
|
166
|
+
<dt class="text-slate-500">Max activation</dt><dd class="font-mono text-xs">{{ sub.max_activation | num(4) }}</dd>
|
|
167
|
+
{% endif %}
|
|
168
|
+
{% if sub.provenance %}
|
|
169
|
+
{% set p = sub.provenance %}
|
|
170
|
+
<dt class="text-slate-500">Selection</dt><dd class="font-mono text-xs">{{ p.selection }}{% if p.seed is not none %} (seed {{ p.seed }}){% endif %}</dd>
|
|
171
|
+
<dt class="text-slate-500">Corpus</dt><dd class="font-mono text-xs">{{ p.corpus }} · {{ "{:,}".format(p.tokens_scanned) }} tokens{% if p.corpus_sample %} · seeded sample of {{ p.corpus_sample.documents }}/{{ p.corpus_sample.corpus_documents }} docs (≤ {{ "{:,}".format(p.corpus_sample.max_tokens) }} tokens, seed {{ p.corpus_sample.seed }}){% endif %}{% if p.snippet_tokens %} · {{ p.snippet_tokens }}-token windows{% if p.snippet_stride %} every {{ p.snippet_stride }} tokens{% endif %}{% endif %}{% set src = p.corpus_source or corpus_sources.get(p.corpus_sha256) %}{% if src and not p.corpus_source %} · <span title="Not recorded: the committed sidecar with this corpus's SHA-256">source {{ src }} (inferred)</span>{% endif %}{% if src and src.license %} · licence {{ src.license }}{% endif %}</dd>
|
|
172
|
+
{% set mix = language_mix(sub) %}
|
|
173
|
+
{% if mix %}
|
|
174
|
+
<dt class="text-slate-500" title="The scan's {{ "{:,}".format(mix.tokens) }} labelled tokens by their document's language, from the corpus's lang field">Languages</dt><dd class="font-mono text-xs">{% for l in mix.shown %}{{ l.label }} {{ l.share | pct }}{{ " · " if not loop.last }}{% endfor %}{% if mix.other >= 0.005 %} · other {{ mix.other | pct }}{% endif %}</dd>
|
|
175
|
+
{% endif %}
|
|
176
|
+
<dt class="text-slate-500">Model revision</dt><dd class="font-mono text-xs">{{ (p.model_revision or "unrecorded")[:12] }} · {{ p.dtype }}</dd>
|
|
177
|
+
{% set runs = [("scan", p.environment), ("review", verdict.environment if verdict else none)] | selectattr(1) | list %}{% if runs %}
|
|
178
|
+
<dt class="text-slate-500" title="The device each step ran on. Streamed: the layers were read from disk on each pass (--memory stream), which gives the same values, only slower.">Ran on</dt><dd class="font-mono text-xs">{% for step, env in runs %}{{ step }} {{ env.device }}{% if env.streamed %} <span class="font-sans">(streamed from disk)</span>{% endif %}{{ " · " if not loop.last }}{% endfor %}</dd>
|
|
179
|
+
{% endif %}
|
|
180
|
+
{% if p.costs %}
|
|
181
|
+
<dt class="text-slate-500">Run cost</dt><dd class="font-mono text-xs" title="Wall time and LLM usage of this experiment; reported, not gated">{{ p.costs.summary() }}</dd>
|
|
182
|
+
{% endif %}
|
|
183
|
+
{% endif %}
|
|
184
|
+
</dl>
|
|
185
|
+
</section>
|
|
186
|
+
</div>
|
|
187
|
+
|
|
188
|
+
{% include "_vocab_chart.html" %}
|
|
189
|
+
{% include "_patchscope.html" %}
|
|
190
|
+
{% include "_prior_art.html" %}
|
|
191
|
+
{% include "_steering.html" %}
|
|
192
|
+
{% include "_specificity.html" %}
|
|
193
|
+
{% include "_wiring.html" %}
|
|
194
|
+
|
|
195
|
+
{% if examples %}
|
|
196
|
+
<section class="mb-10" style="--heat-rgb: {{ '234 88 12' if positive else '2 132 199' }}">
|
|
197
|
+
<div class="mb-3 flex flex-wrap items-baseline gap-x-4 gap-y-1">
|
|
198
|
+
<h3 class="text-base font-semibold">Top-activating examples</h3>
|
|
199
|
+
<div class="flex items-center gap-2 text-xs text-slate-500" aria-hidden="true">
|
|
200
|
+
<span>0</span><span class="heat-scale h-2 w-24 rounded-sm"></span><span class="font-mono">{{ (sub.max_activation or 0) | num(2) }}</span>
|
|
201
|
+
<span class="ml-2"><span class="tok heat peak" style="--a: 1">peak</span> token</span>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
<p class="mb-3 text-xs text-slate-500">Each token is shaded by {{ strength }} as a fraction of the {{ peer if is_head or is_feature else ("superposition" if is_sup else "neuron") }}'s max activation;{% if is_head %} the tokens the peak attends to most are listed under each example;{% endif %} hover a token for its value. Up to 30 tokens before and 10 after each peak are shown.</p>
|
|
205
|
+
<ol class="space-y-2">
|
|
206
|
+
{% for ex in examples %}
|
|
207
|
+
<li class="rounded-lg border border-slate-200 p-3 text-sm leading-7 dark:border-slate-800">
|
|
208
|
+
<span class="mr-2 font-mono text-xs text-slate-500" title="peak strength">{{ ex.max_activation | num(2) }}</span>
|
|
209
|
+
{% call spoiler(ex.offensive) %}
|
|
210
|
+
{%- if ex.clipped_start %}<span class="text-slate-400">… </span>{% endif %}{{ heat_tokens(ex.window) }}{% if ex.clipped_end %}<span class="text-slate-400"> …</span>{% endif %}
|
|
211
|
+
{% if ex.attended %}
|
|
212
|
+
<div class="text-xs text-slate-500">Peak attends to {% for a in ex.attended %}<code class="tok rounded bg-slate-100 px-1 dark:bg-slate-800" title="{{ a.offset }} tokens from the peak">{{ a.text }}</code> {{ a.weight | num(2) }}{{ ", " if not loop.last }}{% endfor %}</div>
|
|
213
|
+
{% endif %}
|
|
214
|
+
<div class="mt-1 flex flex-wrap gap-x-4 text-xs text-slate-500">
|
|
215
|
+
{% if ex.clipped_start or ex.clipped_end %}
|
|
216
|
+
<details><summary class="cursor-pointer">All {{ ex.tokens | length }} tokens</summary>
|
|
217
|
+
<p class="mt-2 text-sm leading-7 text-slate-900 dark:text-slate-100">{{ heat_tokens(ex.tokens) }}</p>
|
|
218
|
+
</details>
|
|
219
|
+
{% endif %}
|
|
220
|
+
<details><summary class="cursor-pointer">Values</summary>
|
|
221
|
+
<table class="vt mt-2 font-mono text-xs">
|
|
222
|
+
<thead class="sr-only"><tr><th>Token</th><th>{{ strength | capitalize }}</th></tr></thead>
|
|
223
|
+
<tbody>
|
|
224
|
+
{{ values_rows(ex.window) }}
|
|
225
|
+
</tbody>
|
|
226
|
+
</table>
|
|
227
|
+
</details>
|
|
228
|
+
</div>
|
|
229
|
+
{% endcall %}
|
|
230
|
+
</li>
|
|
231
|
+
{% endfor %}
|
|
232
|
+
</ol>
|
|
233
|
+
</section>
|
|
234
|
+
{% endif %}
|
|
235
|
+
|
|
236
|
+
<section class="mb-10">
|
|
237
|
+
<h3 class="mb-3 text-base font-semibold">Minimal-pair counterfactuals</h3>
|
|
238
|
+
<div class="overflow-x-auto rounded-lg border border-slate-200 dark:border-slate-800">
|
|
239
|
+
<table class="w-full text-left text-sm">
|
|
240
|
+
<thead class="bg-slate-50 text-xs uppercase tracking-wide text-slate-500 dark:bg-slate-900">
|
|
241
|
+
<tr><th class="px-3 py-2">Base</th><th class="px-3 py-2">Counterfactual</th><th class="px-3 py-2 text-right">Expected Δ</th><th class="px-3 py-2 text-right">Observed Δ</th></tr>
|
|
242
|
+
</thead>
|
|
243
|
+
<tbody class="divide-y divide-slate-200 dark:divide-slate-800">
|
|
244
|
+
{% for cf in sub.counterfactuals %}
|
|
245
|
+
<tr>
|
|
246
|
+
<td class="px-3 py-2">{{ cf.base_prompt }}</td>
|
|
247
|
+
<td class="px-3 py-2">{{ cf.counterfactual_prompt }}</td>
|
|
248
|
+
<td class="px-3 py-2 text-right font-mono tabular-nums">{{ cf.expected_delta | num(2) }}</td>
|
|
249
|
+
<td class="px-3 py-2 text-right font-mono tabular-nums">{{ cf.observed_delta | num(2) }}</td>
|
|
250
|
+
</tr>
|
|
251
|
+
{% endfor %}
|
|
252
|
+
</tbody>
|
|
253
|
+
</table>
|
|
254
|
+
</div>
|
|
255
|
+
<p class="mt-1 text-xs text-slate-500">Δ = (base − counterfactual) peak {{ strength }}, as a fraction of max activation.</p>
|
|
256
|
+
</section>
|
|
257
|
+
|
|
258
|
+
{% if verdict %}
|
|
259
|
+
<section data-pagefind-ignore>
|
|
260
|
+
<h3 class="mb-1 text-base font-semibold">Adversarial review</h3>
|
|
261
|
+
<p class="mb-3 text-sm text-slate-600 dark:text-slate-400">{{ verdict.notes }}</p>
|
|
262
|
+
{% if verdict.metrics %}
|
|
263
|
+
{% set m = verdict.metrics %}
|
|
264
|
+
<div class="mb-4 flex flex-wrap gap-2 text-xs">
|
|
265
|
+
{% for gate, ok in m.gates.items() %}
|
|
266
|
+
<span class="rounded border px-2 py-0.5 font-mono {{ 'border-emerald-300 text-emerald-800 dark:border-emerald-800 dark:text-emerald-300' if ok else 'border-rose-300 text-rose-800 dark:border-rose-800 dark:text-rose-300' }}">{{ '✓' if ok else '✗' }} {{ gate | replace('_', ' ') }}</span>
|
|
267
|
+
{% endfor %}
|
|
268
|
+
</div>
|
|
269
|
+
<p class="mb-4 font-mono text-xs text-slate-500">
|
|
270
|
+
specificity {{ m.specificity | num(2) }} · sensitivity {{ m.sensitivity | num(2) }} ·
|
|
271
|
+
balanced accuracy {{ m.balanced_accuracy | num(2) }} · counterfactual reproduction {{ m.counterfactual_reproduction | num(2) }}
|
|
272
|
+
{% if verdict.policy %}· protocol v{{ verdict.policy.protocol_version }}{% endif %}
|
|
273
|
+
</p>
|
|
274
|
+
{% endif %}
|
|
275
|
+
{% if v.probes %}
|
|
276
|
+
{% set pc = v.probes %}
|
|
277
|
+
<figure class="mb-6">
|
|
278
|
+
<div class="overflow-x-auto">
|
|
279
|
+
<svg viewBox="0 0 {{ pc.width }} {{ pc.height }}" class="w-full min-w-[520px]" role="img" aria-label="Probe strengths against the activation threshold: {% for row in pc.rows %}{{ row.passed }} of {{ row.n }} {{ row.label | lower }} passed{{ '; ' if not loop.last else '' }}{% endfor %}. Values are in the table below.">
|
|
280
|
+
<rect x="{{ pc.threshold_x }}" y="{{ pc.top }}" width="{{ pc.right - pc.threshold_x }}" height="{{ pc.axis_y - pc.top }}" class="fill-slate-100 dark:fill-slate-900"/>
|
|
281
|
+
{% for row in pc.rows %}
|
|
282
|
+
<text x="0" y="{{ row.y - 2 }}" class="fill-slate-700 dark:fill-slate-300" font-size="12">{{ row.label }}</text>
|
|
283
|
+
<text x="0" y="{{ row.y + 13 }}" class="fill-slate-500" font-size="11">{{ row.passed }}/{{ row.n }} {{ row.expect }}</text>
|
|
284
|
+
<line x1="{{ pc.left }}" y1="{{ row.y }}" x2="{{ pc.right }}" y2="{{ row.y }}" class="stroke-slate-200 dark:stroke-slate-800" stroke-width="1"/>
|
|
285
|
+
{% endfor %}
|
|
286
|
+
<line x1="{{ pc.threshold_x }}" y1="{{ pc.top - 6 }}" x2="{{ pc.threshold_x }}" y2="{{ pc.axis_y }}" class="stroke-slate-500" stroke-width="1.5"/>
|
|
287
|
+
<text x="{{ pc.threshold_x + 4 }}" y="{{ pc.top - 10 }}" class="fill-slate-600 dark:fill-slate-400" font-size="11">threshold {{ pc.threshold | num(2) }} ({{ pc.threshold_frac | pct }} of max) → active</text>
|
|
288
|
+
{% for row in pc.rows %}{% for d in row.dots %}
|
|
289
|
+
<g>
|
|
290
|
+
<title>{{ d.label }}</title>
|
|
291
|
+
<circle cx="{{ d.cx }}" cy="{{ d.cy }}" r="10" fill="transparent"/>
|
|
292
|
+
{% if d.passed %}
|
|
293
|
+
<circle cx="{{ d.cx }}" cy="{{ d.cy }}" r="{{ pc.r }}" class="fill-emerald-500 stroke-white dark:stroke-slate-950" stroke-width="2"/>
|
|
294
|
+
{% else %}
|
|
295
|
+
<path d="M{{ d.cx - 4 }} {{ d.cy - 4 }}L{{ d.cx + 4 }} {{ d.cy + 4 }}M{{ d.cx + 4 }} {{ d.cy - 4 }}L{{ d.cx - 4 }} {{ d.cy + 4 }}" class="stroke-white dark:stroke-slate-950" stroke-width="5" stroke-linecap="round"/>
|
|
296
|
+
<path d="M{{ d.cx - 4 }} {{ d.cy - 4 }}L{{ d.cx + 4 }} {{ d.cy + 4 }}M{{ d.cx + 4 }} {{ d.cy - 4 }}L{{ d.cx - 4 }} {{ d.cy + 4 }}" class="stroke-rose-600 dark:stroke-rose-400" stroke-width="2.5" stroke-linecap="round"/>
|
|
297
|
+
{% endif %}
|
|
298
|
+
</g>
|
|
299
|
+
{% endfor %}{% endfor %}
|
|
300
|
+
<line x1="{{ pc.left }}" y1="{{ pc.axis_y + 0.5 }}" x2="{{ pc.right }}" y2="{{ pc.axis_y + 0.5 }}" class="stroke-slate-400" stroke-width="1"/>
|
|
301
|
+
{% for tx, label, anchor in [(pc.zero_x, "0", "middle"), (pc.max_x, "max " ~ (pc.scale | num(2)), "end" if pc.max_x > pc.right - 40 else "middle")] %}
|
|
302
|
+
<line x1="{{ tx }}" y1="{{ pc.axis_y }}" x2="{{ tx }}" y2="{{ pc.axis_y + 4 }}" class="stroke-slate-400" stroke-width="1"/>
|
|
303
|
+
<text x="{{ tx }}" y="{{ pc.axis_y + 16 }}" text-anchor="{{ anchor }}" class="fill-slate-500 font-mono" font-size="11">{{ label }}</text>
|
|
304
|
+
{% endfor %}
|
|
305
|
+
</svg>
|
|
306
|
+
</div>
|
|
307
|
+
<figcaption class="mt-1 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-slate-500">
|
|
308
|
+
<span><svg class="inline align-middle" width="12" height="12" aria-hidden="true"><circle cx="6" cy="6" r="5" class="fill-emerald-500"/></svg> passed</span>
|
|
309
|
+
<span><svg class="inline align-middle" width="12" height="12" aria-hidden="true"><path d="M2 2L10 10M10 2L2 10" class="stroke-rose-600 dark:stroke-rose-400" stroke-width="2.5" stroke-linecap="round"/></svg> failed</span>
|
|
310
|
+
<span>Peak {{ strength }} of each probe; the shaded side of the line counts as active. Hover a dot for its prompt.</span>
|
|
311
|
+
</figcaption>
|
|
312
|
+
</figure>
|
|
313
|
+
{% endif %}
|
|
314
|
+
<div class="overflow-x-auto rounded-lg border border-slate-200 dark:border-slate-800">
|
|
315
|
+
<table class="w-full text-left text-sm">
|
|
316
|
+
<thead class="bg-slate-50 text-xs uppercase tracking-wide text-slate-500 dark:bg-slate-900">
|
|
317
|
+
<tr><th class="px-3 py-2"></th><th class="px-3 py-2">Test</th><th class="px-3 py-2">Input</th><th class="px-3 py-2">Expected</th><th class="px-3 py-2 text-right">Observed</th></tr>
|
|
318
|
+
</thead>
|
|
319
|
+
<tbody class="divide-y divide-slate-200 dark:divide-slate-800">
|
|
320
|
+
{% for t in verdict.adversarial_test_results %}
|
|
321
|
+
<tr>
|
|
322
|
+
{% if t.measured %}
|
|
323
|
+
<td class="px-3 py-2 font-mono {{ 'text-emerald-600' if t.passed else 'text-rose-600' }}" aria-label="{{ 'passed' if t.passed else 'failed' }}">{{ '✓' if t.passed else '✗' }}</td>
|
|
324
|
+
{% else %}
|
|
325
|
+
<td class="px-3 py-2 font-mono text-slate-400" aria-label="unmeasured: one token" title="One token: the first token is never measured, so this counts in no metric">—</td>
|
|
326
|
+
{% endif %}
|
|
327
|
+
<td class="whitespace-nowrap px-3 py-2 font-mono text-xs">{{ t.kind | replace('_', ' ') }}</td>
|
|
328
|
+
<td class="px-3 py-2">{{ t.prompt }}{% if t.detail %}<div class="text-xs text-slate-500">{{ t.detail }}</div>{% endif %}</td>
|
|
329
|
+
<td class="whitespace-nowrap px-3 py-2 font-mono text-xs">
|
|
330
|
+
{% if t.expected_active is not none %}{{ 'active' if t.expected_active else 'inactive' }}{% elif t.expected_delta is not none %}Δ {{ t.expected_delta | num(2) }}{% endif %}
|
|
331
|
+
</td>
|
|
332
|
+
<td class="whitespace-nowrap px-3 py-2 text-right font-mono text-xs tabular-nums">
|
|
333
|
+
{% if t.activation is not none %}{{ t.activation | num(3) }}{% elif t.observed_delta is not none %}Δ {{ t.observed_delta | num(2) }}{% endif %}
|
|
334
|
+
</td>
|
|
335
|
+
</tr>
|
|
336
|
+
{% endfor %}
|
|
337
|
+
</tbody>
|
|
338
|
+
</table>
|
|
339
|
+
</div>
|
|
340
|
+
</section>
|
|
341
|
+
{% endif %}
|
|
342
|
+
|
|
343
|
+
{% if v.scores %}
|
|
344
|
+
{% set xs = v.scores %}{% set es = xs.s %}
|
|
345
|
+
<section class="mt-10" data-pagefind-ignore style="--heat-rgb: {{ '234 88 12' if positive else '2 132 199' }}">
|
|
346
|
+
<h3 class="mb-1 text-base font-semibold">Explanation scores on held-out text</h3>
|
|
347
|
+
<p class="mb-4 max-w-3xl text-sm text-slate-600 dark:text-slate-400">
|
|
348
|
+
A judge given only the hypothesis reads {{ es.window_tokens }}-token windows of corpus text the proposer never saw: it picks the windows that activate the pole (detection), and checks whether marked tokens are the active ones (fuzzing). Recorded, not gated; 0.5 is chance.
|
|
349
|
+
</p>
|
|
350
|
+
<div class="mb-4 grid gap-px overflow-hidden rounded-lg border border-slate-200 bg-slate-200 sm:grid-cols-3 dark:border-slate-800 dark:bg-slate-800">
|
|
351
|
+
{% for label, value, hint in [
|
|
352
|
+
("Detection", es.detection.balanced_accuracy if es.detection else none, "Balanced accuracy of the judge picking active windows"),
|
|
353
|
+
("Fuzzing", es.fuzzing.balanced_accuracy if es.fuzzing else none, "Balanced accuracy of the judge checking marked tokens"),
|
|
354
|
+
("Embedding AUROC", es.embedding_auroc, "How well similarity to the hypothesis separates active from inactive windows (" ~ (es.embedding_model or "no model") ~ ")"),
|
|
355
|
+
] %}
|
|
356
|
+
<div class="bg-white p-4 dark:bg-slate-950" title="{{ hint }}">
|
|
357
|
+
<div class="text-xs uppercase tracking-wide text-slate-500">{{ label }}</div>
|
|
358
|
+
<div class="mt-1 font-mono text-2xl tabular-nums">{{ value | num(2) }}</div>
|
|
359
|
+
<div class="relative mt-2 h-1.5 rounded bg-slate-200 dark:bg-slate-800">
|
|
360
|
+
<div class="h-1.5 rounded {{ 'bg-emerald-500' if (value or 0) >= 0.7 else 'bg-amber-500' if (value or 0) > 0.55 else 'bg-slate-400' }}" style="width: {{ ((value or 0) * 100) | round(1) }}%"></div>
|
|
361
|
+
<div class="absolute -top-0.5 left-1/2 h-2.5 w-px bg-slate-500" title="chance"></div>
|
|
362
|
+
</div>
|
|
363
|
+
</div>
|
|
364
|
+
{% endfor %}
|
|
365
|
+
</div>
|
|
366
|
+
<div class="mb-4 grid gap-6 text-sm lg:grid-cols-2">
|
|
367
|
+
{% if es.detection %}
|
|
368
|
+
<div>
|
|
369
|
+
<h4 class="mb-2 text-sm font-medium" title="Share of active held-out windows in each bin of peak strength that the judge picked">Detection recall by activation strength</h4>
|
|
370
|
+
<div class="flex items-end gap-2">
|
|
371
|
+
{% for r in es.detection.recall_by_quantile %}
|
|
372
|
+
<div class="flex-1 text-center">
|
|
373
|
+
<div class="flex h-16 items-end rounded bg-slate-100 dark:bg-slate-900"><div class="w-full rounded bg-emerald-500" style="height: {{ ((r or 0) * 100) | round(1) }}%"></div></div>
|
|
374
|
+
<div class="mt-1 font-mono text-xs tabular-nums">{{ r | num(2) }}</div>
|
|
375
|
+
</div>
|
|
376
|
+
{% endfor %}
|
|
377
|
+
</div>
|
|
378
|
+
<div class="mt-1 flex justify-between text-xs text-slate-500"><span>weakest</span><span>strongest</span></div>
|
|
379
|
+
<p class="mt-2 text-xs text-slate-500">False alarms on inactive windows: {{ es.detection.false_positive_rate | pct }}.</p>
|
|
380
|
+
</div>
|
|
381
|
+
{% endif %}
|
|
382
|
+
<dl class="grid grid-cols-2 content-start gap-1 text-sm">
|
|
383
|
+
<dt class="text-slate-500">Judge</dt><dd class="font-mono text-xs">{% if es.judge_model %}<a class="underline-offset-2 hover:underline" href="{{ root }}{{ agent_href(es.judge_model) }}" title="recorded as {{ es.judge_model }}">{{ agent_name(es.judge_model) }}</a>{% else %}—{% endif %}</dd>
|
|
384
|
+
<dt class="text-slate-500">Held-out windows</dt><dd class="font-mono text-xs">{{ "{:,}".format(es.active_windows) }} active of {{ "{:,}".format(es.candidate_windows) }}</dd>
|
|
385
|
+
<dt class="text-slate-500">Judged</dt><dd class="font-mono text-xs">{{ es.detection_windows | length }} detection · {{ es.fuzzing_windows | length }} fuzzing</dd>
|
|
386
|
+
<dt class="text-slate-500">Detection outcomes</dt><dd class="font-mono text-xs">{% for o, n in xs.counts.items() %}{{ n }} {{ o }}{{ ' · ' if not loop.last }}{% endfor %}</dd>
|
|
387
|
+
<dt class="text-slate-500">Seed</dt><dd class="font-mono text-xs">{{ es.seed }} · {{ es.corpus }}</dd>
|
|
388
|
+
</dl>
|
|
389
|
+
</div>
|
|
390
|
+
<details class="mb-2 text-sm">
|
|
391
|
+
<summary class="cursor-pointer text-slate-600 dark:text-slate-400">Detection windows ({{ xs.detection | length }}), the explanation's mistakes first</summary>
|
|
392
|
+
<ol class="mt-3 space-y-2">
|
|
393
|
+
{% for r in xs.detection %}
|
|
394
|
+
<li class="rounded-lg border p-3 leading-7 {{ 'border-rose-300 dark:border-rose-800' if r.outcome in ('missed', 'false alarm') else 'border-slate-200 dark:border-slate-800' }}">
|
|
395
|
+
<span class="mr-2 rounded px-1.5 py-0.5 font-mono text-xs {{ 'bg-rose-100 text-rose-800 dark:bg-rose-950 dark:text-rose-300' if r.outcome in ('missed', 'false alarm') else 'bg-slate-100 text-slate-600 dark:bg-slate-800 dark:text-slate-300' }}">{{ r.outcome }}</span>
|
|
396
|
+
<span class="mr-2 font-mono text-xs text-slate-500" title="peak strength{% if r.w.quantile is not none %}, activation bin {{ r.w.quantile + 1 }} of {{ es.quantiles }}{% endif %}">{{ r.peak | num(2) }}{% if r.w.similarity is not none %} · sim {{ r.w.similarity | num(2) }}{% endif %}</span>
|
|
397
|
+
{% call spoiler(r.offensive) %}{{ heat_tokens(r.tokens) }}{% endcall %}
|
|
398
|
+
</li>
|
|
399
|
+
{% endfor %}
|
|
400
|
+
</ol>
|
|
401
|
+
</details>
|
|
402
|
+
{% if xs.fuzzing %}
|
|
403
|
+
<details class="text-sm">
|
|
404
|
+
<summary class="cursor-pointer text-slate-600 dark:text-slate-400">Fuzzing windows ({{ xs.fuzzing | length }}), dashed tokens were marked for the judge</summary>
|
|
405
|
+
<ol class="mt-3 space-y-2">
|
|
406
|
+
{% for r in xs.fuzzing %}
|
|
407
|
+
{% set right = r.w.judged == r.w.label %}
|
|
408
|
+
<li class="rounded-lg border p-3 leading-7 {{ 'border-slate-200 dark:border-slate-800' if right else 'border-rose-300 dark:border-rose-800' }}">
|
|
409
|
+
<span class="mr-2 rounded px-1.5 py-0.5 font-mono text-xs {{ 'bg-slate-100 text-slate-600 dark:bg-slate-800 dark:text-slate-300' if right else 'bg-rose-100 text-rose-800 dark:bg-rose-950 dark:text-rose-300' }}">marks {{ 'right' if r.w.label else 'wrong' }} · judged {{ 'right' if r.w.judged else 'wrong' }}</span>
|
|
410
|
+
{% call spoiler(r.offensive) %}{{ heat_tokens(r.tokens) }}{% endcall %}
|
|
411
|
+
</li>
|
|
412
|
+
{% endfor %}
|
|
413
|
+
</ol>
|
|
414
|
+
</details>
|
|
415
|
+
{% endif %}
|
|
416
|
+
</section>
|
|
417
|
+
{% endif %}
|
|
418
|
+
|
|
419
|
+
<section class="mt-10" data-pagefind-ignore>
|
|
420
|
+
<h3 class="mb-3 text-base font-semibold">Covariance and confounds</h3>
|
|
421
|
+
{% set m = verdict.metrics %}
|
|
422
|
+
{% set cf = sub.confounds %}
|
|
423
|
+
{% set ja = verdict.joint_ablation %}
|
|
424
|
+
{% if not (cf or v.correlated or ja) %}
|
|
425
|
+
<p class="text-sm text-slate-500">Not recorded: this scan predates protocol 0.3. A rescan adds correlated neurons, the confound profile and joint ablation.</p>
|
|
426
|
+
{% else %}
|
|
427
|
+
<div class="grid gap-6 lg:grid-cols-3">
|
|
428
|
+
<div>
|
|
429
|
+
<h4 class="mb-2 text-sm font-medium">Confounds</h4>
|
|
430
|
+
{% if cf %}
|
|
431
|
+
<dl class="grid grid-cols-2 gap-1 text-sm">
|
|
432
|
+
<dt class="text-slate-500" title="Variance explained by a per-token-id mean">Token identity R²</dt><dd class="font-mono">{{ cf.token_r2 | num(2) }}</dd>
|
|
433
|
+
<dt class="text-slate-500" title="Variance explained by a per-position mean">Position R²</dt><dd class="font-mono">{{ cf.position_r2 | num(2) }}</dd>
|
|
434
|
+
<dt class="text-slate-500" title="log token frequency vs mean strength">Frequency r</dt><dd class="font-mono">{{ cf.frequency_correlation | num(2) }}</dd>
|
|
435
|
+
{% for name, lc in (cf.labels or {}).items() %}
|
|
436
|
+
<dt class="text-slate-500" title="Variance explained by a per-{{ name }} mean, and binned mutual information, over {{ lc.labelled_tokens }} labelled tokens">{{ name | capitalize }} R² · MI</dt><dd class="font-mono">{{ lc.r2 | num(2) }} · {{ lc.mutual_information_bits | num(3) }} bits</dd>
|
|
437
|
+
{% endfor %}
|
|
438
|
+
{% if m and m.confound_baseline %}
|
|
439
|
+
<dt class="text-slate-500">Best trivial baseline</dt><dd class="font-mono text-xs">{{ m.confound_baseline }} · {{ m.confound_baseline_accuracy | num(2) }}</dd>
|
|
440
|
+
<dt class="text-slate-500">Hypothesis</dt><dd class="font-mono text-xs">{{ m.balanced_accuracy | num(2) }} {{ '✓' if m.gates.get('beats_confound_baseline') else '✗' }}</dd>
|
|
441
|
+
{% endif %}
|
|
442
|
+
</dl>
|
|
443
|
+
<p class="mt-2 flex flex-wrap gap-1">
|
|
444
|
+
{% for t in cf.trigger_tokens[:12] %}<code class="tok rounded border border-slate-300 px-1 text-xs dark:border-slate-700" title="mean {{ t.mean_strength | num(3) }} over {{ t.count }}">{{ t.token }}</code>{% endfor %}
|
|
445
|
+
</p>
|
|
446
|
+
{% else %}<p class="text-sm text-slate-500">No confound profile.</p>{% endif %}
|
|
447
|
+
</div>
|
|
448
|
+
<div>
|
|
449
|
+
<h4 class="mb-2 text-sm font-medium" title="Neuron poles in the same layer that fire when this pole fires">Co-activating neuron poles</h4>
|
|
450
|
+
{% if v.correlated %}
|
|
451
|
+
<table class="w-full font-mono text-xs">
|
|
452
|
+
<thead class="text-slate-500">
|
|
453
|
+
<tr>
|
|
454
|
+
<th class="pb-1 text-left font-normal">Pole</th>
|
|
455
|
+
<th class="pb-1 text-right font-normal" title="P(partner active | this pole active) / P(partner active): 95% lower bound (point estimate)">Lift ≥</th>
|
|
456
|
+
<th class="pb-1 text-right font-normal" title="Tokens where both are active">Both</th>
|
|
457
|
+
<th class="pb-1 text-right font-normal" title="Spearman rank correlation of pole strengths">ρ</th>
|
|
458
|
+
<th class="pb-1 text-right font-normal" title="Pearson correlation with signed activation (reference)">r</th>
|
|
459
|
+
</tr>
|
|
460
|
+
</thead>
|
|
461
|
+
<tbody>
|
|
462
|
+
{% for row in v.correlated %}
|
|
463
|
+
{% set c = row.c %}
|
|
464
|
+
<tr>
|
|
465
|
+
<td>{% if row.href %}<a class="text-emerald-700 underline dark:text-emerald-400" href="{{ root }}{{ row.href }}">N{{ c.neuron_idx }}</a>{% else %}N{{ c.neuron_idx }}{% endif %}{{ pole_mark(c.pole) }}</td>
|
|
466
|
+
<td class="text-right {{ 'font-semibold' if c.coactivation_lift_lower >= 2 }}" title="point estimate {{ '%.1f' | format(c.coactivation_lift) }}">{{ "%.1f" | format(c.coactivation_lift_lower) }}</td>
|
|
467
|
+
<td class="text-right text-slate-500">{{ c.coactive_tokens }}</td>
|
|
468
|
+
<td class="text-right">{{ "%+.2f" | format(c.spearman) }}</td>
|
|
469
|
+
<td class="text-right text-slate-500">{{ "%+.2f" | format(c.pearson) }}</td>
|
|
470
|
+
</tr>
|
|
471
|
+
{% endfor %}
|
|
472
|
+
</tbody>
|
|
473
|
+
</table>
|
|
474
|
+
<p class="mt-2 text-xs text-slate-500">Ranked by the 95% lower bound of co-activation lift: how much more often a pole fires when this one does, discounting chance coincidences. ρ is rank-based and robust to heavy tails.</p>
|
|
475
|
+
{% else %}<p class="text-sm text-slate-500">{{ "Not measured for attention heads." if is_head else ("Not measured for dictionary features." if is_feature else "None recorded.") }}</p>{% endif %}
|
|
476
|
+
</div>
|
|
477
|
+
<div>
|
|
478
|
+
<h4 class="mb-2 text-sm font-medium">Joint ablation</h4>
|
|
479
|
+
{% if ja %}
|
|
480
|
+
<dl class="grid grid-cols-2 gap-1 text-sm">
|
|
481
|
+
<dt class="text-slate-500">Partners</dt><dd class="font-mono text-xs">{% for p in ja.partners %}N{{ p }}{{ ', ' if not loop.last }}{% endfor %}</dd>
|
|
482
|
+
<dt class="text-slate-500">KL pole alone</dt><dd class="font-mono text-xs">{{ "%.2e" | format(ja.kl_single) }}</dd>
|
|
483
|
+
<dt class="text-slate-500">KL partners</dt><dd class="font-mono text-xs">{{ "%.2e" | format(ja.kl_partners) }}</dd>
|
|
484
|
+
<dt class="text-slate-500">KL together</dt><dd class="font-mono text-xs">{{ "%.2e" | format(ja.kl_joint) }}</dd>
|
|
485
|
+
<dt class="text-slate-500" title="(KL together − KL partners) / KL pole alone">Redundancy ratio</dt><dd class="font-mono text-xs">{{ ja.redundancy_ratio | num(2) }}</dd>
|
|
486
|
+
</dl>
|
|
487
|
+
<p class="mt-2 text-xs text-slate-500">
|
|
488
|
+
{% if ja.redundancy_ratio is none %}The pole alone has no measurable effect.
|
|
489
|
+
{% elif ja.redundancy_ratio > 1.5 %}The pole matters more once its partners are removed: likely redundancy.
|
|
490
|
+
{% elif ja.redundancy_ratio < 0.5 %}With the partners already removed, also removing this pole adds little: its effect overlaps with theirs (a shared pathway).
|
|
491
|
+
{% else %}The partners don't change the pole's effect much.{% endif %}
|
|
492
|
+
</p>
|
|
493
|
+
{% else %}<p class="text-sm text-slate-500">{{ "Not run for attention heads." if is_head else ("Not run for dictionary features." if is_feature else "Not run: no partner reached the correlation threshold.") }}</p>{% endif %}
|
|
494
|
+
</div>
|
|
495
|
+
</div>
|
|
496
|
+
{% endif %}
|
|
497
|
+
</section>
|
|
498
|
+
</div>
|
|
499
|
+
</details>
|
|
500
|
+
</section>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{# Fill per neuron status on the layer map and pieces bars. Defined in builder/statuses.py. #}
|
|
2
|
+
{% set map_fill = statuses.STATUS_FILL %}
|
|
3
|
+
|
|
4
|
+
{% macro status_badge(status) -%}
|
|
5
|
+
<span class="whitespace-nowrap rounded px-2 py-0.5 text-xs font-semibold {{ statuses.STATUS_BADGE[status] }}">{{ status | replace('_', ' ') }}</span>
|
|
6
|
+
{%- endmacro %}
|
|
7
|
+
|
|
8
|
+
{# Why a scan stopped on a chosen unit, in words. #}
|
|
9
|
+
{% macro stop_outcome(stop) -%}
|
|
10
|
+
{{ stop.outcome | replace('_', '-') }}{% if stop.proven_dead %} (proven by the weights){% endif %}
|
|
11
|
+
{%- endmacro %}
|
|
12
|
+
|
|
13
|
+
{% macro evidence_badge(conclusiveness, direction) -%}
|
|
14
|
+
{% set strength = evidence_strength(conclusiveness) %}
|
|
15
|
+
{% set supports = direction == 'supports' %}
|
|
16
|
+
<span class="whitespace-nowrap rounded border px-2 py-0.5 text-xs {{ 'border-emerald-300 text-emerald-800 dark:border-emerald-800 dark:text-emerald-300' if supports else 'border-rose-300 text-rose-800 dark:border-rose-800 dark:text-rose-300' }}"
|
|
17
|
+
title="Conclusiveness {{ conclusiveness | num(2) }}: how settled the probe evidence is, in either direction">
|
|
18
|
+
{{ strength }} evidence {{ 'for' if supports else 'against' }} · {{ conclusiveness | num(2) }}
|
|
19
|
+
</span>
|
|
20
|
+
{%- endmacro %}
|
|
21
|
+
|
|
22
|
+
{# The proposer's model also wrote the probes. Recorded, not gated (protocol §2). #}
|
|
23
|
+
{% macro self_review_badge() -%}
|
|
24
|
+
<span class="whitespace-nowrap rounded border border-dashed border-amber-400 px-2 py-0.5 text-xs text-amber-800 dark:border-amber-700 dark:text-amber-300"
|
|
25
|
+
title="The proposer's model also wrote the probes, so this is not an independent review. Allowed, but a re-review by a different model is worth more: open-interpretability next draws these.">self-reviewed</span>
|
|
26
|
+
{%- endmacro %}
|
|
27
|
+
|
|
28
|
+
{# Scanned on the 552-token built-in sample: the max activation behind every "active" line means little. #}
|
|
29
|
+
{% macro builtin_sample_badge() -%}
|
|
30
|
+
<span class="whitespace-nowrap rounded border border-dashed border-amber-400 px-2 py-0.5 text-xs text-amber-800 dark:border-amber-700 dark:text-amber-300"
|
|
31
|
+
title="Scanned on the 552-token built-in sample, not the registry corpus, so its max activation (the denominator of every 'active' line) means little. open-interpretability next draws a rescan instead of re-reviewing it.">built-in sample</span>
|
|
32
|
+
{%- endmacro %}
|
|
33
|
+
|
|
34
|
+
{% macro pole_mark(pole) -%}
|
|
35
|
+
<span class="{{ 'text-orange-600' if pole == 'positive' else 'text-sky-600' }}">{{ '+' if pole == 'positive' else '−' }}</span>
|
|
36
|
+
{%- endmacro %}
|
|
37
|
+
|
|
38
|
+
{% macro breadcrumb(root, model=none, layer=none, neuron=none, unit_link=false) -%}
|
|
39
|
+
<nav class="mb-4 text-xs text-slate-500">
|
|
40
|
+
<a class="underline" href="{{ root }}index.html">Registry</a>
|
|
41
|
+
{% if model %} / {% if layer %}<a class="underline" href="{{ root }}{{ model.href }}">{{ model.name }}</a>{% else %}{{ model.name }}{% endif %}{% endif %}
|
|
42
|
+
{% if layer %} / {% if neuron %}<a class="underline" href="{{ root }}{{ layer.href }}">Layer {{ layer.layer }}</a>{% else %}Layer {{ layer.layer }}{% endif %}{% endif %}
|
|
43
|
+
{% if neuron %} / {% if unit_link %}<a class="underline" href="{{ root }}{{ neuron.href }}">{% endif %}{{ neuron.noun | capitalize }} {{ neuron.idx }}{% if neuron.dictionary %} ({{ neuron.dictionary }}){% endif %}{% if unit_link %}</a>{% endif %}{% endif %}
|
|
44
|
+
</nav>
|
|
45
|
+
{%- endmacro %}
|
|
46
|
+
|
|
47
|
+
{# Tokens shaded by pole strength; hover (or tap) a token for its exact value. #}
|
|
48
|
+
{# Masks an example that matched the word list of openinterp/sensitive.py until the reader opts in. CSS only, so it works with no script. Pagefind leaves it out, so search results do not show the text. #}
|
|
49
|
+
{% macro spoiler(masked) -%}
|
|
50
|
+
{%- if masked -%}
|
|
51
|
+
<div class="spoiler" data-pagefind-ignore>
|
|
52
|
+
<input type="checkbox" class="spoiler-toggle" aria-label="Show text that may be offensive or distressing">
|
|
53
|
+
<span class="spoiler-cover" aria-hidden="true">May be offensive or distressing · select to show</span>
|
|
54
|
+
<div class="spoiler-body">{{ caller() }}</div>
|
|
55
|
+
</div>
|
|
56
|
+
{%- else -%}
|
|
57
|
+
{{ caller() }}
|
|
58
|
+
{%- endif -%}
|
|
59
|
+
{%- endmacro %}
|
|
60
|
+
|
|
61
|
+
{# The spans are built in Python (builder/heat.py), because pages show many thousands of tokens. #}
|
|
62
|
+
{% macro heat_tokens(tokens) -%}
|
|
63
|
+
{{ heat_html(tokens) }}
|
|
64
|
+
{%- endmacro %}
|
|
65
|
+
|
|
66
|
+
{# What errata changed about one experiment (core/errata.py). Errata have no page of their own. #}
|
|
67
|
+
{% macro errata_notes(errata, edits, repo_url) -%}
|
|
68
|
+
{% for x in errata %}
|
|
69
|
+
<div role="note" class="mt-3 max-w-3xl rounded-lg border border-amber-400 bg-amber-50 p-3 text-xs text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200">
|
|
70
|
+
<p><span class="font-semibold">Erratum, {{ x.date.isoformat() }}: {{ x.title }}.</span>
|
|
71
|
+
{% if x.set_aside %}This record is set aside: it no longer counts toward the status.{% else %}This page shows the record with these corrections:{% endif %}</p>
|
|
72
|
+
{% if not x.set_aside %}
|
|
73
|
+
<ul class="mt-1 list-disc pl-5">
|
|
74
|
+
{% for d in edits if d.erratum == x.id %}
|
|
75
|
+
<li><code>{{ d.path }}</code>: <span class="line-through">{{ d.before | tojson | truncate(80) }}</span> → {{ d.after | tojson | truncate(80) }}</li>
|
|
76
|
+
{% endfor %}
|
|
77
|
+
</ul>
|
|
78
|
+
{% endif %}
|
|
79
|
+
<p class="mt-1">{{ x.bug }} Fixed in <a class="font-mono underline" href="{{ repo_url }}/commit/{{ x.fixed_in }}">{{ x.fixed_in[:12] }}</a>.</p>
|
|
80
|
+
</div>
|
|
81
|
+
{% endfor %}
|
|
82
|
+
{%- endmacro %}
|