{# A unit's wiring for _experiment.html. Expects `v.wiring` from circuits.wiring_view, `what` and `root`. #} {% if v.wiring %}

Wiring

The units that write most directly into this {{ what }}'s input (upstream) and read most directly from its output (downstream), along the residual stream without passing through other units. Linked units have pages in the registry. Reported, not gated.{% if v.wiring_backfilled %} Backfilled after the review by open-interpretability wiring-backfill, from the record's model revision and the review's prompts; it is not part of the record.{% endif %}{% if v.circuit %} See its circuit.{% endif %}

{% for view in v.wiring %} {% set w = view.w %}

{{ "From the weights" if w.method == "weights" else "From activations" }}

{% if w.method == "weights" %} Virtual weights with each norm's gain folded in; they rank units but have no absolute scale. Each number is how much one unit reads of the other's write: signed when one vector reads another (+ means a positive activation raises the read), otherwise a norm. Heads count through their OV circuit upstream and their Q, K and V reads downstream; channels are on hover. {% else %} Averaged over this {{ what }}'s peak on {{ w.prompts }} of the review's prompts where it fired. Upstream: the first-order change in its strength from removing a unit's direct write (+ excites). Downstream: the change in a later neuron's activation, or how far a later head's write moves, when this {{ what }}'s write is removed from that unit's input (one of Q, K or V for a head) alone. {% endif %}

{% for title, rows in view.groups %}
{{ title }}
{% if rows is none %}

Not measured.

{% elif not rows %}

None: {{ "no earlier layer" if title.startswith("Upstream") else "no later layer" }}.

{% else %} {% for row in rows %} {% set e = row.e %} {% set label = "L" ~ e.layer ~ ("/N" if e.kind == "mlp_neuron" else "/H") ~ e.index %} {% endfor %}
{% if row.href %}{{ label }}{% else %}{{ label }}{% endif %} {{ row.via or "" }} {{ '%+.3g' | format(e.weight) }}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}