@mechane-ai/elements 0.47.0 → 0.49.0
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.
- package/README.md +288 -5
- package/bin/mechane-elements-catalog.mjs +104 -12
- package/dist/ai.js +5 -5
- package/dist/article-yyNPg6VU.js +1904 -0
- package/dist/article.js +1 -0
- package/dist/catalog.json +1691 -163
- package/dist/{categorical-values-DdfGIowV.js → categorical-values-DCznViFp.js} +1 -1
- package/dist/{cells--Bd1fQFR.js → cells-CNZE4us2.js} +2 -2
- package/dist/charts/cartesian.js +1 -1
- package/dist/charts/cells.js +1 -1
- package/dist/charts/comparison.js +1 -1
- package/dist/charts/distribution.js +1 -1
- package/dist/charts/figure.js +12 -12
- package/dist/charts/graph.js +1 -1
- package/dist/charts/hierarchy.js +1 -1
- package/dist/charts/image.js +1 -1
- package/dist/charts/matrix.js +3 -2
- package/dist/charts/plot.js +6 -6
- package/dist/charts/relationship.js +1 -1
- package/dist/charts/text.js +1 -1
- package/dist/charts/timeline.js +1 -1
- package/dist/charts/trend.js +1 -1
- package/dist/charts.js +2 -2
- package/dist/clock-DSm5lkNE.js +16 -0
- package/dist/{code-block-DioAM2bZ.js → code-block-BZsY2sh3.js} +1 -1
- package/dist/collections.js +1 -1
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +3 -3
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +2 -2
- package/dist/content/tree.js +1 -1
- package/dist/{content-link-NWuHp5rC.js → content-link-PnpcnTCx.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/{dates-Cww8UR_n.js → dates-ckJdYF7t.js} +1 -1
- package/dist/describe-lesson-BmREzDpt.js +175 -0
- package/dist/{dumbbell-plot-B2ZTgQaI.js → dumbbell-plot-CMv9llfd.js} +9 -7
- package/dist/{embedding-map-CGM_k6lC.js → embedding-map-DC-lgzCq.js} +8 -8
- package/dist/feedback.js +1 -1
- package/dist/{figure-frame-wRkIEAwe.js → figure-frame-BjFzbl3m.js} +3 -3
- package/dist/forms/dates.js +1 -1
- package/dist/forms.js +3 -3
- package/dist/{image-grid-CVA4SOy_.js → image-grid-DHqtj_zs.js} +4 -4
- package/dist/index.js +1 -1
- package/dist/kits/evaluation.js +5 -5
- package/dist/kits/interpretability.js +320 -302
- package/dist/kits/operations.js +6 -6
- package/dist/kits/research.js +558 -0
- package/dist/kits/training.js +6 -6
- package/dist/layout.js +205 -110
- package/dist/lesson/agent.js +811 -0
- package/dist/lesson/spec.js +661 -0
- package/dist/lesson.js +5 -0
- package/dist/mdx.js +227 -0
- package/dist/navigation.js +2 -2
- package/dist/packages/charts/src/cartesian/index.d.ts +1 -1
- package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +18 -0
- package/dist/packages/charts/src/chart-theme.d.ts +1 -1
- package/dist/packages/charts/src/matrix/index.d.ts +1 -0
- package/dist/packages/charts/src/plot/plot-marks.d.ts +7 -3
- package/dist/packages/charts/src/plot/plot-surface.d.ts +3 -1
- package/dist/packages/collections/src/index.d.ts +1 -1
- package/dist/packages/collections/src/metrics.d.ts +9 -1
- package/dist/packages/content/src/index.d.ts +2 -0
- package/dist/packages/content/src/text-match.d.ts +22 -0
- package/dist/packages/core/src/index.d.ts +1 -0
- package/dist/packages/core/src/surfaces.d.ts +12 -2
- package/dist/packages/forms/src/index.d.ts +2 -0
- package/dist/packages/forms/src/token-input.d.ts +24 -0
- package/dist/packages/kits/src/interpretability/index.d.ts +1 -1
- package/dist/packages/kits/src/interpretability/logit-lens.d.ts +10 -1
- package/dist/packages/kits/src/research/finding-card.d.ts +43 -0
- package/dist/packages/kits/src/research/index.d.ts +8 -0
- package/dist/packages/kits/src/research/milestone-path.d.ts +36 -0
- package/dist/packages/kits/src/research/specimen-diff.d.ts +41 -0
- package/dist/packages/kits/src/research/work-heartbeat.d.ts +34 -0
- package/dist/packages/layout/src/figure-grid.d.ts +8 -0
- package/dist/packages/layout/src/index.d.ts +4 -1
- package/dist/packages/layout/src/sidebar.d.ts +7 -0
- package/dist/packages/layout/src/workbench.d.ts +4 -1
- package/dist/packages/teaching/src/agent/index.d.ts +11 -0
- package/dist/packages/teaching/src/agent/learner-trace.d.ts +84 -0
- package/dist/packages/teaching/src/agent/lesson-bridge.d.ts +59 -0
- package/dist/packages/teaching/src/agent/lesson-tour.d.ts +63 -0
- package/dist/packages/teaching/src/agent/tutor-tools.d.ts +86 -0
- package/dist/packages/teaching/src/article/article-checks.d.ts +9 -0
- package/dist/packages/teaching/src/article/article-context.d.ts +49 -0
- package/dist/packages/teaching/src/article/article-error.d.ts +12 -0
- package/dist/packages/teaching/src/article/article-labels.d.ts +54 -0
- package/dist/packages/teaching/src/article/article-layout.stylex.d.ts +14 -0
- package/dist/packages/teaching/src/article/article-outline.d.ts +9 -0
- package/dist/packages/teaching/src/article/article.d.ts +42 -0
- package/dist/packages/teaching/src/article/beat-steps.d.ts +18 -0
- package/dist/packages/teaching/src/article/beat.d.ts +16 -0
- package/dist/packages/teaching/src/article/challenge.d.ts +29 -0
- package/dist/packages/teaching/src/article/exercise-styles.d.ts +76 -0
- package/dist/packages/teaching/src/article/figure.d.ts +51 -0
- package/dist/packages/teaching/src/article/index.d.ts +31 -0
- package/dist/packages/teaching/src/article/lesson-values.d.ts +5 -0
- package/dist/packages/teaching/src/article/notes.d.ts +36 -0
- package/dist/packages/teaching/src/article/outline-types.d.ts +73 -0
- package/dist/packages/teaching/src/article/predict.d.ts +58 -0
- package/dist/packages/teaching/src/article/progress-store.d.ts +64 -0
- package/dist/packages/teaching/src/article/scrolly.d.ts +26 -0
- package/dist/packages/{kits/src/explainers → teaching/src/article}/term.d.ts +8 -2
- package/dist/packages/teaching/src/article/tex.d.ts +12 -0
- package/dist/packages/teaching/src/article/view-essay.d.ts +13 -0
- package/dist/packages/teaching/src/article/view-present.d.ts +8 -0
- package/dist/packages/teaching/src/article/view-sheet.d.ts +7 -0
- package/dist/packages/teaching/src/article/view-static.d.ts +7 -0
- package/dist/packages/teaching/src/article/walk.d.ts +34 -0
- package/dist/packages/teaching/src/lesson/define-lesson.d.ts +136 -0
- package/dist/packages/teaching/src/lesson/index.d.ts +24 -0
- package/dist/packages/teaching/src/lesson/inline-choice.d.ts +12 -0
- package/dist/packages/teaching/src/lesson/lesson-context.d.ts +18 -0
- package/dist/packages/teaching/src/lesson/lesson-error.d.ts +12 -0
- package/dist/packages/teaching/src/lesson/lesson-locale.d.ts +4 -0
- package/dist/packages/teaching/src/lesson/lesson-persistence.d.ts +17 -0
- package/dist/packages/teaching/src/lesson/lesson-player.d.ts +51 -0
- package/dist/packages/teaching/src/lesson/lesson-store.d.ts +84 -0
- package/dist/packages/teaching/src/lesson/lesson.d.ts +39 -0
- package/dist/packages/teaching/src/lesson/param-controls.d.ts +14 -0
- package/dist/packages/teaching/src/lesson/param.d.ts +34 -0
- package/dist/packages/teaching/src/lesson/playback.d.ts +42 -0
- package/dist/packages/teaching/src/lesson/transport.d.ts +19 -0
- package/dist/packages/teaching/src/lesson/use-lesson.d.ts +36 -0
- package/dist/packages/teaching/src/mdx/essay-components.d.ts +79 -0
- package/dist/packages/teaching/src/mdx/essay-markdown.d.ts +41 -0
- package/dist/packages/teaching/src/mdx/essay.d.ts +32 -0
- package/dist/packages/teaching/src/mdx/index.d.ts +9 -0
- package/dist/packages/teaching/src/mdx/requested-view.d.ts +6 -0
- package/dist/packages/teaching/src/scene/flow/flow-layout.d.ts +38 -0
- package/dist/packages/teaching/src/scene/flow/flow-pulse.d.ts +16 -0
- package/dist/packages/teaching/src/scene/flow/scene-flow.d.ts +81 -0
- package/dist/packages/teaching/src/scene/index.d.ts +77 -0
- package/dist/packages/teaching/src/scene/morph/morph-scope.d.ts +28 -0
- package/dist/packages/teaching/src/scene/plane/plane-hit.d.ts +22 -0
- package/dist/packages/teaching/src/scene/plane/plane-label.d.ts +23 -0
- package/dist/packages/teaching/src/scene/plane/plane-labels.d.ts +42 -0
- package/dist/packages/teaching/src/scene/plane/plane-math.d.ts +45 -0
- package/dist/packages/teaching/src/scene/plane/scene-axes.d.ts +30 -0
- package/dist/packages/teaching/src/scene/plane/scene-curve.d.ts +42 -0
- package/dist/packages/teaching/src/scene/plane/scene-point.d.ts +59 -0
- package/dist/packages/teaching/src/scene/plane/scene-projection.d.ts +27 -0
- package/dist/packages/teaching/src/scene/plane/scene-region.d.ts +38 -0
- package/dist/packages/teaching/src/scene/plane/scene-rule.d.ts +35 -0
- package/dist/packages/teaching/src/scene/plane/scene-vector.d.ts +39 -0
- package/dist/packages/teaching/src/scene/scene-bracket.d.ts +24 -0
- package/dist/packages/teaching/src/scene/scene-callout.d.ts +26 -0
- package/dist/packages/teaching/src/scene/scene-context.d.ts +179 -0
- package/dist/packages/teaching/src/scene/scene-custom.d.ts +31 -0
- package/dist/packages/teaching/src/scene/scene-geometry.d.ts +181 -0
- package/dist/packages/teaching/src/scene/scene-group.d.ts +28 -0
- package/dist/packages/teaching/src/scene/scene-highlight.d.ts +19 -0
- package/dist/packages/teaching/src/scene/scene-layer.d.ts +16 -0
- package/dist/packages/teaching/src/scene/scene-node.d.ts +67 -0
- package/dist/packages/teaching/src/scene/scene-obstacles.d.ts +27 -0
- package/dist/packages/teaching/src/scene/scene-registry.d.ts +79 -0
- package/dist/packages/teaching/src/scene/scene-stagger.d.ts +43 -0
- package/dist/packages/teaching/src/scene/scene-style.d.ts +14 -0
- package/dist/packages/teaching/src/scene/scene-validate.d.ts +65 -0
- package/dist/packages/teaching/src/scene/scene-wire.d.ts +45 -0
- package/dist/packages/teaching/src/scene/scene.d.ts +36 -0
- package/dist/packages/teaching/src/scene/shapes/cell-color.d.ts +11 -0
- package/dist/packages/teaching/src/scene/shapes/cell-grid.d.ts +69 -0
- package/dist/packages/teaching/src/scene/shapes/scene-card.d.ts +114 -0
- package/dist/packages/teaching/src/scene/shapes/scene-cells.d.ts +84 -0
- package/dist/packages/teaching/src/scene/shapes/scene-slot.d.ts +37 -0
- package/dist/packages/teaching/src/scene/shapes/scene-stack.d.ts +46 -0
- package/dist/packages/teaching/src/scene/shapes/scene-token.d.ts +63 -0
- package/dist/packages/teaching/src/scene/shapes/scene-tokens.d.ts +40 -0
- package/dist/packages/teaching/src/scene/shapes/stack-book.d.ts +35 -0
- package/dist/packages/teaching/src/scene/shapes/stack-layout.d.ts +63 -0
- package/dist/packages/teaching/src/scene/shapes/token-layout.d.ts +39 -0
- package/dist/packages/teaching/src/spec/advice.d.ts +23 -0
- package/dist/packages/teaching/src/spec/chart-names.d.ts +2 -0
- package/dist/packages/teaching/src/spec/describe-lesson.d.ts +85 -0
- package/dist/packages/teaching/src/spec/explainer-guide.d.ts +21 -0
- package/dist/packages/teaching/src/spec/findings.d.ts +39 -0
- package/dist/packages/teaching/src/spec/index.d.ts +14 -0
- package/dist/packages/teaching/src/spec/lesson-plan.d.ts +43 -0
- package/dist/packages/teaching/src/spec/validate-plan.d.ts +11 -0
- package/dist/packages/teaching/src/time/clock.d.ts +7 -0
- package/dist/packages/teaching/src/time/tween.d.ts +19 -0
- package/dist/packages/teaching/src/time/use-tween.d.ts +6 -0
- package/dist/param-BE3VMSkH.js +450 -0
- package/dist/{pierre-diff-DlvjyuJn.js → pierre-diff-aGyQK5xK.js} +1 -1
- package/dist/{plot-axes-DJkLW4wk.js → plot-axes-D5S9BnBa.js} +1 -1
- package/dist/{plot-layout-BEuoOHbs.js → plot-layout-Bqe4-0qZ.js} +4 -3
- package/dist/{plot-marks-A64v7aTw.js → plot-marks-FVsbFkUs.js} +18 -15
- package/dist/{plot-surface-CJTIqtck.js → plot-surface-DON6WUmk.js} +11 -11
- package/dist/{plot-width-DcqtSgzb.js → plot-width-D3hTycYX.js} +1 -1
- package/dist/{reference-lines-CWA8VeUR.js → reference-lines-hjuD1rRZ.js} +2 -2
- package/dist/scene-BP0Ue0R5.js +4938 -0
- package/dist/scene.js +1 -0
- package/dist/{slope-chart-DT22h_ym.js → slope-chart-C8eeSgL4.js} +7 -7
- package/dist/{src-CpdJlDhO.js → src-9EJskqB_.js} +73 -31
- package/dist/{src-D5NXRJZe.js → src-B2rgpWap.js} +48 -14
- package/dist/{src-BPTDJqt0.js → src-Ci8DeY8J.js} +1 -1
- package/dist/{src-CGc_hjxJ.js → src-DFW49IAs.js} +143 -111
- package/dist/{src-1EHkSFS-.js → src-Dxs3Buo_.js} +205 -139
- package/dist/{src-CExIrXPC.js → src-npqwq3Sa.js} +1 -1
- package/dist/styles2.css +542 -21
- package/dist/{time-series-IB3CB93O.js → time-series-BL933QyA.js} +787 -715
- package/dist/{token-heatmap-C00DnoNO.js → token-heatmap-BB65awva.js} +4 -4
- package/dist/{token-predictions-Cxx29iDr.js → token-predictions-Pa8eUGan.js} +6 -6
- package/dist/transport-DzyxVXbL.js +715 -0
- package/dist/{tree-diagram-DsckNKaW.js → tree-diagram-DJhKBiia.js} +6 -6
- package/dist/{treemap-9_DpLCW9.js → treemap-CxxgABUg.js} +5 -5
- package/dist/use-tween-5HZ55_9d.js +72 -0
- package/dist/{violin-plot-BhPHKXsN.js → violin-plot-CoAEF_7Z.js} +7 -6
- package/dist/{waterfall-CGksuTy5.js → waterfall-DdoEXEkT.js} +7 -7
- package/package.json +30 -5
- package/recipes/counting-cards.tsx +656 -0
- package/recipes/explorable-essay.tsx +172 -0
- package/skills/extend-elements/SKILL.md +21 -0
- package/skills/plan-lesson/SKILL.md +86 -0
- package/skills/plan-lesson/references/plan-format.md +114 -0
- package/skills/plan-lesson/references/worked-plan.md +171 -0
- package/skills/review-elements/SKILL.md +4 -2
- package/skills/review-explainer/SKILL.md +97 -0
- package/skills/upgrade-elements/references/releases.md +65 -0
- package/skills/use-elements/SKILL.md +18 -16
- package/skills/use-elements/references/kits.md +9 -26
- package/skills/use-elements/references/teaching.md +36 -0
- package/skills/write-explainer/SKILL.md +112 -0
- package/skills/write-explainer/references/article.md +164 -0
- package/skills/write-explainer/references/lesson.md +148 -0
- package/skills/write-explainer/references/mdx.md +78 -0
- package/skills/write-explainer/references/scene-parts.md +273 -0
- package/skills/write-explainer/references/scene.md +168 -0
- package/skills/write-explainer/references/tutor.md +104 -0
- package/skills/write-explainer/references/worked-essay.md +459 -0
- package/templates/essay/AGENTS.md +14 -0
- package/templates/essay/README.md +59 -0
- package/templates/essay/index.html +17 -0
- package/templates/essay/package.template.json +21 -0
- package/templates/essay/plan.json +96 -0
- package/templates/essay/src/essay.mdx +97 -0
- package/templates/essay/src/figures.tsx +92 -0
- package/templates/essay/src/lesson.ts +83 -0
- package/templates/essay/src/main.tsx +53 -0
- package/templates/essay/src/mdx.d.ts +7 -0
- package/templates/essay/tsconfig.template.json +15 -0
- package/templates/essay/vite.config.template.txt +8 -0
- package/dist/kits/explainers.js +0 -452
- package/dist/packages/kits/src/explainers/figures.d.ts +0 -31
- package/dist/packages/kits/src/explainers/index.d.ts +0 -8
- package/dist/packages/kits/src/explainers/story-steps.d.ts +0 -46
- /package/dist/packages/{kits/src/explainers → teaching/src/article}/linked-target.d.ts +0 -0
- /package/dist/packages/{kits/src/explainers → teaching/src/lesson}/bound-value.d.ts +0 -0
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { u as e } from "../token-heatmap-
|
|
2
|
-
import { a as t, c as n, f as r, o as i, r as a, t as o } from "../token-predictions-
|
|
3
|
-
import { T as s, m as c } from "../src-
|
|
4
|
-
import { m as
|
|
5
|
-
import { n as
|
|
6
|
-
import { r as
|
|
7
|
-
import { t as
|
|
8
|
-
import { d as
|
|
9
|
-
import { r as
|
|
10
|
-
import { t as
|
|
11
|
-
import { n as
|
|
12
|
-
import { o as
|
|
13
|
-
import { d as
|
|
14
|
-
import { s as
|
|
15
|
-
import {
|
|
16
|
-
import * as
|
|
17
|
-
import { useId as
|
|
18
|
-
import { Fragment as
|
|
1
|
+
import { u as e } from "../token-heatmap-BB65awva.js";
|
|
2
|
+
import { a as t, c as n, f as r, o as i, r as a, t as o } from "../token-predictions-Pa8eUGan.js";
|
|
3
|
+
import { T as s, m as c, t as l } from "../src-9EJskqB_.js";
|
|
4
|
+
import { m as u } from "../src-npqwq3Sa.js";
|
|
5
|
+
import { n as d, t as f } from "../chart-link-AE_xuxiP.js";
|
|
6
|
+
import { r as p } from "../tree-diagram-DJhKBiia.js";
|
|
7
|
+
import { t as m } from "../tone-scope-DKiSw-JR.js";
|
|
8
|
+
import { d as h, l as g } from "../violin-plot-CoAEF_7Z.js";
|
|
9
|
+
import { r as _ } from "../figure-format-B8kRZMlo.js";
|
|
10
|
+
import { t as v } from "../embedding-map-DC-lgzCq.js";
|
|
11
|
+
import { n as y, t as b } from "../forms-CEbwzlRR.js";
|
|
12
|
+
import { o as x, t as S } from "../cells-CNZE4us2.js";
|
|
13
|
+
import { d as C, g as w, u as T } from "../src-B2rgpWap.js";
|
|
14
|
+
import { s as E } from "../slope-chart-C8eeSgL4.js";
|
|
15
|
+
import { x as D } from "../src-Dxs3Buo_.js";
|
|
16
|
+
import * as O from "@stylexjs/stylex";
|
|
17
|
+
import { useId as k, useState as A } from "react";
|
|
18
|
+
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
19
19
|
// packages/kits/src/interpretability/features.ts
|
|
20
|
-
var
|
|
20
|
+
var P = {
|
|
21
21
|
features: 5e3,
|
|
22
22
|
matches: 8
|
|
23
23
|
};
|
|
24
|
-
function
|
|
24
|
+
function F(e, t) {
|
|
25
25
|
let n = t.trim().toLocaleLowerCase();
|
|
26
26
|
return n.length === 0 || [
|
|
27
27
|
e.label,
|
|
@@ -29,18 +29,18 @@ function P(e, t) {
|
|
|
29
29
|
e.explanation ?? ""
|
|
30
30
|
].some((e) => e.toLocaleLowerCase().includes(n));
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function I(e) {
|
|
33
33
|
return e.find((t, n) => e.indexOf(t) !== n);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
let t =
|
|
35
|
+
function L(e) {
|
|
36
|
+
let t = d();
|
|
37
37
|
return (n) => {
|
|
38
38
|
let r = t?.inspected !== null && t?.inspected !== void 0 && e.includes(t.inspected);
|
|
39
39
|
(n !== void 0 || r) && t?.inspect(n ?? null, { reason: "item-hover" });
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
// packages/kits/src/interpretability/kit-styles.ts
|
|
43
|
-
var
|
|
43
|
+
var R = {
|
|
44
44
|
stack: {
|
|
45
45
|
k1xSpc: "xrvj5dj",
|
|
46
46
|
kOIVth: "xaml1ju",
|
|
@@ -171,88 +171,88 @@ var L = {
|
|
|
171
171
|
}
|
|
172
172
|
};
|
|
173
173
|
// packages/kits/src/interpretability/shared-link.tsx
|
|
174
|
-
function
|
|
175
|
-
return
|
|
174
|
+
function z({ children: e }) {
|
|
175
|
+
return d() === void 0 ? /* @__PURE__ */ M(f, { children: e }) : e;
|
|
176
176
|
}
|
|
177
177
|
// packages/kits/src/interpretability/attention-head-grid.tsx
|
|
178
|
-
var
|
|
178
|
+
var B = { heads: 32 }, V = 240, H = {
|
|
179
179
|
inspect: "Enlarge",
|
|
180
180
|
inspecting: "Enlarged",
|
|
181
181
|
heads: "Every head",
|
|
182
182
|
links: "Where each token looks",
|
|
183
183
|
linksDescription: "Each line runs from a token in the top row down to a token that attends to it. Wider is more weight.",
|
|
184
184
|
weight: "Attention weight"
|
|
185
|
-
},
|
|
185
|
+
}, ee = {
|
|
186
186
|
k1xSpc: "xrvj5dj",
|
|
187
187
|
kumcoG: "xqketvx",
|
|
188
188
|
kOIVth: "xaml1ju",
|
|
189
189
|
kGNEyG: "x7a106z",
|
|
190
190
|
k7Eaqz: "xeuugli",
|
|
191
191
|
$$css: !0
|
|
192
|
-
},
|
|
193
|
-
function
|
|
192
|
+
}, te = { panels: (e) => [ee, { "--x-gridTemplateColumns": `repeat(auto-fill, minmax(min(${e}px, 100%), 1fr))` == null ? void 0 : `repeat(auto-fill, minmax(min(${e}px, 100%), 1fr))` }] };
|
|
193
|
+
function ne({ title: t, description: n, locale: r, status: i, coverage: o, source: c, tokens: l, heads: d, mask: f = "none", selected: p = null, onSelectedChange: m, pair: h, onPairChange: g, minPanelWidth: _ = V, labels: v }) {
|
|
194
194
|
let y = {
|
|
195
|
-
...
|
|
195
|
+
...H,
|
|
196
196
|
...v
|
|
197
|
-
}, [b, x] =
|
|
198
|
-
if (E !== void 0) return /* @__PURE__ */
|
|
197
|
+
}, [b, x] = A(null), S = h === void 0 ? b : h, C = I(d.map((e) => e.id)), w = d.find((e) => e.id === p) ?? d[0], T = p !== null && !d.some((e) => e.id === p), E = (C === void 0 ? void 0 : `Head ${C} appears twice. Heads must have unique identifiers.`) ?? (d.length > B.heads ? `This grid draws at most ${B.heads} heads.` : void 0) ?? (T ? `The selected head ${p} is not among the heads.` : void 0);
|
|
198
|
+
if (E !== void 0) return /* @__PURE__ */ M(u, {
|
|
199
199
|
hasError: !0,
|
|
200
200
|
children: `${t}: ${E}`
|
|
201
201
|
});
|
|
202
|
-
function
|
|
202
|
+
function D(e, t) {
|
|
203
203
|
x(e), g?.(e, {
|
|
204
204
|
reason: "press",
|
|
205
205
|
event: t
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
let
|
|
208
|
+
let k = {
|
|
209
209
|
locale: r,
|
|
210
210
|
status: i,
|
|
211
211
|
coverage: o,
|
|
212
212
|
source: c,
|
|
213
|
-
sources:
|
|
214
|
-
destinations:
|
|
213
|
+
sources: l,
|
|
214
|
+
destinations: l,
|
|
215
215
|
mask: f
|
|
216
216
|
};
|
|
217
|
-
return /* @__PURE__ */
|
|
217
|
+
return /* @__PURE__ */ M(z, { children: /* @__PURE__ */ N("section", {
|
|
218
218
|
"aria-label": t,
|
|
219
|
-
...
|
|
219
|
+
...O.props(R.stack),
|
|
220
220
|
children: [
|
|
221
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ N("div", {
|
|
222
222
|
className: "xrvj5dj xunmzkg xeuugli",
|
|
223
|
-
children: [/* @__PURE__ */
|
|
224
|
-
...
|
|
223
|
+
children: [/* @__PURE__ */ M("h3", {
|
|
224
|
+
...O.props(R.title),
|
|
225
225
|
children: t
|
|
226
|
-
}), n !== void 0 && /* @__PURE__ */
|
|
227
|
-
...
|
|
226
|
+
}), n !== void 0 && /* @__PURE__ */ M("p", {
|
|
227
|
+
...O.props(R.muted),
|
|
228
228
|
children: n
|
|
229
229
|
})]
|
|
230
230
|
}),
|
|
231
|
-
w !== void 0 && /* @__PURE__ */
|
|
232
|
-
...
|
|
233
|
-
children: [/* @__PURE__ */
|
|
234
|
-
...
|
|
235
|
-
children: /* @__PURE__ */
|
|
236
|
-
...
|
|
231
|
+
w !== void 0 && /* @__PURE__ */ N("div", {
|
|
232
|
+
...O.props(R.stack),
|
|
233
|
+
children: [/* @__PURE__ */ M("div", {
|
|
234
|
+
...O.props(R.tight),
|
|
235
|
+
children: /* @__PURE__ */ M(e, {
|
|
236
|
+
...k,
|
|
237
237
|
title: w.label,
|
|
238
238
|
description: w.description,
|
|
239
239
|
weights: w.weights,
|
|
240
240
|
valueLabel: `${y.weight}, ${w.label}`,
|
|
241
241
|
selected: S,
|
|
242
|
-
onSelectedChange: (e, t) =>
|
|
242
|
+
onSelectedChange: (e, t) => D(e, t.event)
|
|
243
243
|
})
|
|
244
|
-
}), /* @__PURE__ */
|
|
245
|
-
...
|
|
246
|
-
children: /* @__PURE__ */
|
|
244
|
+
}), /* @__PURE__ */ M("div", {
|
|
245
|
+
...O.props(R.tight),
|
|
246
|
+
children: /* @__PURE__ */ M(a, {
|
|
247
247
|
title: y.links,
|
|
248
248
|
description: y.linksDescription,
|
|
249
249
|
locale: r,
|
|
250
250
|
status: i,
|
|
251
|
-
tokens:
|
|
251
|
+
tokens: l.map((e) => ({
|
|
252
252
|
id: e.id,
|
|
253
253
|
text: e.text
|
|
254
254
|
})),
|
|
255
|
-
links:
|
|
255
|
+
links: l.flatMap((e, t) => l.flatMap((n, r) => {
|
|
256
256
|
let i = w.weights[t]?.[r] ?? null;
|
|
257
257
|
return i === null || i === 0 ? [] : [{
|
|
258
258
|
sourceId: n.id,
|
|
@@ -270,21 +270,21 @@ function V({ title: t, description: n, locale: r, status: i, coverage: o, source
|
|
|
270
270
|
})
|
|
271
271
|
})]
|
|
272
272
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
274
|
-
...
|
|
273
|
+
/* @__PURE__ */ M("p", {
|
|
274
|
+
...O.props(R.label),
|
|
275
275
|
children: y.heads
|
|
276
276
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
278
|
-
...
|
|
279
|
-
children: d.map((t) => /* @__PURE__ */
|
|
280
|
-
...
|
|
277
|
+
/* @__PURE__ */ M("div", {
|
|
278
|
+
...O.props(te.panels(_)),
|
|
279
|
+
children: d.map((t) => /* @__PURE__ */ M(e, {
|
|
280
|
+
...k,
|
|
281
281
|
title: t.label,
|
|
282
282
|
weights: t.weights,
|
|
283
283
|
cellValues: "hidden",
|
|
284
284
|
valueLabel: `${y.weight}, ${t.label}`,
|
|
285
285
|
selected: S,
|
|
286
|
-
onSelectedChange: (e, t) =>
|
|
287
|
-
actions: /* @__PURE__ */
|
|
286
|
+
onSelectedChange: (e, t) => D(e, t.event),
|
|
287
|
+
actions: /* @__PURE__ */ M(s, {
|
|
288
288
|
variant: t.id === w?.id ? "solid" : "outline",
|
|
289
289
|
density: "compact",
|
|
290
290
|
"aria-pressed": t.id === w?.id,
|
|
@@ -301,12 +301,12 @@ function V({ title: t, description: n, locale: r, status: i, coverage: o, source
|
|
|
301
301
|
}) });
|
|
302
302
|
}
|
|
303
303
|
// packages/kits/src/interpretability/feature-logits.tsx
|
|
304
|
-
var
|
|
305
|
-
function
|
|
304
|
+
var U = 5;
|
|
305
|
+
function W({ logits: e, locale: t, status: n, isCompact: i, labels: a }) {
|
|
306
306
|
let o = e.tokens.filter((e) => e.value > 0), s = e.tokens.filter((e) => e.value < 0), c = Math.max(...(e.value.domain ?? [0]).map(Math.abs), ...e.tokens.map((e) => Math.abs(e.value))), l = c > 0 ? c : 1;
|
|
307
307
|
if (i && n === "loading") return null;
|
|
308
|
-
if (i) return /* @__PURE__ */
|
|
309
|
-
...
|
|
308
|
+
if (i) return /* @__PURE__ */ M("div", {
|
|
309
|
+
...O.props(R.tight),
|
|
310
310
|
children: [{
|
|
311
311
|
id: "promotes",
|
|
312
312
|
label: a.promotes,
|
|
@@ -315,15 +315,15 @@ function U({ logits: e, locale: t, status: n, isCompact: i, labels: a }) {
|
|
|
315
315
|
id: "suppresses",
|
|
316
316
|
label: a.suppresses,
|
|
317
317
|
tokens: s
|
|
318
|
-
}].filter((e) => e.tokens.length > 0).map((e) => /* @__PURE__ */
|
|
318
|
+
}].filter((e) => e.tokens.length > 0).map((e) => /* @__PURE__ */ N("div", {
|
|
319
319
|
className: "xrvj5dj x16lqc3j x1hnptsi x1pha0wt",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
321
|
-
...
|
|
320
|
+
children: [/* @__PURE__ */ M("p", {
|
|
321
|
+
...O.props(R.label),
|
|
322
322
|
children: e.label
|
|
323
|
-
}), /* @__PURE__ */
|
|
324
|
-
...
|
|
325
|
-
children: e.tokens.slice(0,
|
|
326
|
-
...
|
|
323
|
+
}), /* @__PURE__ */ M("ul", {
|
|
324
|
+
...O.props(R.list),
|
|
325
|
+
children: e.tokens.slice(0, U).map((e) => /* @__PURE__ */ M("li", {
|
|
326
|
+
...O.props(R.token),
|
|
327
327
|
children: e.token
|
|
328
328
|
}, e.id))
|
|
329
329
|
})]
|
|
@@ -337,9 +337,9 @@ function U({ logits: e, locale: t, status: n, isCompact: i, labels: a }) {
|
|
|
337
337
|
tone: t
|
|
338
338
|
}));
|
|
339
339
|
}
|
|
340
|
-
return /* @__PURE__ */
|
|
340
|
+
return /* @__PURE__ */ N("div", {
|
|
341
341
|
className: "xrvj5dj x1f2yvtp x1j825kq x7a106z xeuugli",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
342
|
+
children: [/* @__PURE__ */ M(g, {
|
|
343
343
|
title: a.promotes,
|
|
344
344
|
description: a.logitsDescription,
|
|
345
345
|
locale: t,
|
|
@@ -349,7 +349,7 @@ function U({ logits: e, locale: t, status: n, isCompact: i, labels: a }) {
|
|
|
349
349
|
...e.value,
|
|
350
350
|
domain: [0, l]
|
|
351
351
|
}
|
|
352
|
-
}), /* @__PURE__ */
|
|
352
|
+
}), /* @__PURE__ */ M(g, {
|
|
353
353
|
title: a.suppresses,
|
|
354
354
|
locale: t,
|
|
355
355
|
status: n,
|
|
@@ -362,10 +362,10 @@ function U({ logits: e, locale: t, status: n, isCompact: i, labels: a }) {
|
|
|
362
362
|
});
|
|
363
363
|
}
|
|
364
364
|
// packages/kits/src/interpretability/feature-card.tsx
|
|
365
|
-
var
|
|
365
|
+
var G = 3, K = 6, q = {
|
|
366
366
|
style: "percent",
|
|
367
367
|
maximumSignificantDigits: 2
|
|
368
|
-
},
|
|
368
|
+
}, J = {
|
|
369
369
|
density: "Activation density",
|
|
370
370
|
densityDescription: "How many tokens reach each activation, among the tokens where the feature is active.",
|
|
371
371
|
examples: "Top activations",
|
|
@@ -377,19 +377,19 @@ var W = 3, G = 6, K = {
|
|
|
377
377
|
suppresses: "Suppresses",
|
|
378
378
|
logitsDescription: "The output tokens whose logits the feature raises or lowers most, by direct effect."
|
|
379
379
|
};
|
|
380
|
-
function
|
|
380
|
+
function Y({ feature: e, density: t, examples: r, logits: i, locale: a, status: o, size: s = "full", frequencyFormat: c = q, actions: l, labels: u }) {
|
|
381
381
|
let d = {
|
|
382
|
-
...
|
|
382
|
+
...J,
|
|
383
383
|
...u
|
|
384
|
-
}, f = s === "compact", p = e.frequency !== void 0,
|
|
384
|
+
}, f = s === "compact", p = e.frequency !== void 0, m = [
|
|
385
385
|
e.id,
|
|
386
386
|
e.source,
|
|
387
|
-
p ? `${d.frequency} ${
|
|
387
|
+
p ? `${d.frequency} ${_({
|
|
388
388
|
value: e.frequency ?? null,
|
|
389
389
|
locale: a,
|
|
390
390
|
format: c
|
|
391
391
|
})}` : void 0
|
|
392
|
-
].filter((e) => e !== void 0),
|
|
392
|
+
].filter((e) => e !== void 0), g = t === void 0 && r === void 0 && i === void 0, v = t !== void 0 && /* @__PURE__ */ M(h, {
|
|
393
393
|
title: d.density,
|
|
394
394
|
description: f ? void 0 : d.densityDescription,
|
|
395
395
|
locale: a,
|
|
@@ -398,14 +398,14 @@ function J({ feature: e, density: t, examples: r, logits: i, locale: a, status:
|
|
|
398
398
|
value: t.value,
|
|
399
399
|
count: t.count,
|
|
400
400
|
height: "compact"
|
|
401
|
-
}), y = r !== void 0 && r.examples.length >
|
|
401
|
+
}), y = r !== void 0 && r.examples.length > G, b = f && y, x = r?.palette ?? "sequential", S = r !== void 0 && /* @__PURE__ */ M(n, {
|
|
402
402
|
title: d.examples,
|
|
403
403
|
description: f ? void 0 : d.examplesDescription,
|
|
404
404
|
locale: a,
|
|
405
405
|
status: o,
|
|
406
|
-
examples: f ? r.examples.slice(0,
|
|
406
|
+
examples: f ? r.examples.slice(0, G) : r.examples,
|
|
407
407
|
coverage: b ? {
|
|
408
|
-
shown:
|
|
408
|
+
shown: G,
|
|
409
409
|
total: r.examples.length,
|
|
410
410
|
unit: "examples"
|
|
411
411
|
} : void 0,
|
|
@@ -413,44 +413,44 @@ function J({ feature: e, density: t, examples: r, logits: i, locale: a, status:
|
|
|
413
413
|
palette: x,
|
|
414
414
|
valueLabel: d.activation,
|
|
415
415
|
valueFormat: r.valueFormat,
|
|
416
|
-
context: f ? r.context ??
|
|
417
|
-
}), C = i !== void 0 && /* @__PURE__ */
|
|
416
|
+
context: f ? r.context ?? K : r.context
|
|
417
|
+
}), C = i !== void 0 && /* @__PURE__ */ M(W, {
|
|
418
418
|
logits: i,
|
|
419
419
|
locale: a,
|
|
420
420
|
status: o,
|
|
421
421
|
isCompact: f,
|
|
422
422
|
labels: d
|
|
423
423
|
});
|
|
424
|
-
return /* @__PURE__ */
|
|
424
|
+
return /* @__PURE__ */ N("article", {
|
|
425
425
|
"aria-label": e.label,
|
|
426
|
-
...
|
|
426
|
+
...O.props(R.card),
|
|
427
427
|
children: [
|
|
428
|
-
/* @__PURE__ */
|
|
428
|
+
/* @__PURE__ */ N("div", {
|
|
429
429
|
className: "x78zum5 x1a02dak x1cy8zhl x1hnptsi xeuugli",
|
|
430
|
-
children: [/* @__PURE__ */
|
|
430
|
+
children: [/* @__PURE__ */ N("div", {
|
|
431
431
|
className: "xrvj5dj xfko13i x1iyjqo2 xz35qm7 xeuugli",
|
|
432
|
-
children: [/* @__PURE__ */
|
|
433
|
-
...
|
|
432
|
+
children: [/* @__PURE__ */ M("h3", {
|
|
433
|
+
...O.props(R.title),
|
|
434
434
|
children: e.label
|
|
435
|
-
}), /* @__PURE__ */
|
|
436
|
-
...
|
|
437
|
-
children:
|
|
435
|
+
}), /* @__PURE__ */ M("p", {
|
|
436
|
+
...O.props(R.meta),
|
|
437
|
+
children: m.join(" · ")
|
|
438
438
|
})]
|
|
439
439
|
}), l]
|
|
440
440
|
}),
|
|
441
|
-
e.explanation !== void 0 && /* @__PURE__ */
|
|
442
|
-
...
|
|
441
|
+
e.explanation !== void 0 && /* @__PURE__ */ M("p", {
|
|
442
|
+
...O.props(R.body),
|
|
443
443
|
children: e.explanation
|
|
444
444
|
}),
|
|
445
|
-
|
|
446
|
-
...
|
|
445
|
+
g && /* @__PURE__ */ M("p", {
|
|
446
|
+
...O.props(R.muted),
|
|
447
447
|
children: d.noData
|
|
448
448
|
}),
|
|
449
|
-
f ? /* @__PURE__ */
|
|
449
|
+
f ? /* @__PURE__ */ N(j, { children: [
|
|
450
450
|
C,
|
|
451
451
|
v,
|
|
452
452
|
S
|
|
453
|
-
] }) : /* @__PURE__ */
|
|
453
|
+
] }) : /* @__PURE__ */ N(j, { children: [(S !== !1 || v !== !1) && /* @__PURE__ */ N("div", {
|
|
454
454
|
className: "xrvj5dj xl1mv0j x1j825kq x7a106z xeuugli",
|
|
455
455
|
children: [S, v]
|
|
456
456
|
}), C] })
|
|
@@ -458,8 +458,8 @@ function J({ feature: e, density: t, examples: r, logits: i, locale: a, status:
|
|
|
458
458
|
});
|
|
459
459
|
}
|
|
460
460
|
// packages/kits/src/interpretability/node-panel.tsx
|
|
461
|
-
function
|
|
462
|
-
let
|
|
461
|
+
function X({ nodes: e, details: t, locale: n, status: r, selected: i, pinned: a, onSelectedChange: o, onPinnedChange: c, labels: l }) {
|
|
462
|
+
let u = d(), f = new Map(e.map((e) => [e.id, e])), p = u?.inspected !== null && f.has(u?.inspected ?? "") ? u?.inspected : void 0, m = i ?? a.at(-1) ?? "", h = f.get(p ?? m), g = h === void 0 ? void 0 : t[h.id], _ = h !== void 0 && a.includes(h.id), v = h !== void 0 && /* @__PURE__ */ M(s, {
|
|
463
463
|
variant: "outline",
|
|
464
464
|
density: "compact",
|
|
465
465
|
"aria-pressed": _,
|
|
@@ -469,14 +469,14 @@ function Y({ nodes: e, details: t, locale: n, status: r, selected: i, pinned: a,
|
|
|
469
469
|
}),
|
|
470
470
|
children: _ ? l.unpin : l.pin
|
|
471
471
|
});
|
|
472
|
-
return /* @__PURE__ */
|
|
473
|
-
...
|
|
472
|
+
return /* @__PURE__ */ N("div", {
|
|
473
|
+
...O.props(R.aside),
|
|
474
474
|
children: [
|
|
475
|
-
h === void 0 && /* @__PURE__ */
|
|
476
|
-
...
|
|
475
|
+
h === void 0 && /* @__PURE__ */ M("p", {
|
|
476
|
+
...O.props(R.muted),
|
|
477
477
|
children: l.hint
|
|
478
478
|
}),
|
|
479
|
-
g !== void 0 && /* @__PURE__ */
|
|
479
|
+
g !== void 0 && /* @__PURE__ */ M(Y, {
|
|
480
480
|
...g,
|
|
481
481
|
locale: n,
|
|
482
482
|
status: r,
|
|
@@ -484,38 +484,38 @@ function Y({ nodes: e, details: t, locale: n, status: r, selected: i, pinned: a,
|
|
|
484
484
|
actions: v,
|
|
485
485
|
labels: l.card
|
|
486
486
|
}),
|
|
487
|
-
h !== void 0 && g === void 0 && /* @__PURE__ */
|
|
488
|
-
...
|
|
487
|
+
h !== void 0 && g === void 0 && /* @__PURE__ */ N("div", {
|
|
488
|
+
...O.props(R.card),
|
|
489
489
|
children: [
|
|
490
|
-
/* @__PURE__ */
|
|
491
|
-
...
|
|
492
|
-
children: [/* @__PURE__ */
|
|
493
|
-
...
|
|
490
|
+
/* @__PURE__ */ N("div", {
|
|
491
|
+
...O.props(R.heading),
|
|
492
|
+
children: [/* @__PURE__ */ M("h3", {
|
|
493
|
+
...O.props(R.title),
|
|
494
494
|
children: h.label
|
|
495
|
-
}), /* @__PURE__ */
|
|
496
|
-
...
|
|
495
|
+
}), /* @__PURE__ */ M("p", {
|
|
496
|
+
...O.props(R.meta),
|
|
497
497
|
children: [h.id, h.detail].filter(Boolean).join(" · ")
|
|
498
498
|
})]
|
|
499
499
|
}),
|
|
500
|
-
/* @__PURE__ */
|
|
501
|
-
...
|
|
500
|
+
/* @__PURE__ */ M("p", {
|
|
501
|
+
...O.props(R.muted),
|
|
502
502
|
children: l.noDetails
|
|
503
503
|
}),
|
|
504
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ M("div", { children: v })
|
|
505
505
|
]
|
|
506
506
|
}),
|
|
507
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ N("section", {
|
|
508
508
|
"aria-label": l.pinned,
|
|
509
|
-
...
|
|
510
|
-
children: [/* @__PURE__ */
|
|
511
|
-
...
|
|
509
|
+
...O.props(R.tight),
|
|
510
|
+
children: [/* @__PURE__ */ M("p", {
|
|
511
|
+
...O.props(R.label),
|
|
512
512
|
children: `${l.pinned} (${a.length})`
|
|
513
|
-
}), a.length === 0 ? /* @__PURE__ */
|
|
514
|
-
...
|
|
513
|
+
}), a.length === 0 ? /* @__PURE__ */ M("p", {
|
|
514
|
+
...O.props(R.muted),
|
|
515
515
|
children: l.noPins
|
|
516
|
-
}) : /* @__PURE__ */
|
|
517
|
-
...
|
|
518
|
-
children: a.map((e) => /* @__PURE__ */
|
|
516
|
+
}) : /* @__PURE__ */ M("ul", {
|
|
517
|
+
...O.props(R.list),
|
|
518
|
+
children: a.map((e) => /* @__PURE__ */ M("li", { children: /* @__PURE__ */ M(s, {
|
|
519
519
|
variant: e === i ? "solid" : "ghost",
|
|
520
520
|
density: "compact",
|
|
521
521
|
"aria-pressed": e === i,
|
|
@@ -531,7 +531,7 @@ function Y({ nodes: e, details: t, locale: n, status: r, selected: i, pinned: a,
|
|
|
531
531
|
});
|
|
532
532
|
}
|
|
533
533
|
// packages/kits/src/interpretability/attribution-workbench.tsx
|
|
534
|
-
var
|
|
534
|
+
var re = {
|
|
535
535
|
hint: "Point at a node to see its feature here. Press a node to keep it in this panel.",
|
|
536
536
|
pinned: "Pinned nodes",
|
|
537
537
|
noPins: "Pin nodes to keep the edges between them in view.",
|
|
@@ -540,18 +540,18 @@ var X = {
|
|
|
540
540
|
noDetails: "No feature details were supplied for this node.",
|
|
541
541
|
card: {}
|
|
542
542
|
};
|
|
543
|
-
function
|
|
543
|
+
function ie({ details: e, selected: t = null, onSelectedChange: n, pinned: r = [], onPinnedChange: i, labels: a, ...o }) {
|
|
544
544
|
let s = {
|
|
545
|
-
...
|
|
545
|
+
...re,
|
|
546
546
|
...a
|
|
547
|
-
}, c = new Set(o.nodes.map((e) => e.id)),
|
|
548
|
-
return
|
|
547
|
+
}, c = new Set(o.nodes.map((e) => e.id)), l = Object.keys(e).find((e) => !c.has(e));
|
|
548
|
+
return l === void 0 ? /* @__PURE__ */ M(m, {
|
|
549
549
|
ids: o.nodes.map((e) => e.id),
|
|
550
|
-
children: /* @__PURE__ */
|
|
551
|
-
...
|
|
552
|
-
children: [/* @__PURE__ */
|
|
553
|
-
...
|
|
554
|
-
children: /* @__PURE__ */
|
|
550
|
+
children: /* @__PURE__ */ M(z, { children: /* @__PURE__ */ N("div", {
|
|
551
|
+
...O.props(R.split),
|
|
552
|
+
children: [/* @__PURE__ */ M("div", {
|
|
553
|
+
...O.props(R.main),
|
|
554
|
+
children: /* @__PURE__ */ M(p, {
|
|
555
555
|
...o,
|
|
556
556
|
selected: t,
|
|
557
557
|
onSelectedChange: (e, t) => n?.(e, {
|
|
@@ -564,7 +564,7 @@ function re({ details: e, selected: t = null, onSelectedChange: n, pinned: r = [
|
|
|
564
564
|
event: t.event
|
|
565
565
|
})
|
|
566
566
|
})
|
|
567
|
-
}), /* @__PURE__ */
|
|
567
|
+
}), /* @__PURE__ */ M(X, {
|
|
568
568
|
nodes: o.nodes,
|
|
569
569
|
details: e,
|
|
570
570
|
locale: o.locale,
|
|
@@ -576,13 +576,13 @@ function re({ details: e, selected: t = null, onSelectedChange: n, pinned: r = [
|
|
|
576
576
|
labels: s
|
|
577
577
|
})]
|
|
578
578
|
}) })
|
|
579
|
-
}) : /* @__PURE__ */
|
|
579
|
+
}) : /* @__PURE__ */ M(u, {
|
|
580
580
|
hasError: !0,
|
|
581
|
-
children: `${o.title}: details name node ${
|
|
581
|
+
children: `${o.title}: details name node ${l}, which is not in the graph.`
|
|
582
582
|
});
|
|
583
583
|
}
|
|
584
584
|
// packages/kits/src/interpretability/embedding-atlas.tsx
|
|
585
|
-
var
|
|
585
|
+
var ae = {
|
|
586
586
|
search: "Find a feature",
|
|
587
587
|
searchDescription: "Searches feature names, ids and explanations.",
|
|
588
588
|
matches: "Matches",
|
|
@@ -591,12 +591,12 @@ var ie = {
|
|
|
591
591
|
hint: "Select a labelled feature on the map, or search for one.",
|
|
592
592
|
card: {}
|
|
593
593
|
};
|
|
594
|
-
function
|
|
595
|
-
let i =
|
|
596
|
-
return /* @__PURE__ */
|
|
597
|
-
...
|
|
594
|
+
function oe({ ids: e, details: t, selected: n, onSelectedChange: r }) {
|
|
595
|
+
let i = L(e);
|
|
596
|
+
return /* @__PURE__ */ M("ul", {
|
|
597
|
+
...O.props(R.list),
|
|
598
598
|
onPointerLeave: () => i(void 0),
|
|
599
|
-
children: e.map((e) => /* @__PURE__ */
|
|
599
|
+
children: e.map((e) => /* @__PURE__ */ M("li", { children: /* @__PURE__ */ M(s, {
|
|
600
600
|
variant: e === n ? "solid" : "ghost",
|
|
601
601
|
density: "compact",
|
|
602
602
|
"aria-pressed": e === n,
|
|
@@ -610,24 +610,24 @@ function ae({ ids: e, details: t, selected: n, onSelectedChange: r }) {
|
|
|
610
610
|
}) }, e))
|
|
611
611
|
});
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function se({ landmarks: e, details: t, query: n = "", onQueryChange: r, selected: i = null, onSelectedChange: a, labels: o, ...s }) {
|
|
614
614
|
let c = {
|
|
615
|
-
...
|
|
615
|
+
...ae,
|
|
616
616
|
...o
|
|
617
|
-
},
|
|
618
|
-
if (d !== void 0) return /* @__PURE__ */
|
|
617
|
+
}, l = k(), d = e.find((e) => t[e.id] === void 0);
|
|
618
|
+
if (d !== void 0) return /* @__PURE__ */ M(u, {
|
|
619
619
|
hasError: !0,
|
|
620
620
|
children: `${s.title}: landmark ${d.id} has no feature details.`
|
|
621
621
|
});
|
|
622
622
|
let f = e.filter((e) => {
|
|
623
623
|
let r = t[e.id];
|
|
624
|
-
return r !== void 0 &&
|
|
625
|
-
}), p = n.trim().length > 0, m = p ? f.slice(0,
|
|
626
|
-
return /* @__PURE__ */
|
|
627
|
-
...
|
|
628
|
-
children: [/* @__PURE__ */
|
|
629
|
-
...
|
|
630
|
-
children: /* @__PURE__ */
|
|
624
|
+
return r !== void 0 && F(r.feature, n);
|
|
625
|
+
}), p = n.trim().length > 0, m = p ? f.slice(0, P.matches) : [], h = i === null ? void 0 : t[i];
|
|
626
|
+
return /* @__PURE__ */ M(z, { children: /* @__PURE__ */ N("div", {
|
|
627
|
+
...O.props(R.split),
|
|
628
|
+
children: [/* @__PURE__ */ M("div", {
|
|
629
|
+
...O.props(R.main),
|
|
630
|
+
children: /* @__PURE__ */ M(v, {
|
|
631
631
|
...s,
|
|
632
632
|
landmarks: f.map((e) => ({
|
|
633
633
|
...e,
|
|
@@ -639,16 +639,16 @@ function oe({ landmarks: e, details: t, query: n = "", onQueryChange: r, selecte
|
|
|
639
639
|
event: t.event
|
|
640
640
|
})
|
|
641
641
|
})
|
|
642
|
-
}), /* @__PURE__ */
|
|
643
|
-
...
|
|
642
|
+
}), /* @__PURE__ */ N("div", {
|
|
643
|
+
...O.props(R.aside),
|
|
644
644
|
children: [
|
|
645
|
-
/* @__PURE__ */
|
|
646
|
-
/* @__PURE__ */
|
|
647
|
-
htmlFor:
|
|
645
|
+
/* @__PURE__ */ N(b.Root, { children: [
|
|
646
|
+
/* @__PURE__ */ M(b.Label, {
|
|
647
|
+
htmlFor: l,
|
|
648
648
|
children: c.search
|
|
649
649
|
}),
|
|
650
|
-
/* @__PURE__ */
|
|
651
|
-
id:
|
|
650
|
+
/* @__PURE__ */ M(y, {
|
|
651
|
+
id: l,
|
|
652
652
|
type: "search",
|
|
653
653
|
value: n,
|
|
654
654
|
onValueChange: (e, t) => r?.(e, {
|
|
@@ -656,36 +656,36 @@ function oe({ landmarks: e, details: t, query: n = "", onQueryChange: r, selecte
|
|
|
656
656
|
event: t.event
|
|
657
657
|
})
|
|
658
658
|
}),
|
|
659
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ M(b.Description, { children: c.searchDescription })
|
|
660
660
|
] }),
|
|
661
|
-
p && /* @__PURE__ */
|
|
661
|
+
p && /* @__PURE__ */ N("section", {
|
|
662
662
|
"aria-label": c.matches,
|
|
663
|
-
...
|
|
663
|
+
...O.props(R.tight),
|
|
664
664
|
children: [
|
|
665
|
-
/* @__PURE__ */
|
|
666
|
-
...
|
|
665
|
+
/* @__PURE__ */ M("p", {
|
|
666
|
+
...O.props(R.label),
|
|
667
667
|
children: `${c.matches} (${f.length})`
|
|
668
668
|
}),
|
|
669
|
-
f.length === 0 ? /* @__PURE__ */
|
|
670
|
-
...
|
|
669
|
+
f.length === 0 ? /* @__PURE__ */ M("p", {
|
|
670
|
+
...O.props(R.muted),
|
|
671
671
|
children: c.noMatches
|
|
672
672
|
}) : null,
|
|
673
|
-
/* @__PURE__ */
|
|
673
|
+
/* @__PURE__ */ M(oe, {
|
|
674
674
|
ids: m.map((e) => e.id),
|
|
675
675
|
details: t,
|
|
676
676
|
selected: i,
|
|
677
677
|
onSelectedChange: a
|
|
678
678
|
}),
|
|
679
|
-
f.length > m.length ? /* @__PURE__ */
|
|
680
|
-
...
|
|
679
|
+
f.length > m.length ? /* @__PURE__ */ M("p", {
|
|
680
|
+
...O.props(R.muted),
|
|
681
681
|
children: `${f.length - m.length} ${c.more}`
|
|
682
682
|
}) : null
|
|
683
683
|
]
|
|
684
684
|
}),
|
|
685
|
-
h === void 0 ? /* @__PURE__ */
|
|
686
|
-
...
|
|
685
|
+
h === void 0 ? /* @__PURE__ */ M("p", {
|
|
686
|
+
...O.props(R.muted),
|
|
687
687
|
children: c.hint
|
|
688
|
-
}) : /* @__PURE__ */
|
|
688
|
+
}) : /* @__PURE__ */ M(Y, {
|
|
689
689
|
...h,
|
|
690
690
|
locale: s.locale,
|
|
691
691
|
status: s.status,
|
|
@@ -697,7 +697,7 @@ function oe({ landmarks: e, details: t, query: n = "", onQueryChange: r, selecte
|
|
|
697
697
|
}) });
|
|
698
698
|
}
|
|
699
699
|
// packages/kits/src/interpretability/feature-list.tsx
|
|
700
|
-
var
|
|
700
|
+
var ce = 240, le = 150, ue = 120, de = 150, fe = {
|
|
701
701
|
feature: "Feature",
|
|
702
702
|
frequency: "Frequency",
|
|
703
703
|
maxActivation: "Max activation",
|
|
@@ -714,44 +714,44 @@ function Z(e, t) {
|
|
|
714
714
|
default: return e.label;
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function pe(e) {
|
|
718
718
|
let t = e.direction === "descending" ? -1 : 1;
|
|
719
719
|
return (n, r) => {
|
|
720
720
|
let [i, a] = [Z(n, e.columnId), Z(r, e.columnId)];
|
|
721
721
|
return i === null || a === null ? Number(i === null) - Number(a === null) : t * (typeof i == "number" && typeof a == "number" ? i - a : String(i).localeCompare(String(a)));
|
|
722
722
|
};
|
|
723
723
|
}
|
|
724
|
-
function
|
|
725
|
-
let
|
|
726
|
-
...
|
|
724
|
+
function me({ title: e, locale: t, status: n, features: r, frequencyDomain: i, frequencyFormat: a, activationFormat: o, profileDomain: s, selected: c = null, onSelectedChange: l, query: d = "", onQueryChange: f, sort: p, onSortChange: m, labels: h }) {
|
|
725
|
+
let g = {
|
|
726
|
+
...fe,
|
|
727
727
|
...h
|
|
728
|
-
}, v =
|
|
729
|
-
if (y !== void 0 || r.length >
|
|
730
|
-
let t = y === void 0 ? `This list shows at most ${
|
|
731
|
-
return /* @__PURE__ */
|
|
728
|
+
}, v = L(r.map((e) => e.id)), y = I(r.map((e) => e.id));
|
|
729
|
+
if (y !== void 0 || r.length > P.features) {
|
|
730
|
+
let t = y === void 0 ? `This list shows at most ${P.features} features. Supply a page of them.` : `Feature ${y} appears twice. Features must have unique identifiers.`;
|
|
731
|
+
return /* @__PURE__ */ M(u, {
|
|
732
732
|
hasError: !0,
|
|
733
733
|
children: `${e}: ${t}`
|
|
734
734
|
});
|
|
735
735
|
}
|
|
736
|
-
let
|
|
736
|
+
let b = s !== void 0 && r.some((e) => e.profile !== void 0), E = r.filter((e) => F(e, d)), D = p === void 0 ? E : E.toSorted(pe(p)), O = [
|
|
737
737
|
{
|
|
738
738
|
id: "label",
|
|
739
|
-
label:
|
|
739
|
+
label: g.feature,
|
|
740
740
|
role: "primary",
|
|
741
|
-
width:
|
|
741
|
+
width: ce,
|
|
742
742
|
canSort: !0,
|
|
743
|
-
cell: (e) => /* @__PURE__ */
|
|
743
|
+
cell: (e) => /* @__PURE__ */ M(w, {
|
|
744
744
|
secondary: [e.id, e.source].filter(Boolean).join(" · "),
|
|
745
745
|
children: e.label
|
|
746
746
|
})
|
|
747
747
|
},
|
|
748
748
|
{
|
|
749
749
|
id: "frequency",
|
|
750
|
-
label:
|
|
750
|
+
label: g.frequency,
|
|
751
751
|
role: "number",
|
|
752
|
-
width:
|
|
752
|
+
width: le,
|
|
753
753
|
canSort: !0,
|
|
754
|
-
cell: (e) => /* @__PURE__ */
|
|
754
|
+
cell: (e) => /* @__PURE__ */ M(x, {
|
|
755
755
|
id: e.id,
|
|
756
756
|
tone: "series1",
|
|
757
757
|
value: e.frequency ?? null,
|
|
@@ -762,24 +762,24 @@ function pe({ title: e, locale: t, status: n, features: r, frequencyDomain: i, f
|
|
|
762
762
|
},
|
|
763
763
|
{
|
|
764
764
|
id: "max",
|
|
765
|
-
label:
|
|
765
|
+
label: g.maxActivation,
|
|
766
766
|
role: "number",
|
|
767
|
-
width:
|
|
767
|
+
width: ue,
|
|
768
768
|
canSort: !0,
|
|
769
769
|
isSecondary: !0,
|
|
770
|
-
cell: (e) =>
|
|
770
|
+
cell: (e) => _({
|
|
771
771
|
value: e.maxActivation ?? null,
|
|
772
772
|
locale: t,
|
|
773
773
|
format: o
|
|
774
774
|
})
|
|
775
775
|
},
|
|
776
|
-
...
|
|
776
|
+
...b ? [{
|
|
777
777
|
id: "profile",
|
|
778
|
-
label:
|
|
778
|
+
label: g.profile,
|
|
779
779
|
role: "number",
|
|
780
|
-
width:
|
|
780
|
+
width: de,
|
|
781
781
|
isSecondary: !0,
|
|
782
|
-
cell: (e) => /* @__PURE__ */
|
|
782
|
+
cell: (e) => /* @__PURE__ */ M(S, {
|
|
783
783
|
id: e.id,
|
|
784
784
|
tone: "series1",
|
|
785
785
|
points: e.profile ?? [],
|
|
@@ -789,17 +789,17 @@ function pe({ title: e, locale: t, status: n, features: r, frequencyDomain: i, f
|
|
|
789
789
|
})
|
|
790
790
|
}] : []
|
|
791
791
|
];
|
|
792
|
-
return n === "loading" ? /* @__PURE__ */
|
|
792
|
+
return n === "loading" ? /* @__PURE__ */ M(C, {
|
|
793
793
|
caption: e,
|
|
794
794
|
columns: O,
|
|
795
795
|
rows: 6
|
|
796
|
-
}) : /* @__PURE__ */
|
|
796
|
+
}) : /* @__PURE__ */ M(T, {
|
|
797
797
|
query: {
|
|
798
798
|
mode: "controlled",
|
|
799
799
|
search: {
|
|
800
800
|
value: d,
|
|
801
|
-
label:
|
|
802
|
-
placeholder:
|
|
801
|
+
label: g.search,
|
|
802
|
+
placeholder: g.searchPlaceholder,
|
|
803
803
|
onChange: (e, t) => f?.(e, {
|
|
804
804
|
reason: "input",
|
|
805
805
|
event: t.event
|
|
@@ -811,86 +811,104 @@ function pe({ title: e, locale: t, status: n, features: r, frequencyDomain: i, f
|
|
|
811
811
|
rows: D,
|
|
812
812
|
columns: O,
|
|
813
813
|
getRowId: (e) => e.id,
|
|
814
|
-
empty:
|
|
815
|
-
filteredEmpty:
|
|
814
|
+
empty: g.empty,
|
|
815
|
+
filteredEmpty: g.noMatches,
|
|
816
816
|
sort: p,
|
|
817
817
|
onSortChange: (e) => m?.(e),
|
|
818
818
|
activeRowId: c ?? void 0,
|
|
819
819
|
onRowHighlightChange: v,
|
|
820
820
|
rowAction: {
|
|
821
821
|
label: (e) => e.label,
|
|
822
|
-
onActivate: (e) =>
|
|
822
|
+
onActivate: (e) => l?.(e.id, { reason: "press" })
|
|
823
823
|
}
|
|
824
824
|
});
|
|
825
825
|
}
|
|
826
826
|
// packages/kits/src/interpretability/logit-lens.tsx
|
|
827
|
-
var
|
|
827
|
+
var he = {
|
|
828
828
|
style: "percent",
|
|
829
829
|
maximumFractionDigits: 0
|
|
830
|
-
},
|
|
830
|
+
}, Q = {
|
|
831
831
|
probability: "Probability",
|
|
832
832
|
layer: "Layer",
|
|
833
833
|
curveTitle: "Probability by layer at",
|
|
834
834
|
curveDescription: "How the chosen next tokens gain or lose probability as the layers add to the residual stream.",
|
|
835
835
|
noPosition: "Select a cell to follow its position through the layers."
|
|
836
836
|
};
|
|
837
|
-
function ge({ columns: e, layers: n, cells: a, tracks: o = [],
|
|
838
|
-
let
|
|
839
|
-
...
|
|
840
|
-
...
|
|
841
|
-
},
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
locale: d.locale,
|
|
865
|
-
status: d.status,
|
|
866
|
-
height: "compact",
|
|
867
|
-
x: {
|
|
868
|
-
label: f.layer,
|
|
869
|
-
domain: [Math.min(...h), Math.max(...h)],
|
|
870
|
-
format: { maximumFractionDigits: 0 }
|
|
871
|
-
},
|
|
872
|
-
y: {
|
|
873
|
-
label: f.probability,
|
|
837
|
+
function ge({ columns: e, layers: n, cells: a, tracks: o = [], layerGroups: s = [], valueFormat: u = he, selected: d = null, onSelectedChange: f, labels: p, ...m }) {
|
|
838
|
+
let h = {
|
|
839
|
+
...Q,
|
|
840
|
+
...p
|
|
841
|
+
}, g = e.find((e) => n.some((t) => i(t.id, e.id) === d)), _ = g === void 0 ? [] : o.filter((e) => e.columnId === g.id), v = n.map((e) => e.depth), y = v.length > 0 ? Math.min(...v) : 0, b = v.length > 0 ? Math.max(...v) : 0, x = s.filter((e) => e.fromDepth >= y && e.fromDepth <= b).map((e) => ({
|
|
842
|
+
x: e.fromDepth,
|
|
843
|
+
label: e.label
|
|
844
|
+
}));
|
|
845
|
+
return /* @__PURE__ */ N("div", {
|
|
846
|
+
...O.props(R.stack),
|
|
847
|
+
children: [
|
|
848
|
+
s.length > 0 && /* @__PURE__ */ M(c, { children: s.map((e) => /* @__PURE__ */ N(l, {
|
|
849
|
+
tone: "neutral",
|
|
850
|
+
children: [
|
|
851
|
+
e.label,
|
|
852
|
+
" (",
|
|
853
|
+
e.fromDepth,
|
|
854
|
+
"–",
|
|
855
|
+
e.toDepth,
|
|
856
|
+
")"
|
|
857
|
+
]
|
|
858
|
+
}, e.id)) }),
|
|
859
|
+
/* @__PURE__ */ M(t, {
|
|
860
|
+
...m,
|
|
861
|
+
columns: e,
|
|
862
|
+
rows: n,
|
|
863
|
+
cells: a,
|
|
874
864
|
domain: [0, 1],
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
865
|
+
palette: "sequential",
|
|
866
|
+
valueLabel: h.probability,
|
|
867
|
+
valueFormat: u,
|
|
868
|
+
selected: d,
|
|
869
|
+
onSelectedChange: (e, t) => f?.(e, {
|
|
870
|
+
reason: "press",
|
|
871
|
+
event: t.event
|
|
872
|
+
})
|
|
873
|
+
}),
|
|
874
|
+
g === void 0 ? /* @__PURE__ */ M("p", {
|
|
875
|
+
...O.props(R.muted),
|
|
876
|
+
children: h.noPosition
|
|
877
|
+
}) : /* @__PURE__ */ M(E, {
|
|
878
|
+
title: `${h.curveTitle} ${r(g.token)}`,
|
|
879
|
+
description: h.curveDescription,
|
|
880
|
+
locale: m.locale,
|
|
881
|
+
status: m.status,
|
|
882
|
+
height: "compact",
|
|
883
|
+
x: {
|
|
884
|
+
label: h.layer,
|
|
885
|
+
domain: [y, b],
|
|
886
|
+
format: { maximumFractionDigits: 0 }
|
|
887
|
+
},
|
|
888
|
+
y: {
|
|
889
|
+
label: h.probability,
|
|
890
|
+
domain: [0, 1],
|
|
891
|
+
format: u
|
|
892
|
+
},
|
|
893
|
+
labels: "legend",
|
|
894
|
+
markers: x.length > 0 ? x : void 0,
|
|
895
|
+
series: _.map((e) => ({
|
|
896
|
+
id: e.id,
|
|
897
|
+
label: r(e.token),
|
|
898
|
+
points: n.map((t, n) => ({
|
|
899
|
+
x: t.depth,
|
|
900
|
+
y: e.probabilities[n] ?? null
|
|
901
|
+
}))
|
|
884
902
|
}))
|
|
885
|
-
})
|
|
886
|
-
|
|
903
|
+
})
|
|
904
|
+
]
|
|
887
905
|
});
|
|
888
906
|
}
|
|
889
907
|
// packages/kits/src/interpretability/steering-panel.tsx
|
|
890
908
|
var _e = {
|
|
891
909
|
maximumFractionDigits: 1,
|
|
892
910
|
signDisplay: "exceptZero"
|
|
893
|
-
},
|
|
911
|
+
}, ve = {
|
|
894
912
|
controls: "Feature strengths",
|
|
895
913
|
reset: "Reset",
|
|
896
914
|
prompt: "Prompt",
|
|
@@ -914,12 +932,12 @@ var _e = {
|
|
|
914
932
|
$$css: !0
|
|
915
933
|
}
|
|
916
934
|
};
|
|
917
|
-
function
|
|
935
|
+
function ye({ title: e, locale: t, status: n, source: r, features: i, values: a, onValuesChange: l, strengthFormat: d = _e, prompt: f, predictions: p, completions: m, labels: h }) {
|
|
918
936
|
let g = {
|
|
919
|
-
...
|
|
937
|
+
...ve,
|
|
920
938
|
...h
|
|
921
|
-
}, _ =
|
|
922
|
-
if (b !== void 0) return /* @__PURE__ */
|
|
939
|
+
}, _ = I(i.map((e) => e.id)), v = i.find((e) => !(e.min < e.max && e.step > 0)), y = Object.keys(a).find((e) => !i.some((t) => t.id === e)), b = (_ === void 0 ? void 0 : `Feature ${_} appears twice.`) ?? (v === void 0 ? void 0 : `Feature ${v.id} needs a minimum below its maximum and a step above 0.`) ?? (y === void 0 ? void 0 : `A strength is given for ${y}, which is not among the features.`);
|
|
940
|
+
if (b !== void 0) return /* @__PURE__ */ M(u, {
|
|
923
941
|
hasError: !0,
|
|
924
942
|
children: `${e}: ${b}`
|
|
925
943
|
});
|
|
@@ -927,73 +945,73 @@ function ve({ title: e, locale: t, status: n, source: r, features: i, values: a,
|
|
|
927
945
|
...x,
|
|
928
946
|
...a
|
|
929
947
|
};
|
|
930
|
-
return /* @__PURE__ */
|
|
948
|
+
return /* @__PURE__ */ N("section", {
|
|
931
949
|
"aria-label": e,
|
|
932
|
-
...
|
|
933
|
-
children: [/* @__PURE__ */
|
|
934
|
-
...
|
|
950
|
+
...O.props(R.stack),
|
|
951
|
+
children: [/* @__PURE__ */ M("h3", {
|
|
952
|
+
...O.props(R.title),
|
|
935
953
|
children: e
|
|
936
|
-
}), /* @__PURE__ */
|
|
937
|
-
...
|
|
938
|
-
children: [/* @__PURE__ */
|
|
954
|
+
}), /* @__PURE__ */ N("div", {
|
|
955
|
+
...O.props(R.split),
|
|
956
|
+
children: [/* @__PURE__ */ N("div", {
|
|
939
957
|
className: "xrvj5dj xaml1ju x1iyjqo2 xs83m0k x1gc7yrn xeuugli x1c8xbx5 xy32g2j x1r7kqkb",
|
|
940
|
-
children: [/* @__PURE__ */
|
|
958
|
+
children: [/* @__PURE__ */ N(c, {
|
|
941
959
|
shouldSpaceBetween: !0,
|
|
942
|
-
children: [/* @__PURE__ */
|
|
943
|
-
...
|
|
960
|
+
children: [/* @__PURE__ */ M("p", {
|
|
961
|
+
...O.props(R.label),
|
|
944
962
|
children: g.controls
|
|
945
|
-
}), /* @__PURE__ */
|
|
963
|
+
}), /* @__PURE__ */ M(s, {
|
|
946
964
|
variant: "ghost",
|
|
947
965
|
density: "compact",
|
|
948
|
-
onClick: (e) =>
|
|
966
|
+
onClick: (e) => l?.(x, {
|
|
949
967
|
reason: "press",
|
|
950
968
|
event: e.nativeEvent
|
|
951
969
|
}),
|
|
952
970
|
children: g.reset
|
|
953
971
|
})]
|
|
954
|
-
}), i.map((e) => /* @__PURE__ */
|
|
972
|
+
}), i.map((e) => /* @__PURE__ */ M(D.Root, {
|
|
955
973
|
locale: t,
|
|
956
974
|
format: d,
|
|
957
975
|
min: e.min,
|
|
958
976
|
max: e.max,
|
|
959
977
|
step: e.step,
|
|
960
978
|
value: S[e.id] ?? 0,
|
|
961
|
-
onValueChange: (t, n) =>
|
|
979
|
+
onValueChange: (t, n) => l?.({
|
|
962
980
|
...S,
|
|
963
981
|
[e.id]: t
|
|
964
982
|
}, {
|
|
965
983
|
reason: "input",
|
|
966
984
|
event: n.event
|
|
967
985
|
}),
|
|
968
|
-
children: /* @__PURE__ */
|
|
986
|
+
children: /* @__PURE__ */ N("div", {
|
|
969
987
|
className: "xrvj5dj xunmzkg xeuugli",
|
|
970
988
|
children: [
|
|
971
|
-
/* @__PURE__ */
|
|
989
|
+
/* @__PURE__ */ N(c, {
|
|
972
990
|
shouldSpaceBetween: !0,
|
|
973
|
-
children: [/* @__PURE__ */
|
|
991
|
+
children: [/* @__PURE__ */ M(D.Label, { children: e.label }), /* @__PURE__ */ M(D.Value, {})]
|
|
974
992
|
}),
|
|
975
|
-
/* @__PURE__ */
|
|
976
|
-
e.description !== void 0 && /* @__PURE__ */
|
|
977
|
-
...
|
|
993
|
+
/* @__PURE__ */ N(D.Control, { children: [/* @__PURE__ */ M(D.Track, { children: /* @__PURE__ */ M(D.Indicator, {}) }), /* @__PURE__ */ M(D.Thumb, {})] }),
|
|
994
|
+
e.description !== void 0 && /* @__PURE__ */ M("p", {
|
|
995
|
+
...O.props(R.muted),
|
|
978
996
|
children: e.description
|
|
979
997
|
})
|
|
980
998
|
]
|
|
981
999
|
})
|
|
982
1000
|
}, e.id))]
|
|
983
|
-
}), /* @__PURE__ */
|
|
984
|
-
...
|
|
1001
|
+
}), /* @__PURE__ */ N("div", {
|
|
1002
|
+
...O.props(R.main, R.stack),
|
|
985
1003
|
children: [
|
|
986
|
-
f !== void 0 && /* @__PURE__ */
|
|
987
|
-
...
|
|
988
|
-
children: [/* @__PURE__ */
|
|
989
|
-
...
|
|
1004
|
+
f !== void 0 && /* @__PURE__ */ N("div", {
|
|
1005
|
+
...O.props(R.tight),
|
|
1006
|
+
children: [/* @__PURE__ */ M("p", {
|
|
1007
|
+
...O.props(R.label),
|
|
990
1008
|
children: g.prompt
|
|
991
|
-
}), /* @__PURE__ */
|
|
1009
|
+
}), /* @__PURE__ */ M("p", {
|
|
992
1010
|
className: "x1ghz6dp xbixft xiard35 xtqrqnz x1ytb0s6 x126k92a xj0a0fe",
|
|
993
1011
|
children: f
|
|
994
1012
|
})]
|
|
995
1013
|
}),
|
|
996
|
-
/* @__PURE__ */
|
|
1014
|
+
/* @__PURE__ */ M(o, {
|
|
997
1015
|
title: g.predictions,
|
|
998
1016
|
description: g.predictionsDescription,
|
|
999
1017
|
locale: t,
|
|
@@ -1002,7 +1020,7 @@ function ve({ title: e, locale: t, status: n, source: r, features: i, values: a,
|
|
|
1002
1020
|
predictions: p,
|
|
1003
1021
|
baselineLabel: g.baseline
|
|
1004
1022
|
}),
|
|
1005
|
-
m !== void 0 && /* @__PURE__ */
|
|
1023
|
+
m !== void 0 && /* @__PURE__ */ M("div", {
|
|
1006
1024
|
className: "xrvj5dj x1q3wq61 xaml1ju xeuugli",
|
|
1007
1025
|
children: [{
|
|
1008
1026
|
id: "baseline",
|
|
@@ -1014,12 +1032,12 @@ function ve({ title: e, locale: t, status: n, source: r, features: i, values: a,
|
|
|
1014
1032
|
label: g.steered,
|
|
1015
1033
|
text: m.steered,
|
|
1016
1034
|
line: $.steeredLine
|
|
1017
|
-
}].map((e) => /* @__PURE__ */
|
|
1018
|
-
...
|
|
1019
|
-
children: [/* @__PURE__ */
|
|
1020
|
-
...
|
|
1035
|
+
}].map((e) => /* @__PURE__ */ N("div", {
|
|
1036
|
+
...O.props(R.tight, $.steered, e.line),
|
|
1037
|
+
children: [/* @__PURE__ */ M("p", {
|
|
1038
|
+
...O.props(R.label),
|
|
1021
1039
|
children: e.label
|
|
1022
|
-
}), /* @__PURE__ */
|
|
1040
|
+
}), /* @__PURE__ */ M("p", {
|
|
1023
1041
|
className: "x1ghz6dp xbixft xiard35 xtqrqnz x1ytb0s6 x126k92a xj0a0fe",
|
|
1024
1042
|
children: e.text
|
|
1025
1043
|
})]
|
|
@@ -1030,4 +1048,4 @@ function ve({ title: e, locale: t, status: n, source: r, features: i, values: a,
|
|
|
1030
1048
|
})]
|
|
1031
1049
|
});
|
|
1032
1050
|
}
|
|
1033
|
-
export {
|
|
1051
|
+
export { ne as AttentionHeadGrid, ie as AttributionWorkbench, se as EmbeddingAtlas, Y as FeatureCard, me as FeatureList, ge as LogitLens, ye as SteeringPanel, B as attentionHeadLimits, P as featureLimits };
|