Spaces:
Running
Running
cccmmd commited on
Commit ·
f25ae00
1
Parent(s): 9d0d4e9
chore: rename project to TokenTrace and set default language to Chinese
Browse files- client/src/analysis.html +13 -17
- client/src/assets/content/page-meta.json +13 -3
- client/src/attribution.html +24 -14
- client/src/branch_tree.html +12 -14
- client/src/causal_flow.html +12 -15
- client/src/chat.html +13 -15
- client/src/compare.html +14 -21
- client/src/index.html +4 -33
- client/src/integrated.html +144 -0
- client/src/logit_lens.html +22 -23
- client/src/partials/app-header-analysis.html +33 -0
- client/src/partials/app-header.html +30 -0
- client/src/shared/lang/translations.ts +35 -2
client/src/analysis.html
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
|
@@ -15,21 +15,7 @@
|
|
| 15 |
<main class="main_frame">
|
| 16 |
<section class="left_panel">
|
| 17 |
<div class="floating_content">
|
| 18 |
-
<
|
| 19 |
-
<h1 class="page-toolbar-title"><span class="title-main-line"><span data-page-title data-i18n></span><span class="title-tagline" data-page-subtitle data-i18n></span></span></h1>
|
| 20 |
-
<div class="app-page-toolbar-actions">
|
| 21 |
-
<a href="index.html" class="home-link" title="INNERSCOPE" data-i18n="text,title">INNERSCOPE</a>
|
| 22 |
-
<a href="compare.html?showTextRender=1&demos=/quick-start-1.json,/quick-start-2.json" target="_blank" class="compare-link" style="display: none;" title="Compare analysis results" data-i18n="text,title">Compare results</a>
|
| 23 |
-
<div class="settings-menu-wrapper">
|
| 24 |
-
<!-- INCLUDE partials/settings-toolbar-controls.html -->
|
| 25 |
-
<div id="settings_menu" class="settings-menu" style="display: none;">
|
| 26 |
-
<!-- INCLUDE partials/settings-menu-analysis.html -->
|
| 27 |
-
<!-- INCLUDE partials/settings-menu-common-mid.html -->
|
| 28 |
-
<!-- INCLUDE partials/settings-menu-trailing-admin.html -->
|
| 29 |
-
</div>
|
| 30 |
-
</div>
|
| 31 |
-
</div>
|
| 32 |
-
</header>
|
| 33 |
|
| 34 |
<!-- 首页介绍内容容器(由 JS 动态加载) -->
|
| 35 |
<section id="home-intro-content" class="intro-section">
|
|
@@ -67,7 +53,7 @@
|
|
| 67 |
</div>
|
| 68 |
</div>
|
| 69 |
<div class="textarea-wrapper">
|
| 70 |
-
<textarea id="test_text"></textarea>
|
| 71 |
<div class="button-group">
|
| 72 |
<div class="button-left">
|
| 73 |
<div class="button-left-stack">
|
|
@@ -176,6 +162,16 @@
|
|
| 176 |
<div class="resizer" id="resizer"></div>
|
| 177 |
|
| 178 |
<section class="right_panel">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
<div id="results">
|
| 180 |
<div id="major_tooltip" class="tooltip">
|
| 181 |
<div class="currentToken"></div>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
+
<html lang="zh">
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
|
|
|
| 15 |
<main class="main_frame">
|
| 16 |
<section class="left_panel">
|
| 17 |
<div class="floating_content">
|
| 18 |
+
<!-- INCLUDE partials/app-header-analysis.html -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
<!-- 首页介绍内容容器(由 JS 动态加载) -->
|
| 21 |
<section id="home-intro-content" class="intro-section">
|
|
|
|
| 53 |
</div>
|
| 54 |
</div>
|
| 55 |
<div class="textarea-wrapper">
|
| 56 |
+
<textarea id="test_text" data-typewriter></textarea>
|
| 57 |
<div class="button-group">
|
| 58 |
<div class="button-left">
|
| 59 |
<div class="button-left-stack">
|
|
|
|
| 162 |
<div class="resizer" id="resizer"></div>
|
| 163 |
|
| 164 |
<section class="right_panel">
|
| 165 |
+
<div class="empty-state empty-state-dashed">
|
| 166 |
+
<svg class="empty-state-icon" viewBox="0 0 48 48" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
| 167 |
+
<rect x="6" y="14" width="36" height="22" rx="0"/>
|
| 168 |
+
<line x1="12" y1="20" x2="30" y2="20"/>
|
| 169 |
+
<line x1="12" y1="26" x2="36" y2="26"/>
|
| 170 |
+
<line x1="12" y1="32" x2="24" y2="32"/>
|
| 171 |
+
</svg>
|
| 172 |
+
<div class="empty-state-title" data-i18n>No analysis yet</div>
|
| 173 |
+
<div class="empty-state-description" data-i18n>Paste text on the left, then click Analyze to see token-level information density.</div>
|
| 174 |
+
</div>
|
| 175 |
<div id="results">
|
| 176 |
<div id="major_tooltip" class="tooltip">
|
| 177 |
<div class="currentToken"></div>
|
client/src/assets/content/page-meta.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
{
|
| 2 |
-
"navPageKeys": ["causalFlow", "analysis", "attribution", "logitLens", "branchTree", "chat"],
|
| 3 |
"pages": {
|
| 4 |
"home": {
|
| 5 |
-
"title": "
|
| 6 |
"subtitle": "A toolbox for looking inside language models",
|
| 7 |
"heartline": "",
|
| 8 |
"formula": ""
|
|
@@ -29,13 +29,23 @@
|
|
| 29 |
},
|
| 30 |
"logitLens": {
|
| 31 |
"title": "Logit Lens",
|
| 32 |
-
"subtitle": "Watch
|
| 33 |
"href": "logit_lens.html"
|
| 34 |
},
|
| 35 |
"branchTree": {
|
| 36 |
"title": "Branch Tree",
|
| 37 |
"subtitle": "Type a prefix and explore what the model might say next",
|
| 38 |
"href": "branch_tree.html"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
}
|
| 40 |
}
|
| 41 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"navPageKeys": ["causalFlow", "analysis", "attribution", "logitLens", "branchTree", "chat", "integrated"],
|
| 3 |
"pages": {
|
| 4 |
"home": {
|
| 5 |
+
"title": "TokenTrace",
|
| 6 |
"subtitle": "A toolbox for looking inside language models",
|
| 7 |
"heartline": "",
|
| 8 |
"formula": ""
|
|
|
|
| 29 |
},
|
| 30 |
"logitLens": {
|
| 31 |
"title": "Logit Lens",
|
| 32 |
+
"subtitle": "Watch confidence build layer by layer, with AI-explained activations",
|
| 33 |
"href": "logit_lens.html"
|
| 34 |
},
|
| 35 |
"branchTree": {
|
| 36 |
"title": "Branch Tree",
|
| 37 |
"subtitle": "Type a prefix and explore what the model might say next",
|
| 38 |
"href": "branch_tree.html"
|
| 39 |
+
},
|
| 40 |
+
"compare": {
|
| 41 |
+
"title": "Info Highlight",
|
| 42 |
+
"subtitle": "Compare",
|
| 43 |
+
"href": "compare.html"
|
| 44 |
+
},
|
| 45 |
+
"integrated": {
|
| 46 |
+
"title": "Integrated Lab",
|
| 47 |
+
"subtitle": "All six lenses in one unified workflow",
|
| 48 |
+
"href": "integrated.html"
|
| 49 |
}
|
| 50 |
}
|
| 51 |
}
|
client/src/attribution.html
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
|
@@ -13,19 +13,7 @@
|
|
| 13 |
<main class="main_frame">
|
| 14 |
<section class="left_panel">
|
| 15 |
<div class="floating_content">
|
| 16 |
-
<
|
| 17 |
-
<h1 class="page-toolbar-title"><span class="title-main-line"><span data-page-title data-i18n></span><span class="title-tagline" data-page-subtitle data-i18n></span></span></h1>
|
| 18 |
-
<div class="app-page-toolbar-actions">
|
| 19 |
-
<a href="index.html" class="home-link" title="INNERSCOPE" data-i18n="text,title">INNERSCOPE</a>
|
| 20 |
-
<div class="settings-menu-wrapper">
|
| 21 |
-
<!-- INCLUDE partials/settings-toolbar-controls.html -->
|
| 22 |
-
<div id="settings_menu" class="settings-menu" style="display: none;">
|
| 23 |
-
<!-- INCLUDE partials/settings-menu-common-mid.html -->
|
| 24 |
-
<!-- INCLUDE partials/settings-menu-trailing-admin.html -->
|
| 25 |
-
</div>
|
| 26 |
-
</div>
|
| 27 |
-
</div>
|
| 28 |
-
</header>
|
| 29 |
|
| 30 |
<div class="chat-cached-history-bar">
|
| 31 |
<div class="semantic-search-input-wrapper chat-prompt-history-wrapper">
|
|
@@ -155,6 +143,15 @@
|
|
| 155 |
<div class="resizer" id="resizer"></div>
|
| 156 |
|
| 157 |
<section class="right_panel">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
<div class="attribution-method-panels">
|
| 159 |
<div class="attribution-gradient-panel">
|
| 160 |
<div class="attribution-panel-label" data-i18n>Gradient</div>
|
|
@@ -199,6 +196,19 @@
|
|
| 199 |
</span>
|
| 200 |
</div>
|
| 201 |
<div id="attribution_consistency_readout" class="attribution-consistency-readout"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
</section>
|
| 203 |
</main>
|
| 204 |
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
+
<html lang="zh">
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
|
|
|
| 13 |
<main class="main_frame">
|
| 14 |
<section class="left_panel">
|
| 15 |
<div class="floating_content">
|
| 16 |
+
<!-- INCLUDE partials/app-header.html -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
<div class="chat-cached-history-bar">
|
| 19 |
<div class="semantic-search-input-wrapper chat-prompt-history-wrapper">
|
|
|
|
| 143 |
<div class="resizer" id="resizer"></div>
|
| 144 |
|
| 145 |
<section class="right_panel">
|
| 146 |
+
<div class="empty-state empty-state-dashed">
|
| 147 |
+
<svg class="empty-state-icon" viewBox="0 0 48 48" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
| 148 |
+
<circle cx="24" cy="24" r="16"/>
|
| 149 |
+
<path d="M24 8 L24 40 M8 24 L40 24"/>
|
| 150 |
+
<circle cx="24" cy="24" r="6"/>
|
| 151 |
+
</svg>
|
| 152 |
+
<div class="empty-state-title" data-i18n>No attribution yet</div>
|
| 153 |
+
<div class="empty-state-description" data-i18n>Enter context and target text on the left, then click Analyze to see which words drive the prediction.</div>
|
| 154 |
+
</div>
|
| 155 |
<div class="attribution-method-panels">
|
| 156 |
<div class="attribution-gradient-panel">
|
| 157 |
<div class="attribution-panel-label" data-i18n>Gradient</div>
|
|
|
|
| 196 |
</span>
|
| 197 |
</div>
|
| 198 |
<div id="attribution_consistency_readout" class="attribution-consistency-readout"></div>
|
| 199 |
+
<div class="attr-ae-panel" id="attr_ae_panel" style="display:none;">
|
| 200 |
+
<div class="attribution-panel-label" data-i18n>Activation Explainer</div>
|
| 201 |
+
<div class="ae-trigger-row">
|
| 202 |
+
<span class="ae-trigger-hint" data-i18n>Click a context token above, then explain its activation</span>
|
| 203 |
+
<button type="button" id="attr_ae_trigger" class="text-action-btn" disabled data-i18n>Explain activation</button>
|
| 204 |
+
</div>
|
| 205 |
+
<div id="attr_ae_loading" class="ae-loading" style="display:none" data-i18n>Loading activation explanation…</div>
|
| 206 |
+
<div id="attr_ae_result" class="ae-result" style="display:none">
|
| 207 |
+
<div class="ae-field"><span class="ae-label" data-i18n>Explanation</span><span id="attr_ae_explanation" class="ae-value"></span></div>
|
| 208 |
+
<div class="ae-field"><span class="ae-label" data-i18n>Confidence</span><span id="attr_ae_cosine" class="ae-cosine"></span><span> (roundtrip cosine)</span></div>
|
| 209 |
+
</div>
|
| 210 |
+
<div id="attr_ae_error" class="ae-error" style="display:none"></div>
|
| 211 |
+
</div>
|
| 212 |
</section>
|
| 213 |
</main>
|
| 214 |
|
client/src/branch_tree.html
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
|
@@ -13,19 +13,7 @@
|
|
| 13 |
<main class="main_frame">
|
| 14 |
<section class="left_panel">
|
| 15 |
<div class="floating_content">
|
| 16 |
-
<
|
| 17 |
-
<h1 class="page-toolbar-title"><span class="title-main-line"><span data-page-title data-i18n></span><span class="title-tagline" data-page-subtitle data-i18n></span></span></h1>
|
| 18 |
-
<div class="app-page-toolbar-actions">
|
| 19 |
-
<a href="index.html" class="home-link" title="INNERSCOPE" data-i18n="text,title">INNERSCOPE</a>
|
| 20 |
-
<div class="settings-menu-wrapper">
|
| 21 |
-
<!-- INCLUDE partials/settings-toolbar-controls.html -->
|
| 22 |
-
<div id="settings_menu" class="settings-menu" style="display: none;">
|
| 23 |
-
<!-- INCLUDE partials/settings-menu-common-mid.html -->
|
| 24 |
-
<!-- INCLUDE partials/settings-menu-trailing-admin.html -->
|
| 25 |
-
</div>
|
| 26 |
-
</div>
|
| 27 |
-
</div>
|
| 28 |
-
</header>
|
| 29 |
|
| 30 |
<section id="branch_tree_examples" class="page-examples-section"></section>
|
| 31 |
|
|
@@ -63,6 +51,16 @@
|
|
| 63 |
<div class="resizer" id="resizer"></div>
|
| 64 |
|
| 65 |
<section class="right_panel">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
<div id="branch_tree_container" class="branch-tree-container">
|
| 67 |
<div id="branch_tree_surface" class="branch-tree-surface"></div>
|
| 68 |
<div id="branch_tree_limit_message" class="branch-tree-limit-message"></div>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
+
<html lang="zh">
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
|
|
|
| 13 |
<main class="main_frame">
|
| 14 |
<section class="left_panel">
|
| 15 |
<div class="floating_content">
|
| 16 |
+
<!-- INCLUDE partials/app-header.html -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
<section id="branch_tree_examples" class="page-examples-section"></section>
|
| 19 |
|
|
|
|
| 51 |
<div class="resizer" id="resizer"></div>
|
| 52 |
|
| 53 |
<section class="right_panel">
|
| 54 |
+
<div class="empty-state empty-state-dashed">
|
| 55 |
+
<svg class="empty-state-icon" viewBox="0 0 48 48" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
| 56 |
+
<circle cx="12" cy="12" r="4"/>
|
| 57 |
+
<circle cx="36" cy="20" r="4"/>
|
| 58 |
+
<circle cx="24" cy="36" r="4"/>
|
| 59 |
+
<path d="M12 16 L12 24 L20 24 M20 24 L28 30 M28 30 L24 32 M20 24 L32 20"/>
|
| 60 |
+
</svg>
|
| 61 |
+
<div class="empty-state-title" data-i18n>No branch tree yet</div>
|
| 62 |
+
<div class="empty-state-description" data-i18n>Type a prefix on the left, then click Generate to explore what the model might say next.</div>
|
| 63 |
+
</div>
|
| 64 |
<div id="branch_tree_container" class="branch-tree-container">
|
| 65 |
<div id="branch_tree_surface" class="branch-tree-surface"></div>
|
| 66 |
<div id="branch_tree_limit_message" class="branch-tree-limit-message"></div>
|
client/src/causal_flow.html
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
|
@@ -13,19 +13,7 @@
|
|
| 13 |
<main class="main_frame">
|
| 14 |
<section class="left_panel">
|
| 15 |
<div class="floating_content">
|
| 16 |
-
<
|
| 17 |
-
<h1 class="page-toolbar-title"><span class="title-main-line"><span data-page-title data-i18n></span><span class="title-tagline" data-page-subtitle data-i18n></span></span></h1>
|
| 18 |
-
<div class="app-page-toolbar-actions">
|
| 19 |
-
<a href="index.html" class="home-link" title="INNERSCOPE" data-i18n="text,title">INNERSCOPE</a>
|
| 20 |
-
<div class="settings-menu-wrapper">
|
| 21 |
-
<!-- INCLUDE partials/settings-toolbar-controls.html -->
|
| 22 |
-
<div id="settings_menu" class="settings-menu" style="display: none;">
|
| 23 |
-
<!-- INCLUDE partials/settings-menu-common-mid.html -->
|
| 24 |
-
<!-- INCLUDE partials/settings-menu-trailing-admin.html -->
|
| 25 |
-
</div>
|
| 26 |
-
</div>
|
| 27 |
-
</div>
|
| 28 |
-
</header>
|
| 29 |
|
| 30 |
<div class="chat-cached-history-bar chat-cached-history-bar--dual">
|
| 31 |
<div class="semantic-search-input-wrapper chat-prompt-history-wrapper gen-attr-cached-demos-wrap">
|
|
@@ -450,7 +438,16 @@
|
|
| 450 |
<div class="resizer" id="resizer"></div>
|
| 451 |
|
| 452 |
<section class="right_panel">
|
| 453 |
-
<div id="results" class="attribution-inspector-surface gen-attr-results-surface LMF">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 454 |
</section>
|
| 455 |
</main>
|
| 456 |
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
+
<html lang="zh">
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
|
|
|
| 13 |
<main class="main_frame">
|
| 14 |
<section class="left_panel">
|
| 15 |
<div class="floating_content">
|
| 16 |
+
<!-- INCLUDE partials/app-header.html -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
<div class="chat-cached-history-bar chat-cached-history-bar--dual">
|
| 19 |
<div class="semantic-search-input-wrapper chat-prompt-history-wrapper gen-attr-cached-demos-wrap">
|
|
|
|
| 438 |
<div class="resizer" id="resizer"></div>
|
| 439 |
|
| 440 |
<section class="right_panel">
|
| 441 |
+
<div id="results" class="attribution-inspector-surface gen-attr-results-surface LMF">
|
| 442 |
+
<div class="empty-state empty-state-dashed" id="causal_flow_empty">
|
| 443 |
+
<svg class="empty-state-icon" viewBox="0 0 48 48" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
| 444 |
+
<circle cx="24" cy="24" r="20"/>
|
| 445 |
+
<path d="M8 24 L16 24 L20 14 L28 34 L32 24 L40 24"/>
|
| 446 |
+
</svg>
|
| 447 |
+
<div class="empty-state-title" data-i18n>No attribution data yet</div>
|
| 448 |
+
<div class="empty-state-description" data-i18n>Enter a prompt on the left, then click Analyze to see the causal flow DAG.</div>
|
| 449 |
+
</div>
|
| 450 |
+
</div>
|
| 451 |
</section>
|
| 452 |
</main>
|
| 453 |
|
client/src/chat.html
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
|
@@ -13,19 +13,7 @@
|
|
| 13 |
<main class="main_frame">
|
| 14 |
<section class="left_panel">
|
| 15 |
<div class="floating_content">
|
| 16 |
-
<
|
| 17 |
-
<h1 class="page-toolbar-title"><span class="title-main-line"><span data-page-title data-i18n></span><span class="title-tagline" data-page-subtitle data-i18n></span></span></h1>
|
| 18 |
-
<div class="app-page-toolbar-actions">
|
| 19 |
-
<a href="index.html" class="home-link" title="INNERSCOPE" data-i18n="text,title">INNERSCOPE</a>
|
| 20 |
-
<div class="settings-menu-wrapper">
|
| 21 |
-
<!-- INCLUDE partials/settings-toolbar-controls.html -->
|
| 22 |
-
<div id="settings_menu" class="settings-menu" style="display: none;">
|
| 23 |
-
<!-- INCLUDE partials/settings-menu-common-mid.html -->
|
| 24 |
-
<!-- INCLUDE partials/settings-menu-trailing-admin.html -->
|
| 25 |
-
</div>
|
| 26 |
-
</div>
|
| 27 |
-
</div>
|
| 28 |
-
</header>
|
| 29 |
|
| 30 |
<div class="chat-cached-history-bar">
|
| 31 |
<div class="semantic-search-input-wrapper chat-prompt-history-wrapper">
|
|
@@ -100,7 +88,7 @@
|
|
| 100 |
</div>
|
| 101 |
<div class="textarea-wrapper chat-prompt-textarea-block">
|
| 102 |
<div class="semantic-search-input-wrapper chat-prompt-history-wrapper">
|
| 103 |
-
<textarea id="chat_user_text"></textarea>
|
| 104 |
<ul id="chat_user_prompt_history_dropdown" class="semantic-search-history-dropdown"></ul>
|
| 105 |
</div>
|
| 106 |
</div>
|
|
@@ -177,6 +165,16 @@
|
|
| 177 |
<div class="resizer" id="resizer"></div>
|
| 178 |
|
| 179 |
<section class="right_panel">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
<div class="chat-right-stack">
|
| 181 |
<div class="chat-readout-body">
|
| 182 |
<div id="chat_segments_container" class="chat-segments-container"></div>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
+
<html lang="zh">
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
|
|
|
| 13 |
<main class="main_frame">
|
| 14 |
<section class="left_panel">
|
| 15 |
<div class="floating_content">
|
| 16 |
+
<!-- INCLUDE partials/app-header.html -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
<div class="chat-cached-history-bar">
|
| 19 |
<div class="semantic-search-input-wrapper chat-prompt-history-wrapper">
|
|
|
|
| 88 |
</div>
|
| 89 |
<div class="textarea-wrapper chat-prompt-textarea-block">
|
| 90 |
<div class="semantic-search-input-wrapper chat-prompt-history-wrapper">
|
| 91 |
+
<textarea id="chat_user_text" data-typewriter></textarea>
|
| 92 |
<ul id="chat_user_prompt_history_dropdown" class="semantic-search-history-dropdown"></ul>
|
| 93 |
</div>
|
| 94 |
</div>
|
|
|
|
| 165 |
<div class="resizer" id="resizer"></div>
|
| 166 |
|
| 167 |
<section class="right_panel">
|
| 168 |
+
<div class="empty-state empty-state-dashed">
|
| 169 |
+
<svg class="empty-state-icon" viewBox="0 0 48 48" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
| 170 |
+
<path d="M8 12 L40 12 L40 36 L8 36 Z"/>
|
| 171 |
+
<line x1="14" y1="20" x2="34" y2="20"/>
|
| 172 |
+
<line x1="14" y1="26" x2="28" y2="26"/>
|
| 173 |
+
<line x1="14" y1="32" x2="32" y2="32"/>
|
| 174 |
+
</svg>
|
| 175 |
+
<div class="empty-state-title" data-i18n>No conversation yet</div>
|
| 176 |
+
<div class="empty-state-description" data-i18n>Type your message on the left, then click Send to chat and inspect every token the model produces.</div>
|
| 177 |
+
</div>
|
| 178 |
<div class="chat-right-stack">
|
| 179 |
<div class="chat-readout-body">
|
| 180 |
<div id="chat_segments_container" class="chat-segments-container"></div>
|
client/src/compare.html
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
|
@@ -15,26 +15,19 @@
|
|
| 15 |
<div class="main_frame">
|
| 16 |
<!-- Grid 容器包裹工具栏和内容区 -->
|
| 17 |
<div class="compare-wrapper">
|
| 18 |
-
<!--
|
| 19 |
-
<div class="app-
|
| 20 |
-
<
|
| 21 |
-
<
|
| 22 |
-
<span
|
| 23 |
-
|
| 24 |
-
<
|
| 25 |
-
|
| 26 |
-
<
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
<input type="checkbox" id="model_diff_mode_toggle">
|
| 32 |
-
<span data-i18n>Diff Mode</span>
|
| 33 |
-
</label>
|
| 34 |
-
<button id="edit_mode_toggle" data-i18n>Edit</button>
|
| 35 |
-
<button id="clear_demos_btn" data-i18n>Clear</button>
|
| 36 |
-
<button id="add_demos_btn" data-i18n>Add</button>
|
| 37 |
-
</div>
|
| 38 |
</div>
|
| 39 |
|
| 40 |
<!-- 对比结果展示区 -->
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
+
<html lang="zh">
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
|
|
|
| 15 |
<div class="main_frame">
|
| 16 |
<!-- Grid 容器包裹工具栏和内容区 -->
|
| 17 |
<div class="compare-wrapper">
|
| 18 |
+
<!-- INCLUDE partials/app-header.html -->
|
| 19 |
+
<div class="app-header-extra compare-header-extra">
|
| 20 |
+
<label style="display: flex; align-items: center; gap: 5px; cursor: pointer;">
|
| 21 |
+
<input type="checkbox" id="show_text_render_toggle">
|
| 22 |
+
<span data-i18n>Show Text Rendering</span>
|
| 23 |
+
</label>
|
| 24 |
+
<label style="display: flex; align-items: center; gap: 5px; cursor: pointer;">
|
| 25 |
+
<input type="checkbox" id="model_diff_mode_toggle">
|
| 26 |
+
<span data-i18n>Diff Mode</span>
|
| 27 |
+
</label>
|
| 28 |
+
<button id="edit_mode_toggle" data-i18n>Edit</button>
|
| 29 |
+
<button id="clear_demos_btn" data-i18n>Clear</button>
|
| 30 |
+
<button id="add_demos_btn" data-i18n>Add</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
</div>
|
| 32 |
|
| 33 |
<!-- 对比结果展示区 -->
|
client/src/index.html
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
|
@@ -12,42 +12,13 @@
|
|
| 12 |
|
| 13 |
<body class="nav-landing-page">
|
| 14 |
|
| 15 |
-
<
|
| 16 |
-
<!-- INCLUDE partials/settings-toolbar-controls.html -->
|
| 17 |
-
<div id="settings_menu" class="settings-menu" style="display: none;">
|
| 18 |
-
<!-- INCLUDE partials/settings-menu-common-mid.html -->
|
| 19 |
-
<!-- INCLUDE partials/settings-menu-trailing-admin.html -->
|
| 20 |
-
</div>
|
| 21 |
-
</div>
|
| 22 |
|
| 23 |
<main class="nav-landing-main">
|
| 24 |
-
<
|
| 25 |
-
<header class="nav-landing-hero">
|
| 26 |
-
<div class="nav-landing-hero-grid">
|
| 27 |
-
<div class="nav-landing-hero-text">
|
| 28 |
-
<h1 class="nav-landing-title" data-page-title data-i18n></h1>
|
| 29 |
-
<p class="nav-landing-subtitle" data-page-subtitle data-i18n></p>
|
| 30 |
-
</div>
|
| 31 |
-
<div class="nav-landing-hero-lens">
|
| 32 |
-
<!-- InfoLens Aperture SVG -->
|
| 33 |
-
<svg class="lens-aperture" viewBox="0 0 120 120" aria-hidden="true">
|
| 34 |
-
<circle cx="60" cy="60" r="55" class="lens-aperture-blade"/>
|
| 35 |
-
<circle cx="60" cy="60" r="40" class="lens-aperture-blade"/>
|
| 36 |
-
<circle cx="60" cy="60" r="25" class="lens-aperture-blade"/>
|
| 37 |
-
<circle cx="60" cy="60" r="48" class="lens-aperture-ring"/>
|
| 38 |
-
<path d="M60,5 L63,25 L57,25 Z" class="lens-aperture-blade" opacity="0.3"/>
|
| 39 |
-
<path d="M60,5 L63,25 L57,25 Z" class="lens-aperture-blade" opacity="0.3" transform="rotate(60 60 60)"/>
|
| 40 |
-
<path d="M60,5 L63,25 L57,25 Z" class="lens-aperture-blade" opacity="0.3" transform="rotate(120 60 60)"/>
|
| 41 |
-
<path d="M60,5 L63,25 L57,25 Z" class="lens-aperture-blade" opacity="0.3" transform="rotate(180 60 60)"/>
|
| 42 |
-
<path d="M60,5 L63,25 L57,25 Z" class="lens-aperture-blade" opacity="0.3" transform="rotate(240 60 60)"/>
|
| 43 |
-
<path d="M60,5 L63,25 L57,25 Z" class="lens-aperture-blade" opacity="0.3" transform="rotate(300 60 60)"/>
|
| 44 |
-
</svg>
|
| 45 |
-
</div>
|
| 46 |
-
</div>
|
| 47 |
-
</header>
|
| 48 |
|
| 49 |
-
<!-- Module Grid -->
|
| 50 |
<nav class="nav-landing-module-grid" aria-label="App pages">
|
|
|
|
| 51 |
<a class="nav-landing-module-cell" href="causal_flow.html" target="_blank" rel="noopener" data-nav-page="causalFlow" data-i18n="title"></a>
|
| 52 |
<a class="nav-landing-module-cell" href="analysis.html" target="_blank" rel="noopener" data-nav-page="analysis" data-i18n="title"></a>
|
| 53 |
<a class="nav-landing-module-cell" href="attribution.html" target="_blank" rel="noopener" data-nav-page="attribution" data-i18n="title"></a>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
+
<html lang="zh">
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
|
|
|
| 12 |
|
| 13 |
<body class="nav-landing-page">
|
| 14 |
|
| 15 |
+
<!-- INCLUDE partials/app-header.html -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
<main class="nav-landing-main">
|
| 18 |
+
<p class="nav-landing-slogan" data-page-subtitle data-i18n></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
|
|
|
| 20 |
<nav class="nav-landing-module-grid" aria-label="App pages">
|
| 21 |
+
<a class="nav-landing-module-cell" href="integrated.html" target="_blank" rel="noopener" data-nav-page="integrated" data-i18n="title"></a>
|
| 22 |
<a class="nav-landing-module-cell" href="causal_flow.html" target="_blank" rel="noopener" data-nav-page="causalFlow" data-i18n="title"></a>
|
| 23 |
<a class="nav-landing-module-cell" href="analysis.html" target="_blank" rel="noopener" data-nav-page="analysis" data-i18n="title"></a>
|
| 24 |
<a class="nav-landing-module-cell" href="attribution.html" target="_blank" rel="noopener" data-nav-page="attribution" data-i18n="title"></a>
|
client/src/integrated.html
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="zh">
|
| 3 |
+
|
| 4 |
+
<head>
|
| 5 |
+
<meta charset="UTF-8">
|
| 6 |
+
<title data-i18n>Integrated Lab - All six lenses in one unified workflow</title>
|
| 7 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 8 |
+
<link rel="stylesheet" type="text/css" href="integrated.css">
|
| 9 |
+
</head>
|
| 10 |
+
|
| 11 |
+
<body class="integrated-page gen-attribute-page">
|
| 12 |
+
|
| 13 |
+
<main class="main_frame integrated-frame">
|
| 14 |
+
<section class="left_panel integrated-left">
|
| 15 |
+
<div class="floating_content">
|
| 16 |
+
<!-- INCLUDE partials/app-header.html -->
|
| 17 |
+
|
| 18 |
+
<section class="input-section">
|
| 19 |
+
<div class="input-header">
|
| 20 |
+
<span class="semantic-submode-label" data-i18n>Prompt</span>
|
| 21 |
+
<div class="text-action-buttons-top">
|
| 22 |
+
<div class="textarea-counter" id="integrated_text_count_display">
|
| 23 |
+
<span id="integrated_text_count_value">0</span>
|
| 24 |
+
<span data-i18n>chars</span>
|
| 25 |
+
</div>
|
| 26 |
+
<button type="button" id="integrated_clear_btn"
|
| 27 |
+
class="text-action-btn" data-i18n>Clear</button>
|
| 28 |
+
</div>
|
| 29 |
+
</div>
|
| 30 |
+
<div class="textarea-wrapper chat-prompt-textarea-block">
|
| 31 |
+
<textarea id="integrated_prompt_text" data-typewriter></textarea>
|
| 32 |
+
</div>
|
| 33 |
+
|
| 34 |
+
<!-- Model + max tokens -->
|
| 35 |
+
<div class="semantic-submode-row" id="integrated_options_row">
|
| 36 |
+
<span class="semantic-submode-group">
|
| 37 |
+
<label class="semantic-submode-label" for="integrated_model_select">Model</label>
|
| 38 |
+
<select id="integrated_model_select" class="semantic-submode-control"></select>
|
| 39 |
+
</span>
|
| 40 |
+
<span class="semantic-submode-group">
|
| 41 |
+
<label class="semantic-submode-label" for="integrated_max_tokens_input">Max tokens</label>
|
| 42 |
+
<input type="number" id="integrated_max_tokens_input" class="semantic-submode-control gen-attr-dag-measure-width-input" value="30" min="1" max="200" />
|
| 43 |
+
</span>
|
| 44 |
+
</div>
|
| 45 |
+
|
| 46 |
+
<div class="textarea-wrapper chat-prompt-actions-row">
|
| 47 |
+
<div class="button-group">
|
| 48 |
+
<div class="button-left">
|
| 49 |
+
<div class="button-left-primary">
|
| 50 |
+
<button type="button" id="integrated_submit_btn"
|
| 51 |
+
class="primary-btn inactive" disabled data-i18n>Start</button>
|
| 52 |
+
<div class="generation-status-slot loader-small-container">
|
| 53 |
+
<div class="loadersmall"></div>
|
| 54 |
+
<span id="integrated_complete_reason"
|
| 55 |
+
class="generation-end-reason"></span>
|
| 56 |
+
</div>
|
| 57 |
+
</div>
|
| 58 |
+
</div>
|
| 59 |
+
</div>
|
| 60 |
+
</div>
|
| 61 |
+
</section>
|
| 62 |
+
</div>
|
| 63 |
+
</section>
|
| 64 |
+
|
| 65 |
+
<div class="resizer" id="resizer_left"></div>
|
| 66 |
+
|
| 67 |
+
<section class="center_panel integrated-center">
|
| 68 |
+
<div id="integrated_dag_results" class="attribution-inspector-surface gen-attr-results-surface LMF">
|
| 69 |
+
<div class="empty-state empty-state-dashed" id="integrated_empty">
|
| 70 |
+
<svg class="empty-state-icon" viewBox="0 0 48 48" fill="none"
|
| 71 |
+
stroke="currentColor" stroke-width="1" stroke-linecap="round"
|
| 72 |
+
stroke-linejoin="round" aria-hidden="true">
|
| 73 |
+
<circle cx="24" cy="24" r="20"/>
|
| 74 |
+
<path d="M8 24 L16 24 L20 14 L28 34 L32 24 L40 24"/>
|
| 75 |
+
</svg>
|
| 76 |
+
<div class="empty-state-title" data-i18n>No attribution data yet</div>
|
| 77 |
+
<div class="empty-state-description" data-i18n>Enter a prompt on the left, then click Start to generate the causal flow DAG. Click any node to explore all six lenses.</div>
|
| 78 |
+
</div>
|
| 79 |
+
</div>
|
| 80 |
+
</section>
|
| 81 |
+
|
| 82 |
+
<div class="resizer" id="resizer_right"></div>
|
| 83 |
+
|
| 84 |
+
<section class="right_panel integrated-right">
|
| 85 |
+
<nav class="integrated-panel-tabs" id="integrated_panel_tabs">
|
| 86 |
+
<button type="button" class="integrated-tab-btn is-active"
|
| 87 |
+
data-panel="highlight" data-i18n>Highlight</button>
|
| 88 |
+
<button type="button" class="integrated-tab-btn"
|
| 89 |
+
data-panel="attribution" data-i18n>Attribution</button>
|
| 90 |
+
<button type="button" class="integrated-tab-btn"
|
| 91 |
+
data-panel="logit" data-i18n>Logit Lens</button>
|
| 92 |
+
<button type="button" class="integrated-tab-btn"
|
| 93 |
+
data-panel="branch" data-i18n>Branch</button>
|
| 94 |
+
<button type="button" class="integrated-tab-btn"
|
| 95 |
+
data-panel="activation" data-i18n>Activation</button>
|
| 96 |
+
</nav>
|
| 97 |
+
|
| 98 |
+
<div class="integrated-panel-body">
|
| 99 |
+
<div class="integrated-panel-placeholder" id="integrated_panel_placeholder">
|
| 100 |
+
<div class="empty-state-title" data-i18n>Select a token</div>
|
| 101 |
+
<div class="empty-state-description" data-i18n>Click a node in the DAG to inspect it with all six lenses.</div>
|
| 102 |
+
</div>
|
| 103 |
+
|
| 104 |
+
<div class="integrated-panel-content" id="integrated_highlight_panel" hidden>
|
| 105 |
+
<div class="attribution-panel-label" data-i18n>Info Highlight</div>
|
| 106 |
+
<div id="integrated_highlight_surface" class="integrated-highlight-surface"></div>
|
| 107 |
+
</div>
|
| 108 |
+
|
| 109 |
+
<div class="integrated-panel-content" id="integrated_attribution_panel" hidden>
|
| 110 |
+
<div class="attribution-panel-label" data-i18n>Context Attribution</div>
|
| 111 |
+
<div id="integrated_attribution_surface" class="attribution-inspector-surface LMF"></div>
|
| 112 |
+
</div>
|
| 113 |
+
|
| 114 |
+
<div class="integrated-panel-content" id="integrated_logit_panel" hidden>
|
| 115 |
+
<div class="attribution-panel-label" data-i18n>Logit Lens</div>
|
| 116 |
+
<div id="integrated_logit_heatmap" class="logit-lens-heatmap"></div>
|
| 117 |
+
<div id="integrated_logit_trajectory" class="logit-lens-trajectory" style="height:auto;min-height:0"></div>
|
| 118 |
+
</div>
|
| 119 |
+
|
| 120 |
+
<div class="integrated-panel-content" id="integrated_branch_panel" hidden>
|
| 121 |
+
<div class="attribution-panel-label" data-i18n>Branch Tree</div>
|
| 122 |
+
<div id="integrated_branch_surface" class="branch-tree-surface"></div>
|
| 123 |
+
</div>
|
| 124 |
+
|
| 125 |
+
<div class="integrated-panel-content" id="integrated_activation_panel" hidden>
|
| 126 |
+
<div class="attribution-panel-label" data-i18n>Activation Explainer</div>
|
| 127 |
+
<div id="integrated_ae_loading" class="ae-loading" style="display:none" data-i18n>Loading activation explanation…</div>
|
| 128 |
+
<div id="integrated_ae_result" class="ae-result" style="display:none">
|
| 129 |
+
<div class="ae-field"><span class="ae-label" data-i18n>Explanation</span><span id="integrated_ae_explanation" class="ae-value"></span></div>
|
| 130 |
+
<div class="ae-field"><span class="ae-label" data-i18n>Confidence</span><span id="integrated_ae_cosine" class="ae-cosine"></span></div>
|
| 131 |
+
</div>
|
| 132 |
+
<div id="integrated_ae_error" class="ae-error" style="display:none"></div>
|
| 133 |
+
</div>
|
| 134 |
+
</div>
|
| 135 |
+
</section>
|
| 136 |
+
</main>
|
| 137 |
+
|
| 138 |
+
<div id="toast" class="toast"></div>
|
| 139 |
+
|
| 140 |
+
<script src="vendor.js"></script>
|
| 141 |
+
<script src="integrated.js"></script>
|
| 142 |
+
</body>
|
| 143 |
+
|
| 144 |
+
</html>
|
client/src/logit_lens.html
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
|
@@ -13,19 +13,7 @@
|
|
| 13 |
<main class="main_frame">
|
| 14 |
<section class="left_panel">
|
| 15 |
<div class="floating_content">
|
| 16 |
-
<
|
| 17 |
-
<h1 class="page-toolbar-title"><span class="title-main-line"><span data-page-title data-i18n></span><span class="title-tagline" data-page-subtitle data-i18n></span></span></h1>
|
| 18 |
-
<div class="app-page-toolbar-actions">
|
| 19 |
-
<a href="index.html" class="home-link" title="INNERSCOPE" data-i18n="text,title">INNERSCOPE</a>
|
| 20 |
-
<div class="settings-menu-wrapper">
|
| 21 |
-
<!-- INCLUDE partials/settings-toolbar-controls.html -->
|
| 22 |
-
<div id="settings_menu" class="settings-menu" style="display: none;">
|
| 23 |
-
<!-- INCLUDE partials/settings-menu-common-mid.html -->
|
| 24 |
-
<!-- INCLUDE partials/settings-menu-trailing-admin.html -->
|
| 25 |
-
</div>
|
| 26 |
-
</div>
|
| 27 |
-
</div>
|
| 28 |
-
</header>
|
| 29 |
|
| 30 |
<section id="logit_lens_examples" class="page-examples-section"></section>
|
| 31 |
|
|
@@ -85,20 +73,31 @@
|
|
| 85 |
</section>
|
| 86 |
</div>
|
| 87 |
|
| 88 |
-
<div class="logit-lens-panel" id="ae_panel" style="display:none;">
|
| 89 |
-
<div class="attribution-panel-label">Activation Explainer / 激活解释</div>
|
| 90 |
-
<div id="ae_loading" class="ae-loading" style="display:none">🧠 正在推理... 激活解释需要较长时间(约 5-15 秒)</div>
|
| 91 |
-
<div id="ae_result" class="ae-result" style="display:none">
|
| 92 |
-
<div class="ae-field"><span class="ae-label">解释</span><span id="ae_explanation" class="ae-value"></span></div>
|
| 93 |
-
<div class="ae-field"><span class="ae-label">可信度</span><span id="ae_cosine" class="ae-cosine"></span><span> (roundtrip cosine)</span></div>
|
| 94 |
-
</div>
|
| 95 |
-
<div id="ae_error" class="ae-error" style="display:none"></div>
|
| 96 |
-
</div>
|
| 97 |
</section>
|
| 98 |
|
| 99 |
<div class="resizer" id="resizer"></div>
|
| 100 |
|
| 101 |
<section class="right_panel">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
<div class="logit-lens-panel" id="logit_lens_panel" style="display:none;">
|
| 103 |
<div class="attribution-panel-label" data-i18n>Logit Lens</div>
|
| 104 |
<div class="logit-lens-chart-hint" data-i18n>点击折线上的点,查看该层的候选词分布</div>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
+
<html lang="zh">
|
| 3 |
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
|
|
|
| 13 |
<main class="main_frame">
|
| 14 |
<section class="left_panel">
|
| 15 |
<div class="floating_content">
|
| 16 |
+
<!-- INCLUDE partials/app-header.html -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
<section id="logit_lens_examples" class="page-examples-section"></section>
|
| 19 |
|
|
|
|
| 73 |
</section>
|
| 74 |
</div>
|
| 75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
</section>
|
| 77 |
|
| 78 |
<div class="resizer" id="resizer"></div>
|
| 79 |
|
| 80 |
<section class="right_panel">
|
| 81 |
+
<div class="empty-state empty-state-dashed">
|
| 82 |
+
<svg class="empty-state-icon" viewBox="0 0 48 48" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
| 83 |
+
<path d="M8 32 L16 28 L24 20 L32 12 L40 8"/>
|
| 84 |
+
<circle cx="16" cy="28" r="3"/>
|
| 85 |
+
<circle cx="24" cy="20" r="3"/>
|
| 86 |
+
<circle cx="32" cy="12" r="3"/>
|
| 87 |
+
<circle cx="40" cy="8" r="3"/>
|
| 88 |
+
</svg>
|
| 89 |
+
<div class="empty-state-title" data-i18n>No logit lens yet</div>
|
| 90 |
+
<div class="empty-state-description" data-i18n>Enter text on the left, then click Analyze to see how the model's confidence builds layer by layer.</div>
|
| 91 |
+
</div>
|
| 92 |
+
<div class="logit-lens-panel" id="ae_panel" style="display:none;">
|
| 93 |
+
<div class="attribution-panel-label" data-i18n>Activation Explainer</div>
|
| 94 |
+
<div id="ae_loading" class="ae-loading" style="display:none" data-i18n>Loading activation explanation…</div>
|
| 95 |
+
<div id="ae_result" class="ae-result" style="display:none">
|
| 96 |
+
<div class="ae-field"><span class="ae-label" data-i18n>Explanation</span><span id="ae_explanation" class="ae-value"></span></div>
|
| 97 |
+
<div class="ae-field"><span class="ae-label" data-i18n>Confidence</span><span id="ae_cosine" class="ae-cosine"></span><span> (roundtrip cosine)</span></div>
|
| 98 |
+
</div>
|
| 99 |
+
<div id="ae_error" class="ae-error" style="display:none"></div>
|
| 100 |
+
</div>
|
| 101 |
<div class="logit-lens-panel" id="logit_lens_panel" style="display:none;">
|
| 102 |
<div class="attribution-panel-label" data-i18n>Logit Lens</div>
|
| 103 |
<div class="logit-lens-chart-hint" data-i18n>点击折线上的点,查看该层的候选词分布</div>
|
client/src/partials/app-header-analysis.html
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<header class="app-header">
|
| 2 |
+
<div class="app-header-brand">
|
| 3 |
+
<a href="index.html" class="app-header-logo" title="TokenTrace" aria-label="TokenTrace" data-i18n="title">
|
| 4 |
+
<svg class="app-header-logo-aperture" viewBox="0 0 24 24" aria-hidden="true">
|
| 5 |
+
<circle cx="12" cy="12" r="11" class="lens-aperture-blade"/>
|
| 6 |
+
<circle cx="12" cy="12" r="7" class="lens-aperture-blade"/>
|
| 7 |
+
<circle cx="12" cy="12" r="9.5" class="lens-aperture-ring"/>
|
| 8 |
+
</svg>
|
| 9 |
+
<span class="app-header-logo-text" data-i18n>TokenTrace</span>
|
| 10 |
+
</a>
|
| 11 |
+
</div>
|
| 12 |
+
<div class="app-header-title-block">
|
| 13 |
+
<h1 class="page-toolbar-title">
|
| 14 |
+
<span class="title-main-line">
|
| 15 |
+
<span data-page-title data-i18n></span>
|
| 16 |
+
<span class="title-tagline" data-page-subtitle data-i18n></span>
|
| 17 |
+
</span>
|
| 18 |
+
</h1>
|
| 19 |
+
</div>
|
| 20 |
+
<div class="app-header-extra">
|
| 21 |
+
<a href="compare.html?showTextRender=1&demos=/quick-start-1.json,/quick-start-2.json" target="_blank" class="compare-link" style="display: none;" title="Compare analysis results" data-i18n="text,title">Compare results</a>
|
| 22 |
+
</div>
|
| 23 |
+
<div class="app-header-actions">
|
| 24 |
+
<div class="settings-menu-wrapper">
|
| 25 |
+
<!-- INCLUDE partials/settings-toolbar-controls.html -->
|
| 26 |
+
<div id="settings_menu" class="settings-menu" style="display: none;">
|
| 27 |
+
<!-- INCLUDE partials/settings-menu-analysis.html -->
|
| 28 |
+
<!-- INCLUDE partials/settings-menu-common-mid.html -->
|
| 29 |
+
<!-- INCLUDE partials/settings-menu-trailing-admin.html -->
|
| 30 |
+
</div>
|
| 31 |
+
</div>
|
| 32 |
+
</div>
|
| 33 |
+
</header>
|
client/src/partials/app-header.html
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<header class="app-header">
|
| 2 |
+
<div class="app-header-brand">
|
| 3 |
+
<a href="index.html" class="app-header-logo" title="TokenTrace" aria-label="TokenTrace" data-i18n="title">
|
| 4 |
+
<svg class="app-header-logo-aperture" viewBox="0 0 24 24" aria-hidden="true">
|
| 5 |
+
<circle cx="12" cy="12" r="11" class="lens-aperture-blade"/>
|
| 6 |
+
<circle cx="12" cy="12" r="7" class="lens-aperture-blade"/>
|
| 7 |
+
<circle cx="12" cy="12" r="9.5" class="lens-aperture-ring"/>
|
| 8 |
+
</svg>
|
| 9 |
+
<span class="app-header-logo-text" data-i18n>TokenTrace</span>
|
| 10 |
+
</a>
|
| 11 |
+
</div>
|
| 12 |
+
<div class="app-header-title-block">
|
| 13 |
+
<h1 class="page-toolbar-title">
|
| 14 |
+
<span class="title-main-line">
|
| 15 |
+
<span data-page-title data-i18n></span>
|
| 16 |
+
<span class="title-tagline" data-page-subtitle data-i18n></span>
|
| 17 |
+
</span>
|
| 18 |
+
</h1>
|
| 19 |
+
</div>
|
| 20 |
+
<div class="app-header-extra"></div>
|
| 21 |
+
<div class="app-header-actions">
|
| 22 |
+
<div class="settings-menu-wrapper">
|
| 23 |
+
<!-- INCLUDE partials/settings-toolbar-controls.html -->
|
| 24 |
+
<div id="settings_menu" class="settings-menu" style="display: none;">
|
| 25 |
+
<!-- INCLUDE partials/settings-menu-common-mid.html -->
|
| 26 |
+
<!-- INCLUDE partials/settings-menu-trailing-admin.html -->
|
| 27 |
+
</div>
|
| 28 |
+
</div>
|
| 29 |
+
</div>
|
| 30 |
+
</header>
|
client/src/shared/lang/translations.ts
CHANGED
|
@@ -19,7 +19,7 @@ export const translations: Translations = {
|
|
| 19 |
// - client/src/content/home.en.html
|
| 20 |
// - client/src/content/home.zh.html
|
| 21 |
// 由 contentLoader.ts 动态加载
|
| 22 |
-
'
|
| 23 |
'Info Lens': 'Info Lens 信息透镜',
|
| 24 |
'A toolbox for looking inside language models': '探索大模型内部的可视化工具箱',
|
| 25 |
'A toolbox for exploring the informational nature of LLMs and language': '探索大模型内部的可视化工具箱',
|
|
@@ -39,7 +39,7 @@ export const translations: Translations = {
|
|
| 39 |
'Trace how information travels through the model': '输入一段话,生成信息流图,追踪信息如何在模型中传递',
|
| 40 |
'- explore the context-attribution DAG': '输入一段话,生成归因图追踪信息传播路径',
|
| 41 |
// 合成标题串(<title>):英文 key 与 injectPageMeta documentTitleEn 拼接一致
|
| 42 |
-
'
|
| 43 |
'Info Lens - A toolbox for exploring the informational nature of LLMs and language': '信息透镜 - 探索大模型内部的可视化工具箱',
|
| 44 |
'Info Highlight - Paste text to see which words surprise the model most': '信息高亮 - 粘贴一段文字,看模型认为哪些词最"意外"',
|
| 45 |
"Info Highlight - highlight the 'informative' parts": '信息高亮 - 粘贴任意文本,模型自动标出预测难度大的词汇',
|
|
@@ -50,10 +50,13 @@ export const translations: Translations = {
|
|
| 50 |
'Causal Flow - Trace how information travels through the model': '因果流 - 输入一段话,生成信息流图,追踪信息如何在模型中传递',
|
| 51 |
'LLM Causal Flow - explore the context-attribution DAG': '因果流 - 输入一段话,生成归因图追踪信息传播路径',
|
| 52 |
'Context Attribution - attribute a predicted token to its context (Gradient & Ablation)': '上下文归因 - 输入上下文与目标词,量化每个来源的贡献份额',
|
|
|
|
| 53 |
"Logit Lens - Watch how the model's confidence builds layer by layer": '逐层解码 - 输入句子,看模型在每一层怎么逐步确定每个词',
|
|
|
|
| 54 |
'Logit Lens - per-layer prediction trajectory': '逐层解码 - 输入句子,逐层追踪模型对每个词的预测信心',
|
| 55 |
'Branch Tree - Type a prefix and explore what the model might say next': '分支树 - 输入开头,看模型接下来可能接哪些词',
|
| 56 |
'Branch Tree - explore next-token candidates': '分支树 - 输入前缀,展开模型预测的 top-k 候选分支',
|
|
|
|
| 57 |
'New': '新功能',
|
| 58 |
'New: Ablation attribution': '新增:消融归因',
|
| 59 |
'Gradient': '梯度',
|
|
@@ -517,5 +520,35 @@ export const translations: Translations = {
|
|
| 517 |
'Activation Explainer': '激活解释',
|
| 518 |
'Activation explain failed': '激活解释失败',
|
| 519 |
'Loading activation explanation…': '正在推理激活解释…',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 520 |
}
|
| 521 |
};
|
|
|
|
| 19 |
// - client/src/content/home.en.html
|
| 20 |
// - client/src/content/home.zh.html
|
| 21 |
// 由 contentLoader.ts 动态加载
|
| 22 |
+
'TokenTrace': 'TokenTrace 信息透镜',
|
| 23 |
'Info Lens': 'Info Lens 信息透镜',
|
| 24 |
'A toolbox for looking inside language models': '探索大模型内部的可视化工具箱',
|
| 25 |
'A toolbox for exploring the informational nature of LLMs and language': '探索大模型内部的可视化工具箱',
|
|
|
|
| 39 |
'Trace how information travels through the model': '输入一段话,生成信息流图,追踪信息如何在模型中传递',
|
| 40 |
'- explore the context-attribution DAG': '输入一段话,生成归因图追踪信息传播路径',
|
| 41 |
// 合成标题串(<title>):英文 key 与 injectPageMeta documentTitleEn 拼接一致
|
| 42 |
+
'TokenTrace - A toolbox for looking inside language models': 'TokenTrace 信息透镜 - 探索大模型内部的可视化工具箱',
|
| 43 |
'Info Lens - A toolbox for exploring the informational nature of LLMs and language': '信息透镜 - 探索大模型内部的可视化工具箱',
|
| 44 |
'Info Highlight - Paste text to see which words surprise the model most': '信息高亮 - 粘贴一段文字,看模型认为哪些词最"意外"',
|
| 45 |
"Info Highlight - highlight the 'informative' parts": '信息高亮 - 粘贴任意文本,模型自动标出预测难度大的词汇',
|
|
|
|
| 50 |
'Causal Flow - Trace how information travels through the model': '因果流 - 输入一段话,生成信息流图,追踪信息如何在模型中传递',
|
| 51 |
'LLM Causal Flow - explore the context-attribution DAG': '因果流 - 输入一段话,生成归因图追踪信息传播路径',
|
| 52 |
'Context Attribution - attribute a predicted token to its context (Gradient & Ablation)': '上下文归因 - 输入上下文与目标词,量化每个来源的贡献份额',
|
| 53 |
+
'Watch confidence build layer by layer, with AI-explained activations': '逐层观察预测信心如何成型,并配 AI 激活解释',
|
| 54 |
"Logit Lens - Watch how the model's confidence builds layer by layer": '逐层解码 - 输入句子,看模型在每一层怎么逐步确定每个词',
|
| 55 |
+
'Logit Lens - Watch confidence build layer by layer, with AI-explained activations': '逐层解码 - 逐层观察预测信心如何成型,并配 AI 激活解释',
|
| 56 |
'Logit Lens - per-layer prediction trajectory': '逐层解码 - 输入句子,逐层追踪模型对每个词的预测信心',
|
| 57 |
'Branch Tree - Type a prefix and explore what the model might say next': '分支树 - 输入开头,看模型接下来可能接哪些词',
|
| 58 |
'Branch Tree - explore next-token candidates': '分支树 - 输入前缀,展开模型预测的 top-k 候选分支',
|
| 59 |
+
'Info Highlight - Compare': '信息高亮 - 对比',
|
| 60 |
'New': '新功能',
|
| 61 |
'New: Ablation attribution': '新增:消融归因',
|
| 62 |
'Gradient': '梯度',
|
|
|
|
| 520 |
'Activation Explainer': '激活解释',
|
| 521 |
'Activation explain failed': '激活解释失败',
|
| 522 |
'Loading activation explanation…': '正在推理激活解释…',
|
| 523 |
+
'Explanation': '解释',
|
| 524 |
+
'Confidence': '可信度',
|
| 525 |
+
'Click a context token above, then explain its activation': '点击上方的上下文 token,然后解释其激活',
|
| 526 |
+
'Explain activation': '解释激活',
|
| 527 |
+
'No attribution data yet': '暂无归因数据',
|
| 528 |
+
'Enter a prompt on the left, then click Analyze to see the causal flow DAG.': '在左侧输入提示词,然后点击分析以查看因果流 DAG 图。',
|
| 529 |
+
'No analysis yet': '暂无分析结果',
|
| 530 |
+
'Paste text on the left, then click Analyze to see token-level information density.': '在左侧粘贴文本,然后点击分析查看 token 级信息密度。',
|
| 531 |
+
'No attribution yet': '暂无归因结果',
|
| 532 |
+
'Enter context and target text on the left, then click Analyze to see which words drive the prediction.': '在左侧输入上下文和目标文本,然后点击分析查看哪些词驱动了预测。',
|
| 533 |
+
'No logit lens yet': '暂无逐层解码结果',
|
| 534 |
+
'Enter text on the left, then click Analyze to see how the model\'s confidence builds layer by layer.': '在左侧输入文本,然后点击分析查看模型的置信度如何逐层累积。',
|
| 535 |
+
'No branch tree yet': '暂无分支树',
|
| 536 |
+
'Type a prefix on the left, then click Generate to explore what the model might say next.': '在左侧输入前缀,然后点击生成探索模型可能输出的后续内容。',
|
| 537 |
+
'No conversation yet': '暂无对话',
|
| 538 |
+
'Type your message on the left, then click Send to chat and inspect every token the model produces.': '在左侧输入消息,然后点击发送开始对话并检查模型生成的每个 token。',
|
| 539 |
+
'Integrated Lab': '集成实验室',
|
| 540 |
+
'All six lenses in one unified workflow': '六大功能集成工作流',
|
| 541 |
+
'Integrated Lab - All six lenses in one unified workflow': '集成实验室 - 六大功能集成工作流',
|
| 542 |
+
'Highlight': '信息高亮',
|
| 543 |
+
'Branch': '分叉树',
|
| 544 |
+
'Activation': '激活解释',
|
| 545 |
+
'Start': '开始',
|
| 546 |
+
'Prompt': '提示词',
|
| 547 |
+
'Model': '模型',
|
| 548 |
+
'Max tokens': '最大 token 数',
|
| 549 |
+
'Select a token': '选择一个 token',
|
| 550 |
+
'Click a node in the DAG to inspect it with all six lenses.': '点击 DAG 中的节点,用六种视角检视它。',
|
| 551 |
+
'Enter a prompt on the left, then click Start to generate the causal flow DAG. Click any node to explore all six lenses.': '在左侧输入提示词,点击开始生成因果流 DAG。点击任意节点即可用六种视角探索。',
|
| 552 |
+
'Conversation': '对话',
|
| 553 |
}
|
| 554 |
};
|