{# Fill per neuron status on the layer map and pieces bars. Defined in builder/statuses.py. #} {% set map_fill = statuses.STATUS_FILL %} {% macro status_badge(status) -%} {{ status | replace('_', ' ') }} {%- endmacro %} {# A broad unit (#4545): VERIFIED, but active on at least half its held-out windows. Text, not colour. #} {% macro broad_badge() -%} broad {%- endmacro %} {# Why a scan stopped on a chosen unit, in words. #} {% macro stop_outcome(stop) -%} {{ stop.outcome | replace('_', '-') }}{% if stop.proven_dead %} (proven by the weights){% endif %} {%- endmacro %} {% macro evidence_badge(conclusiveness, direction) -%} {% set strength = evidence_strength(conclusiveness) %} {% set supports = direction == 'supports' %} {{ strength }} evidence {{ 'for' if supports else 'against' }} · {{ conclusiveness | num(2) }} {%- endmacro %} {# The proposer's model also wrote the probes. Recorded, not gated (protocol §2). #} {% macro self_review_badge() -%} self-reviewed {%- endmacro %} {# Scanned on the 552-token built-in sample: the max activation behind every "active" line means little. #} {% macro builtin_sample_badge() -%} built-in sample {%- endmacro %} {% macro pole_mark(pole) -%} {{ '+' if pole == 'positive' else '−' }} {%- endmacro %} {% macro breadcrumb(root, model=none, layer=none, neuron=none, unit_link=false) -%} {%- endmacro %} {# Tokens shaded by pole strength; hover (or tap) a token for its exact value. #} {# Masks an example that matched the word list of labinacan/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. #} {% macro spoiler(masked) -%} {%- if masked -%}
{{ caller() }}
{%- else -%} {{ caller() }} {%- endif -%} {%- endmacro %} {# The spans are built in Python (builder/heat.py), because pages show many thousands of tokens. #} {% macro heat_tokens(tokens) -%} {{ heat_html(tokens) }} {%- endmacro %} {# What errata changed about one experiment (core/errata.py). Errata have no page of their own. #} {% macro errata_notes(errata, edits, repo_url) -%} {% for x in errata %}

Erratum, {{ x.date.isoformat() }}: {{ x.title }}. {% 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 %}

{% if not x.set_aside %} {% endif %}

{{ x.bug }} Fixed in {{ x.fixed_in[:12] }}.

{% endfor %} {%- endmacro %} {# The open experiment PRs (builder/pending.py, #3283): what is still running or landing. #} {% macro pending_table(pending, root, show_model=true) -%}
{% call fold("Pending experiments (" ~ pending | length ~ ")", level=2) %}

In an open pull request as of this build, newest first.

{% for p in pending %} {% endfor %}
UnitDrawStatePR
L{{ p.layer }}/{{ p.unit }}{% if p.pole %}{{ pole_mark(p.pole) }}{% endif %}{% if show_model %}
{{ p.model_slug.replace('--', '/') }}
{% endif %}
{{ p.kind.replace('_', ' ') }} {% if p.draft %}running (draft){% else %}waiting for checks{% endif %} #{{ p.number }}
{% endcall %}
{%- endmacro %} {# A model's card: its statistics and its pieces bars (builder/pieces.py), on the home and Models pages (#3287). `idx` keeps each card's SVG pattern id unique on the page. #} {% macro model_card(m, explore, root, idx) -%} {% set pc = pieces.status_grid(m, scale=grid_scale) %} {# One layout on every card (#5724): the name, then the same four statistics in a grid. #}
{{ m.name }}{% if m.name == explore.model %}explore focus{% endif %}
{% set v = explore.models[m.name] %}
Experiments
{{ m.experiments | thousands }}
Neurons studied
{{ m.neurons_studied | thousands }} of {{ m.total_neurons | thousands }} ({{ m.coverage | pct_fine }})
{% if m.member_only %}
{{ m.member_only }} only in a superposition
{% endif %}
Verified
{{ v.verified | thousands }} of {{ m.total_neurons | thousands }} ({{ (v.verified / m.total_neurons if m.total_neurons else none) | pct_fine }})
{% if v.dead %}
{{ v.dead }} of them proven dead
{% endif %}
Target
{{ '{:g}%'.format(100 * explore.target) }} verified
{% if pc %}
{{ status_grid(pc, root, "card-" ~ idx, m.name, stretch=true) }}
{% endif %}
{%- endmacro %} {# The rows of an explanations table: on the Explanations index and on each model page (#4206). #} {# Prompts and their explanations (#4503): one row per prompt, linking to its page. #} {% macro explanation_rows(prompts, root, show_model=true) -%}
{% if show_model %}{% endif %} {% for p in prompts %} {% if show_model %}{% endif %} {% endfor %}
NewestModelPrompt → answerExplanationsBest coverageState
{{ p.record.model_name }}{{ p.record.prompt | truncate(90) }} → {{ p.record.answer }} {{ p.explanations | length }} {{ p.best_coverage | pct_fine if p.best_coverage is not none else "—" }} {% if p.stale %}stale: {{ p.changed | length }} unit{{ 's' if p.changed | length != 1 }} changed{% else %}current{% endif %}
{%- endmacro %} {# A paper's status (#3150): a preprint with the issues still open on it, or published on a day. Text says it, not colour. #} {% macro paper_status(status, repo_url) -%} {% if status %}{% if status.preprint %}Preprint work left: {% for n in status.issues %}#{{ n }}{{ ", " if not loop.last }}{% endfor %}{% else %}Published ; changes since are addenda{% endif %}{% endif %} {%- endmacro %} {# The chevron of `fold` and `read_more`. It points right when closed and down when open, so the state shows by shape, not by colour. #} {% macro chevron() -%} {%- endmacro %} {# Method text that the reader opens: how a value is measured, what a gate tests, caveats (#5566). The page shows the result, and this holds the rest. #} {% macro read_more(label="Read more") -%}
{{ chevron() }}{{ label }}
{{ caller() }}
{%- endmacro %} {# One section of a page, closed until the reader opens it (#5566). The title is the section's heading, inside the summary. #} {% macro fold(title, hint=none, open=false, level=3) -%}
{{ chevron() }}{{ title }}
{{ caller() }}
{%- endmacro %} {# A chart at its natural size (#5660). The SVG's width and height equal its viewBox, so it never scales, and every in it is charts.CHART_TEXT_PX at any screen width. On a screen narrower than the chart, the box scrolls sideways, not the page. The box takes keyboard focus so that a reader with no mouse can scroll it. `name` labels the box, and `label` describes the chart. #} {% macro chart(width, height, name, label, role="img", extra="", labelledby=none, scale=none) -%} {#- A hand-drawn diagram passes `scale`: its text keeps the sizes it was drawn with, and the whole figure draws at `scale` times its viewBox, still at one size on every screen. -#} {%- set text_rule = "" if scale else "[&_text]:text-[" ~ charts.CHART_TEXT_PX ~ "px]" -%} {%- set drawn = width * (scale or 1) -%}
{{ caller() }}
{#- Below the width where the chart fits (the breakpoint less 2 × 16 px of padding), say that it scrolls. -#} {%- set fits = "hidden" if drawn <= 358 else "sm:hidden" if drawn <= 608 else "md:hidden" if drawn <= 736 else "lg:hidden" if drawn <= 992 else "xl:hidden" -%} {%- if fits != "hidden" %} {%- endif %} {%- endmacro %} {# A status grid (#5797): pieces.status_grid's cells, and a legend drawn from the same data. A cell's colour and height both give its best status, and each legend swatch has the shape of its cell. `stretch` is a model card's: no text and no links (the card is a link), and the cells stretch to the card's width while each row keeps its height in px. #} {% macro status_grid(g, root, key, name, stretch=false) -%} {%- set each = "one neuron" if g.block == 1 else g.block ~ " neurons" -%} {%- set label -%}Status grid of {{ name }}: one row {{ "per layer, L0 at the top" if g.block > 1 else "of " ~ g.per_row ~ " neurons" }}, each cell {{ each }}. {{ g.studied | thousands }} studied neurons ({% for s, n in g.legend %}{{ n }} {{ s | replace('_', ' ') }}{{ ', ' if not loop.last }}{% endfor %}). {{ "A cell's height is the number of studied neurons in its block, split by status, VERIFIED at the bottom." if g.block > 1 else "A cell's colour gives its status." }}{%- endset -%} {%- set body -%} {% for r in g.rows %}{% if r.shown and not stretch %}{{ r.label }}{% endif %} {% endfor %} {% for c in g.cells %}{% if not stretch %}{% endif %}{{ c.label }}{% for seg in c.segments %}{% endfor %}{% if not stretch %}{% endif %} {% endfor %} {%- endset -%}
{%- if stretch %} {{ body }} {%- else %} {% call chart(g.width, g.height, "Status grid", label, role="group") %}{{ body }}{% endcall %} {%- endif %}
{% for s, n in g.legend %}{{ s | replace('_', ' ') }} {{ n | thousands }} {% endfor %}not studied {{ g.unexplored | thousands }} {% if g.block > 1 %}One row per layer, L0 at the top, each cell {{ each }}. Height is the number of studied neurons in the block. VERIFIED is at the bottom of each bar.{% else %}Each cell is one neuron, in the colour of its best status.{% endif %}
{%- endmacro %}