logogram 0.7.1__tar.gz → 0.7.2__tar.gz

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.
Files changed (466) hide show
  1. {logogram-0.7.1 → logogram-0.7.2}/AGENTS.md +4 -1
  2. {logogram-0.7.1 → logogram-0.7.2}/CHANGELOG.md +71 -0
  3. {logogram-0.7.1 → logogram-0.7.2}/PKG-INFO +36 -12
  4. {logogram-0.7.1 → logogram-0.7.2}/README.md +35 -11
  5. {logogram-0.7.1 → logogram-0.7.2}/docs/README.md +13 -0
  6. {logogram-0.7.1 → logogram-0.7.2}/pyproject.toml +1 -1
  7. {logogram-0.7.1 → logogram-0.7.2}/scripts/build_reference.py +37 -0
  8. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/__init__.py +2 -2
  9. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/backends/transformer_lens.py +67 -5
  10. logogram-0.7.2/src/logogram/web_dist/assets/GuideFigures-CVkB65JR.css +1 -0
  11. logogram-0.7.2/src/logogram/web_dist/assets/GuideFigures-Cmhte-Sh.js +1 -0
  12. logogram-0.7.2/src/logogram/web_dist/assets/PatchingFigures-BR5oqtfl.js +1 -0
  13. logogram-0.7.2/src/logogram/web_dist/assets/PatchingFigures-C3wr9f6-.css +1 -0
  14. logogram-0.7.2/src/logogram/web_dist/assets/StartHere-DLYKmSNI.css +1 -0
  15. logogram-0.7.2/src/logogram/web_dist/assets/StartHere-NLiFuTvq.js +1 -0
  16. logogram-0.7.2/src/logogram/web_dist/assets/index-DITrz_0O.css +1 -0
  17. logogram-0.7.2/src/logogram/web_dist/assets/index-DreV1655.js +61 -0
  18. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/web_dist/index.html +2 -2
  19. {logogram-0.7.1 → logogram-0.7.2}/tests/test_reference.py +8 -2
  20. {logogram-0.7.1 → logogram-0.7.2}/uv.lock +505 -443
  21. {logogram-0.7.1 → logogram-0.7.2}/web/package-lock.json +258 -253
  22. {logogram-0.7.1 → logogram-0.7.2}/web/package.json +11 -11
  23. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/GuideDialog.module.css +5 -0
  24. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/GuideDialog.tsx +68 -34
  25. logogram-0.7.2/web/src/components/Questions.module.css +117 -0
  26. logogram-0.7.2/web/src/components/Questions.tsx +81 -0
  27. logogram-0.7.2/web/src/components/StartHere.module.css +77 -0
  28. logogram-0.7.2/web/src/components/StartHere.tsx +119 -0
  29. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/TopBar.tsx +2 -2
  30. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/Walkthrough.module.css +43 -0
  31. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/Walkthrough.tsx +42 -9
  32. logogram-0.7.2/web/src/components/figures/Figures.module.css +365 -0
  33. logogram-0.7.2/web/src/components/figures/GuideFigures.module.css +109 -0
  34. logogram-0.7.2/web/src/components/figures/GuideFigures.tsx +430 -0
  35. logogram-0.7.2/web/src/components/figures/IoiFinds.tsx +123 -0
  36. logogram-0.7.2/web/src/components/figures/ModelParts.module.css +97 -0
  37. logogram-0.7.2/web/src/components/figures/ModelParts.tsx +170 -0
  38. logogram-0.7.2/web/src/components/figures/Patching.module.css +70 -0
  39. logogram-0.7.2/web/src/components/figures/PatchingFigures.tsx +313 -0
  40. logogram-0.7.2/web/src/components/figures/StagedFigure.tsx +232 -0
  41. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ui/Icon.tsx +1 -0
  42. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ui/index.tsx +4 -1
  43. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ui/ui.module.css +6 -0
  44. logogram-0.7.2/web/src/lib/figures.ts +52 -0
  45. logogram-0.7.2/web/src/lib/guide.ts +124 -0
  46. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/hooks.ts +11 -0
  47. logogram-0.7.2/web/src/lib/questions.ts +123 -0
  48. logogram-0.7.2/web/src/lib/start.ts +222 -0
  49. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/walkthrough.ts +24 -6
  50. {logogram-0.7.1 → logogram-0.7.2}/web/src/screens/Projects.tsx +31 -7
  51. {logogram-0.7.1 → logogram-0.7.2}/web/src/screens/Screens.module.css +23 -2
  52. {logogram-0.7.1 → logogram-0.7.2}/web/src/screens/SystemCheck.tsx +6 -5
  53. {logogram-0.7.1 → logogram-0.7.2}/web/src/screens/Welcome.tsx +9 -4
  54. {logogram-0.7.1 → logogram-0.7.2}/web/src/screens/Workbench.tsx +7 -4
  55. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/BaselineView.module.css +18 -0
  56. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/BaselineView.tsx +12 -4
  57. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/DirectionResults.tsx +1 -1
  58. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/ExperimentView.tsx +7 -65
  59. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/TextView.tsx +2 -2
  60. {logogram-0.7.1 → logogram-0.7.2}/web/tests/chat.browser.ts +2 -2
  61. {logogram-0.7.1 → logogram-0.7.2}/web/tests/context.unit.ts +10 -0
  62. {logogram-0.7.1 → logogram-0.7.2}/web/tests/directions.browser.ts +4 -4
  63. {logogram-0.7.1 → logogram-0.7.2}/web/tests/guide.browser.ts +3 -3
  64. {logogram-0.7.1 → logogram-0.7.2}/web/tests/guide.unit.ts +142 -12
  65. {logogram-0.7.1 → logogram-0.7.2}/web/tests/workbench.browser.ts +2 -2
  66. logogram-0.7.1/src/logogram/web_dist/assets/index-BfLPatk-.js +0 -60
  67. logogram-0.7.1/src/logogram/web_dist/assets/index-DpkMdVq8.css +0 -1
  68. logogram-0.7.1/web/src/components/StartHere.module.css +0 -89
  69. logogram-0.7.1/web/src/components/StartHere.tsx +0 -134
  70. logogram-0.7.1/web/src/lib/guide.ts +0 -76
  71. logogram-0.7.1/web/src/lib/start.ts +0 -160
  72. {logogram-0.7.1 → logogram-0.7.2}/.gitignore +0 -0
  73. {logogram-0.7.1 → logogram-0.7.2}/LICENSE +0 -0
  74. {logogram-0.7.1 → logogram-0.7.2}/notebooks/README.md +0 -0
  75. {logogram-0.7.1 → logogram-0.7.2}/scripts/check_privacy.py +0 -0
  76. {logogram-0.7.1 → logogram-0.7.2}/scripts/sae_catalogue.py +0 -0
  77. {logogram-0.7.1 → logogram-0.7.2}/scripts/smoke_wheel.py +0 -0
  78. {logogram-0.7.1 → logogram-0.7.2}/scripts/validate_real_weights.py +0 -0
  79. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/__main__.py +0 -0
  80. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/acdc.py +0 -0
  81. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/analysis.py +0 -0
  82. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/api.py +0 -0
  83. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/atp.py +0 -0
  84. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/backends/__init__.py +0 -0
  85. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/backends/base.py +0 -0
  86. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/backends/catalogue.py +0 -0
  87. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/backends/hub.py +0 -0
  88. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/backends/sae_catalogue.json +0 -0
  89. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/backends/saes.py +0 -0
  90. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/chat.py +0 -0
  91. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/circuits.py +0 -0
  92. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/cli.py +0 -0
  93. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/compare.py +0 -0
  94. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/corpora.py +0 -0
  95. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/corpus_import.py +0 -0
  96. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/das.py +0 -0
  97. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/datasets.py +0 -0
  98. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/direct.py +0 -0
  99. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/directions.py +0 -0
  100. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/edges.py +0 -0
  101. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/engine.py +0 -0
  102. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/examples/factual-recall-gpt2/.gitignore +0 -0
  103. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/examples/factual-recall-gpt2/datasets/factual-recall.jsonl +0 -0
  104. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/examples/factual-recall-gpt2/experiments/capital-causal-trace/spec.json +0 -0
  105. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/examples/factual-recall-gpt2/project.json +0 -0
  106. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/examples/gendered-pronoun-gpt2/.gitignore +0 -0
  107. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/examples/gendered-pronoun-gpt2/datasets/gendered-pronoun.jsonl +0 -0
  108. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/examples/gendered-pronoun-gpt2/experiments/pronoun-direct-effects/spec.json +0 -0
  109. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/examples/gendered-pronoun-gpt2/project.json +0 -0
  110. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/examples/greater-than-gpt2/.gitignore +0 -0
  111. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/examples/greater-than-gpt2/datasets/greater-than.jsonl +0 -0
  112. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/examples/greater-than-gpt2/experiments/greater-than-layers/spec.json +0 -0
  113. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/examples/greater-than-gpt2/project.json +0 -0
  114. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/examples/ioi-gpt2/.gitignore +0 -0
  115. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/examples/ioi-gpt2/datasets/ioi.jsonl +0 -0
  116. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/examples/ioi-gpt2/experiments/ioi-head-patching/spec.json +0 -0
  117. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/examples/ioi-gpt2/project.json +0 -0
  118. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/exports.py +0 -0
  119. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/features.py +0 -0
  120. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/fileio.py +0 -0
  121. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/gallery.py +0 -0
  122. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/heads.py +0 -0
  123. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/history.py +0 -0
  124. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/inside.py +0 -0
  125. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/ioi.py +0 -0
  126. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/lenses.py +0 -0
  127. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/local_models.py +0 -0
  128. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/metrics.py +0 -0
  129. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/owner.py +0 -0
  130. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/partial.py +0 -0
  131. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/paths.py +0 -0
  132. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/probes.py +0 -0
  133. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/project.py +0 -0
  134. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/prompts.py +0 -0
  135. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/report.py +0 -0
  136. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/representations.py +0 -0
  137. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/research.py +0 -0
  138. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/results.py +0 -0
  139. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/robustness.py +0 -0
  140. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/runner.py +0 -0
  141. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/runqueue.py +0 -0
  142. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/runs.py +0 -0
  143. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/sae.py +0 -0
  144. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/sae_training.py +0 -0
  145. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/schema.py +0 -0
  146. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/server/__init__.py +0 -0
  147. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/server/app.py +0 -0
  148. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/server/models.py +0 -0
  149. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/server/security.py +0 -0
  150. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/server/state.py +0 -0
  151. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/sites.py +0 -0
  152. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/spec.py +0 -0
  153. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/stats.py +0 -0
  154. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/steering.py +0 -0
  155. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/support.py +0 -0
  156. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/sweeps.py +0 -0
  157. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/system.py +0 -0
  158. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/tasks.py +0 -0
  159. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/top_activations.py +0 -0
  160. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/toys.py +0 -0
  161. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/training.py +0 -0
  162. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/updates.py +0 -0
  163. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/verify.py +0 -0
  164. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/web_dist/assets/instrument-sans-latin-ext-standard-normal-C5E2Gvlv.woff2 +0 -0
  165. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/web_dist/assets/instrument-sans-latin-standard-normal-BVScPF0l.woff2 +0 -0
  166. {logogram-0.7.1 → logogram-0.7.2}/src/logogram/web_dist/favicon.svg +0 -0
  167. {logogram-0.7.1 → logogram-0.7.2}/tests/browser_server.py +0 -0
  168. {logogram-0.7.1 → logogram-0.7.2}/tests/catalogue_fixture.py +0 -0
  169. {logogram-0.7.1 → logogram-0.7.2}/tests/conftest.py +0 -0
  170. {logogram-0.7.1 → logogram-0.7.2}/tests/fixtures/old-runs/datasets/ioi.jsonl +0 -0
  171. {logogram-0.7.1 → logogram-0.7.2}/tests/fixtures/old-runs/datasets/snapshots/f5e2f2b1d68ac7ab59b1cefcd84f7f0cfc81c71c85c05c925f872e01c01d6e69.jsonl +0 -0
  172. {logogram-0.7.1 → logogram-0.7.2}/tests/fixtures/old-runs/experiments/made-by-0.1.0/manifest.json +0 -0
  173. {logogram-0.7.1 → logogram-0.7.2}/tests/fixtures/old-runs/experiments/made-by-0.1.0/results.parquet +0 -0
  174. {logogram-0.7.1 → logogram-0.7.2}/tests/fixtures/old-runs/experiments/made-by-0.1.0/spec.json +0 -0
  175. {logogram-0.7.1 → logogram-0.7.2}/tests/fixtures/old-runs/experiments/made-by-0.1.0/summary.json +0 -0
  176. {logogram-0.7.1 → logogram-0.7.2}/tests/fixtures/old-runs/experiments/made-by-0.2.0/manifest.json +0 -0
  177. {logogram-0.7.1 → logogram-0.7.2}/tests/fixtures/old-runs/experiments/made-by-0.2.0/results.parquet +0 -0
  178. {logogram-0.7.1 → logogram-0.7.2}/tests/fixtures/old-runs/experiments/made-by-0.2.0/spec.json +0 -0
  179. {logogram-0.7.1 → logogram-0.7.2}/tests/fixtures/old-runs/experiments/made-by-0.2.0/summary.json +0 -0
  180. {logogram-0.7.1 → logogram-0.7.2}/tests/fixtures/old-runs/experiments/written-for-0.1.0/spec.json +0 -0
  181. {logogram-0.7.1 → logogram-0.7.2}/tests/fixtures/old-runs/project.json +0 -0
  182. {logogram-0.7.1 → logogram-0.7.2}/tests/test_acdc.py +0 -0
  183. {logogram-0.7.1 → logogram-0.7.2}/tests/test_api.py +0 -0
  184. {logogram-0.7.1 → logogram-0.7.2}/tests/test_architectures.py +0 -0
  185. {logogram-0.7.1 → logogram-0.7.2}/tests/test_atp.py +0 -0
  186. {logogram-0.7.1 → logogram-0.7.2}/tests/test_attention_saes.py +0 -0
  187. {logogram-0.7.1 → logogram-0.7.2}/tests/test_chat_models.py +0 -0
  188. {logogram-0.7.1 → logogram-0.7.2}/tests/test_chat_templates.py +0 -0
  189. {logogram-0.7.1 → logogram-0.7.2}/tests/test_circuits.py +0 -0
  190. {logogram-0.7.1 → logogram-0.7.2}/tests/test_cli.py +0 -0
  191. {logogram-0.7.1 → logogram-0.7.2}/tests/test_community.py +0 -0
  192. {logogram-0.7.1 → logogram-0.7.2}/tests/test_corpora.py +0 -0
  193. {logogram-0.7.1 → logogram-0.7.2}/tests/test_corpus_cli.py +0 -0
  194. {logogram-0.7.1 → logogram-0.7.2}/tests/test_corpus_import.py +0 -0
  195. {logogram-0.7.1 → logogram-0.7.2}/tests/test_corpus_server.py +0 -0
  196. {logogram-0.7.1 → logogram-0.7.2}/tests/test_dataset_files.py +0 -0
  197. {logogram-0.7.1 → logogram-0.7.2}/tests/test_devices.py +0 -0
  198. {logogram-0.7.1 → logogram-0.7.2}/tests/test_direct.py +0 -0
  199. {logogram-0.7.1 → logogram-0.7.2}/tests/test_direction_methods.py +0 -0
  200. {logogram-0.7.1 → logogram-0.7.2}/tests/test_directions.py +0 -0
  201. {logogram-0.7.1 → logogram-0.7.2}/tests/test_docs.py +0 -0
  202. {logogram-0.7.1 → logogram-0.7.2}/tests/test_edges.py +0 -0
  203. {logogram-0.7.1 → logogram-0.7.2}/tests/test_engine.py +0 -0
  204. {logogram-0.7.1 → logogram-0.7.2}/tests/test_examples.py +0 -0
  205. {logogram-0.7.1 → logogram-0.7.2}/tests/test_explorer.py +0 -0
  206. {logogram-0.7.1 → logogram-0.7.2}/tests/test_feature_writes.py +0 -0
  207. {logogram-0.7.1 → logogram-0.7.2}/tests/test_finer_sites.py +0 -0
  208. {logogram-0.7.1 → logogram-0.7.2}/tests/test_gpus.py +0 -0
  209. {logogram-0.7.1 → logogram-0.7.2}/tests/test_hardening.py +0 -0
  210. {logogram-0.7.1 → logogram-0.7.2}/tests/test_heads.py +0 -0
  211. {logogram-0.7.1 → logogram-0.7.2}/tests/test_history.py +0 -0
  212. {logogram-0.7.1 → logogram-0.7.2}/tests/test_inside.py +0 -0
  213. {logogram-0.7.1 → logogram-0.7.2}/tests/test_lenses.py +0 -0
  214. {logogram-0.7.1 → logogram-0.7.2}/tests/test_loading.py +0 -0
  215. {logogram-0.7.1 → logogram-0.7.2}/tests/test_local_models.py +0 -0
  216. {logogram-0.7.1 → logogram-0.7.2}/tests/test_metrics.py +0 -0
  217. {logogram-0.7.1 → logogram-0.7.2}/tests/test_notebooks.py +0 -0
  218. {logogram-0.7.1 → logogram-0.7.2}/tests/test_old_runs.py +0 -0
  219. {logogram-0.7.1 → logogram-0.7.2}/tests/test_partial.py +0 -0
  220. {logogram-0.7.1 → logogram-0.7.2}/tests/test_paths.py +0 -0
  221. {logogram-0.7.1 → logogram-0.7.2}/tests/test_privacy.py +0 -0
  222. {logogram-0.7.1 → logogram-0.7.2}/tests/test_projects.py +0 -0
  223. {logogram-0.7.1 → logogram-0.7.2}/tests/test_queue.py +0 -0
  224. {logogram-0.7.1 → logogram-0.7.2}/tests/test_release_fixes.py +0 -0
  225. {logogram-0.7.1 → logogram-0.7.2}/tests/test_report.py +0 -0
  226. {logogram-0.7.1 → logogram-0.7.2}/tests/test_representations.py +0 -0
  227. {logogram-0.7.1 → logogram-0.7.2}/tests/test_run_tracking.py +0 -0
  228. {logogram-0.7.1 → logogram-0.7.2}/tests/test_sae.py +0 -0
  229. {logogram-0.7.1 → logogram-0.7.2}/tests/test_sae_catalogue.py +0 -0
  230. {logogram-0.7.1 → logogram-0.7.2}/tests/test_sae_training.py +0 -0
  231. {logogram-0.7.1 → logogram-0.7.2}/tests/test_sanity.py +0 -0
  232. {logogram-0.7.1 → logogram-0.7.2}/tests/test_saved_queue.py +0 -0
  233. {logogram-0.7.1 → logogram-0.7.2}/tests/test_security.py +0 -0
  234. {logogram-0.7.1 → logogram-0.7.2}/tests/test_server.py +0 -0
  235. {logogram-0.7.1 → logogram-0.7.2}/tests/test_skip_transcoders.py +0 -0
  236. {logogram-0.7.1 → logogram-0.7.2}/tests/test_specs.py +0 -0
  237. {logogram-0.7.1 → logogram-0.7.2}/tests/test_statistics.py +0 -0
  238. {logogram-0.7.1 → logogram-0.7.2}/tests/test_steering.py +0 -0
  239. {logogram-0.7.1 → logogram-0.7.2}/tests/test_steering_features.py +0 -0
  240. {logogram-0.7.1 → logogram-0.7.2}/tests/test_support.py +0 -0
  241. {logogram-0.7.1 → logogram-0.7.2}/tests/test_sweeps.py +0 -0
  242. {logogram-0.7.1 → logogram-0.7.2}/tests/test_tasks.py +0 -0
  243. {logogram-0.7.1 → logogram-0.7.2}/tests/test_toys.py +0 -0
  244. {logogram-0.7.1 → logogram-0.7.2}/tests/test_training_cli.py +0 -0
  245. {logogram-0.7.1 → logogram-0.7.2}/tests/test_training_server.py +0 -0
  246. {logogram-0.7.1 → logogram-0.7.2}/tests/test_transcoders.py +0 -0
  247. {logogram-0.7.1 → logogram-0.7.2}/tests/test_uneven.py +0 -0
  248. {logogram-0.7.1 → logogram-0.7.2}/tests/test_units.py +0 -0
  249. {logogram-0.7.1 → logogram-0.7.2}/tests/test_updates.py +0 -0
  250. {logogram-0.7.1 → logogram-0.7.2}/tests/test_validation_script.py +0 -0
  251. {logogram-0.7.1 → logogram-0.7.2}/web/index.html +0 -0
  252. {logogram-0.7.1 → logogram-0.7.2}/web/playwright.config.ts +0 -0
  253. {logogram-0.7.1 → logogram-0.7.2}/web/public/favicon.svg +0 -0
  254. {logogram-0.7.1 → logogram-0.7.2}/web/src/App.module.css +0 -0
  255. {logogram-0.7.1 → logogram-0.7.2}/web/src/App.tsx +0 -0
  256. {logogram-0.7.1 → logogram-0.7.2}/web/src/api/client.ts +0 -0
  257. {logogram-0.7.1 → logogram-0.7.2}/web/src/api/events.ts +0 -0
  258. {logogram-0.7.1 → logogram-0.7.2}/web/src/api/types.ts +0 -0
  259. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/AboutDialog.tsx +0 -0
  260. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/CancelRunDialog.tsx +0 -0
  261. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/CircuitDialog.tsx +0 -0
  262. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/CommandPalette.module.css +0 -0
  263. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/CommandPalette.tsx +0 -0
  264. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/CopyCommand.module.css +0 -0
  265. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/CopyCommand.tsx +0 -0
  266. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/Distribution.module.css +0 -0
  267. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/Distribution.tsx +0 -0
  268. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ErrorBoundary.module.css +0 -0
  269. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ErrorBoundary.tsx +0 -0
  270. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ExampleGallery.module.css +0 -0
  271. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ExampleGallery.tsx +0 -0
  272. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/FeatureWrites.module.css +0 -0
  273. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/FeatureWrites.tsx +0 -0
  274. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/FolderPicker.module.css +0 -0
  275. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/FolderPicker.tsx +0 -0
  276. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/Header.module.css +0 -0
  277. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/Header.tsx +0 -0
  278. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/Heatmap/Heatmap.module.css +0 -0
  279. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/Heatmap/Heatmap.tsx +0 -0
  280. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/Heatmap/ScaleBar.tsx +0 -0
  281. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/HelpDialogs.module.css +0 -0
  282. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/HelpMenu.module.css +0 -0
  283. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/HelpMenu.tsx +0 -0
  284. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/History.module.css +0 -0
  285. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/History.tsx +0 -0
  286. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/Inspector.module.css +0 -0
  287. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/Inspector.tsx +0 -0
  288. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/Logogram.tsx +0 -0
  289. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/LogogramDial.module.css +0 -0
  290. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/LogogramDial.tsx +0 -0
  291. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ManageDialogs.tsx +0 -0
  292. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ModelDialog.module.css +0 -0
  293. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ModelDialog.tsx +0 -0
  294. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ModelMap/Legend.tsx +0 -0
  295. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ModelMap/ModelMap.module.css +0 -0
  296. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ModelMap/ModelMap.tsx +0 -0
  297. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/Notices.module.css +0 -0
  298. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/Notices.tsx +0 -0
  299. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ReportDialog.tsx +0 -0
  300. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/RobustnessDialog.tsx +0 -0
  301. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/RunButton.tsx +0 -0
  302. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ShortcutsDialog.module.css +0 -0
  303. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ShortcutsDialog.tsx +0 -0
  304. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/Splitter.module.css +0 -0
  305. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/Splitter.tsx +0 -0
  306. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/StatusLine.module.css +0 -0
  307. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/StatusLine.tsx +0 -0
  308. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/SweepChart/SweepChart.module.css +0 -0
  309. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/SweepChart/SweepChart.tsx +0 -0
  310. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/SweepDialog.module.css +0 -0
  311. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/SweepDialog.tsx +0 -0
  312. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/TokenStrip.module.css +0 -0
  313. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/TokenStrip.tsx +0 -0
  314. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/TopBar.module.css +0 -0
  315. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/TrainDialog.module.css +0 -0
  316. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/TrainDialog.tsx +0 -0
  317. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/UpdateNotice.module.css +0 -0
  318. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/UpdateNotice.tsx +0 -0
  319. {logogram-0.7.1 → logogram-0.7.2}/web/src/components/ViewTabs.tsx +0 -0
  320. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/analysis.ts +0 -0
  321. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/buildSpec.ts +0 -0
  322. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/canvas.ts +0 -0
  323. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/chat.ts +0 -0
  324. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/circuits.ts +0 -0
  325. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/color.ts +0 -0
  326. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/corpora.ts +0 -0
  327. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/devices.ts +0 -0
  328. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/directions.ts +0 -0
  329. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/edgePlan.ts +0 -0
  330. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/edges.ts +0 -0
  331. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/environment.ts +0 -0
  332. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/export.ts +0 -0
  333. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/formDraft.ts +0 -0
  334. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/formHistory.ts +0 -0
  335. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/formState.ts +0 -0
  336. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/format.ts +0 -0
  337. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/heatmapNavigation.ts +0 -0
  338. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/help.ts +0 -0
  339. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/keys.ts +0 -0
  340. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/logogram.ts +0 -0
  341. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/metrics.ts +0 -0
  342. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/milestones.ts +0 -0
  343. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/motion.ts +0 -0
  344. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/promptEdits.ts +0 -0
  345. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/promptRows.ts +0 -0
  346. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/representations.ts +0 -0
  347. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/route.ts +0 -0
  348. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/runs.ts +0 -0
  349. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/sites.ts +0 -0
  350. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/spec.ts +0 -0
  351. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/sweeps.ts +0 -0
  352. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/thresholds.ts +0 -0
  353. {logogram-0.7.1 → logogram-0.7.2}/web/src/lib/training.ts +0 -0
  354. {logogram-0.7.1 → logogram-0.7.2}/web/src/main.tsx +0 -0
  355. {logogram-0.7.1 → logogram-0.7.2}/web/src/screens/Workbench.module.css +0 -0
  356. {logogram-0.7.1 → logogram-0.7.2}/web/src/store/app.ts +0 -0
  357. {logogram-0.7.1 → logogram-0.7.2}/web/src/store/help.ts +0 -0
  358. {logogram-0.7.1 → logogram-0.7.2}/web/src/styles/global.css +0 -0
  359. {logogram-0.7.1 → logogram-0.7.2}/web/src/styles/tokens.css +0 -0
  360. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/AttentionView.module.css +0 -0
  361. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/AttentionView.tsx +0 -0
  362. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/ChatTemplateSettings.tsx +0 -0
  363. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/CircuitResults.tsx +0 -0
  364. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/CompareView.module.css +0 -0
  365. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/CompareView.tsx +0 -0
  366. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/Continuations.module.css +0 -0
  367. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/Continuations.tsx +0 -0
  368. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/CorpusView.module.css +0 -0
  369. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/CorpusView.tsx +0 -0
  370. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/DirectionPicker.tsx +0 -0
  371. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/EdgeResults.module.css +0 -0
  372. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/EdgeResults.tsx +0 -0
  373. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/ExperimentView.module.css +0 -0
  374. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/ExploreView.module.css +0 -0
  375. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/ExploreView.tsx +0 -0
  376. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/FeaturesView.module.css +0 -0
  377. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/FeaturesView.tsx +0 -0
  378. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/Forest.module.css +0 -0
  379. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/Forest.tsx +0 -0
  380. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/HeadComparisonView.module.css +0 -0
  381. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/HeadComparisonView.tsx +0 -0
  382. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/HeadKinds.module.css +0 -0
  383. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/HeadKinds.tsx +0 -0
  384. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/MetricSettings.tsx +0 -0
  385. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/NeuronResults.module.css +0 -0
  386. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/NeuronResults.tsx +0 -0
  387. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/PredictionsView.module.css +0 -0
  388. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/PredictionsView.tsx +0 -0
  389. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/ProbeSettings.tsx +0 -0
  390. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/PromptsView.module.css +0 -0
  391. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/PromptsView.tsx +0 -0
  392. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/RepresentationsView.module.css +0 -0
  393. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/RepresentationsView.tsx +0 -0
  394. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/ResearchView.module.css +0 -0
  395. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/ResearchView.tsx +0 -0
  396. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/ResultsView.module.css +0 -0
  397. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/ResultsView.tsx +0 -0
  398. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/RunSummary.tsx +0 -0
  399. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/SAEPicker.module.css +0 -0
  400. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/SAEPicker.tsx +0 -0
  401. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/SiteSets.module.css +0 -0
  402. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/SiteSetsEditor.tsx +0 -0
  403. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/SpecView.module.css +0 -0
  404. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/SpecView.tsx +0 -0
  405. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/StatisticsSettings.tsx +0 -0
  406. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/SweepView.module.css +0 -0
  407. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/SweepView.tsx +0 -0
  408. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/TaskGenerator.tsx +0 -0
  409. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/TextView.module.css +0 -0
  410. {logogram-0.7.1 → logogram-0.7.2}/web/src/views/views.module.css +0 -0
  411. {logogram-0.7.1 → logogram-0.7.2}/web/tests/a11y.browser.ts +0 -0
  412. {logogram-0.7.1 → logogram-0.7.2}/web/tests/acdc.browser.ts +0 -0
  413. {logogram-0.7.1 → logogram-0.7.2}/web/tests/acdc.unit.ts +0 -0
  414. {logogram-0.7.1 → logogram-0.7.2}/web/tests/analyses.browser.ts +0 -0
  415. {logogram-0.7.1 → logogram-0.7.2}/web/tests/autosave.unit.ts +0 -0
  416. {logogram-0.7.1 → logogram-0.7.2}/web/tests/axe.ts +0 -0
  417. {logogram-0.7.1 → logogram-0.7.2}/web/tests/chat.unit.ts +0 -0
  418. {logogram-0.7.1 → logogram-0.7.2}/web/tests/circuits.unit.ts +0 -0
  419. {logogram-0.7.1 → logogram-0.7.2}/web/tests/color.unit.ts +0 -0
  420. {logogram-0.7.1 → logogram-0.7.2}/web/tests/corpora.unit.ts +0 -0
  421. {logogram-0.7.1 → logogram-0.7.2}/web/tests/corpus.browser.ts +0 -0
  422. {logogram-0.7.1 → logogram-0.7.2}/web/tests/devices.unit.ts +0 -0
  423. {logogram-0.7.1 → logogram-0.7.2}/web/tests/directions.unit.ts +0 -0
  424. {logogram-0.7.1 → logogram-0.7.2}/web/tests/docs.ts +0 -0
  425. {logogram-0.7.1 → logogram-0.7.2}/web/tests/edges.browser.ts +0 -0
  426. {logogram-0.7.1 → logogram-0.7.2}/web/tests/edges.unit.ts +0 -0
  427. {logogram-0.7.1 → logogram-0.7.2}/web/tests/environment.unit.ts +0 -0
  428. {logogram-0.7.1 → logogram-0.7.2}/web/tests/export.unit.ts +0 -0
  429. {logogram-0.7.1 → logogram-0.7.2}/web/tests/fakeRuns.ts +0 -0
  430. {logogram-0.7.1 → logogram-0.7.2}/web/tests/finer.browser.ts +0 -0
  431. {logogram-0.7.1 → logogram-0.7.2}/web/tests/finer.unit.ts +0 -0
  432. {logogram-0.7.1 → logogram-0.7.2}/web/tests/form.unit.ts +0 -0
  433. {logogram-0.7.1 → logogram-0.7.2}/web/tests/gallery.browser.ts +0 -0
  434. {logogram-0.7.1 → logogram-0.7.2}/web/tests/heads.browser.ts +0 -0
  435. {logogram-0.7.1 → logogram-0.7.2}/web/tests/heatmap.unit.ts +0 -0
  436. {logogram-0.7.1 → logogram-0.7.2}/web/tests/help.browser.ts +0 -0
  437. {logogram-0.7.1 → logogram-0.7.2}/web/tests/help.unit.ts +0 -0
  438. {logogram-0.7.1 → logogram-0.7.2}/web/tests/history.browser.ts +0 -0
  439. {logogram-0.7.1 → logogram-0.7.2}/web/tests/history.unit.ts +0 -0
  440. {logogram-0.7.1 → logogram-0.7.2}/web/tests/logogram.unit.ts +0 -0
  441. {logogram-0.7.1 → logogram-0.7.2}/web/tests/manage.browser.ts +0 -0
  442. {logogram-0.7.1 → logogram-0.7.2}/web/tests/manage.unit.ts +0 -0
  443. {logogram-0.7.1 → logogram-0.7.2}/web/tests/navigation.browser.ts +0 -0
  444. {logogram-0.7.1 → logogram-0.7.2}/web/tests/notices.unit.ts +0 -0
  445. {logogram-0.7.1 → logogram-0.7.2}/web/tests/partial.browser.ts +0 -0
  446. {logogram-0.7.1 → logogram-0.7.2}/web/tests/prompts.browser.ts +0 -0
  447. {logogram-0.7.1 → logogram-0.7.2}/web/tests/prompts.unit.ts +0 -0
  448. {logogram-0.7.1 → logogram-0.7.2}/web/tests/queue.browser.ts +0 -0
  449. {logogram-0.7.1 → logogram-0.7.2}/web/tests/queue.unit.ts +0 -0
  450. {logogram-0.7.1 → logogram-0.7.2}/web/tests/route.unit.ts +0 -0
  451. {logogram-0.7.1 → logogram-0.7.2}/web/tests/runs.browser.ts +0 -0
  452. {logogram-0.7.1 → logogram-0.7.2}/web/tests/saes.browser.ts +0 -0
  453. {logogram-0.7.1 → logogram-0.7.2}/web/tests/spec.unit.ts +0 -0
  454. {logogram-0.7.1 → logogram-0.7.2}/web/tests/steering.browser.ts +0 -0
  455. {logogram-0.7.1 → logogram-0.7.2}/web/tests/sweep.browser.ts +0 -0
  456. {logogram-0.7.1 → logogram-0.7.2}/web/tests/sweeps.unit.ts +0 -0
  457. {logogram-0.7.1 → logogram-0.7.2}/web/tests/tasks.unit.ts +0 -0
  458. {logogram-0.7.1 → logogram-0.7.2}/web/tests/text.browser.ts +0 -0
  459. {logogram-0.7.1 → logogram-0.7.2}/web/tests/tokens.browser.ts +0 -0
  460. {logogram-0.7.1 → logogram-0.7.2}/web/tests/training.browser.ts +0 -0
  461. {logogram-0.7.1 → logogram-0.7.2}/web/tests/training.unit.ts +0 -0
  462. {logogram-0.7.1 → logogram-0.7.2}/web/tests/uneven.browser.ts +0 -0
  463. {logogram-0.7.1 → logogram-0.7.2}/web/tests/ux.browser.ts +0 -0
  464. {logogram-0.7.1 → logogram-0.7.2}/web/tests/walkthrough.browser.ts +0 -0
  465. {logogram-0.7.1 → logogram-0.7.2}/web/tsconfig.json +0 -0
  466. {logogram-0.7.1 → logogram-0.7.2}/web/vite.config.ts +0 -0
@@ -81,7 +81,10 @@ traceability come before features.
81
81
  narrow, so body text widens it (`--word-space`). Monospace appears only in the spec view.
82
82
  Sentence case everywhere; no all-caps labels.
83
83
  * Motion only explains state changes, such as cells filling as results stream in, a glyph
84
- appearing, or panels opening. Respect reduced motion.
84
+ appearing, or panels opening, and, in the guide's figures (`web/src/components/figures/`), how
85
+ a method works, stage by stage. A figure plays only while it is in view, can be paused and
86
+ stepped through, and is still under reduced motion, showing the whole picture. Respect reduced
87
+ motion everywhere.
85
88
  * Copy uses plain verbs that say exactly what happens. Errors say what went wrong and how to fix
86
89
  it. Titles say what a view found or is for; they don't repeat the tab's name.
87
90
  * Avoid the generic AI-app look and the enterprise look: no sidebars of icons, grey dashboards,
@@ -2,6 +2,77 @@
2
2
 
3
3
  What changed in each version of Logogram.
4
4
 
5
+ ## 0.7.2 (2026-11-26)
6
+
7
+ Start here and the guide in moving figures, what Logogram can find out on the first screens, and a
8
+ walkthrough that notices what you do.
9
+
10
+ ### Added
11
+
12
+ - **Figures that move.** Start here explains in figures that play through their stages: the IOI
13
+ example's two prompts, token by token, and the logit difference each gives; activation
14
+ patching, as three runs of GPT-2 small with head 9.9's output copied from the clean run into the
15
+ corrupt one and the answer moving back toward Mary by its effect; the parts of a model, each
16
+ term drawing its part, with one layer as a row of the map; and what the example finds, its heads
17
+ painting in layer by layer and then ringed role by role, with the effects the guide to
18
+ replicating IOI lists (a test checks them against it). The guide's other pages draw the
19
+ workbench part by part, how to read the map, how a run's results write its logogram (with the
20
+ app's own glyph), and a bootstrap interval built from each prompt's effect. A figure plays only
21
+ while it is in view and the page is shown; its stages are one Tab stop, chosen with the arrow
22
+ keys or the pointer, **Pause** stops it, and under reduced motion it doesn't move and shows the
23
+ whole picture. The figures load with
24
+ the guide, from this computer.
25
+ - **What you can find out.** Start here, the first screens and the documentation's index open on
26
+ the four questions Logogram's methods answer (where is it computed, how does it flow, what does
27
+ a site represent, what does adding a direction do), each with what it finds out and where to
28
+ begin. The experiment form groups its methods under the same questions, from one list.
29
+ - The documentation shows activation patching in a figure, in the README, Getting started and
30
+ the page on activation patching.
31
+
32
+ ### Changed
33
+
34
+ - **The first screens say what Logogram is for.** Under the tagline, in two sentences: it finds
35
+ which parts of a language model an answer depends on, by changing one part at a time and
36
+ measuring how far the answer moves. Start here is the solid ink button until the walkthrough
37
+ has been finished or skipped. All projects shows what you can find out and the examples first
38
+ when there are no projects yet, and the system check lists the examples before the settings.
39
+ - **Start here is shorter to read.** Its paragraphs are fewer, as the figures carry what they
40
+ said, and the first hour is a line of numbered steps, each in the color of where it happens. The
41
+ guide is a larger dialog.
42
+ - **The walkthrough notices what you do.** A step says when what it asks for is done (the
43
+ baseline checked, with how many clean prompts prefer the answer, or a cell chosen), pressing
44
+ **Run** at the experiment's step goes on to the run's results by itself, and each step shows
45
+ where it is among the six. While it is shown, the button beside the tabs that names the next of
46
+ four steps steps aside, so there is one count, not two. The experiment's step stands beside
47
+ **Run**, so the form's name and notes stay in view.
48
+ - The baseline, before it is checked, says what the check will show.
49
+
50
+ ### Fixed
51
+
52
+ - A run's own copy of its prompts is named as the dataset chip names it, the saved prompts of the
53
+ run, not by its file in `datasets/snapshots/`, a 64-character hash, in the baseline and the
54
+ experiment form.
55
+ - Four kinds of button are named by what they show, so someone who speaks a control's label to
56
+ press it can press them: **Commands**, the next of the first four steps, a token of Your text
57
+ and **Save as direction** in a probe's or a learned subspace's results. Each name now begins
58
+ with the button's own words and goes on to say the rest.
59
+ - With transformers 5.22 or later, every model's chat template was refused as one that writes
60
+ today's date, and runs with a chat template failed: transformers now rebuilds what a template is
61
+ given out of plain values, and the markers Logogram gives it for no clock and for special tokens
62
+ the model lacks broke in that. Logogram now renders the template as transformers compiles it,
63
+ with those markers as they are, so the text is the same as before.
64
+
65
+ ### Development
66
+
67
+ - The dependencies are brought up to date (fastapi, pydantic, transformer-lens 4.4, transformers,
68
+ torch 2.15, huggingface-hub, pyarrow, filelock, setuptools, certifi, opentelemetry-api and
69
+ others, the web app's packages and the GitHub Actions), which also clears the known
70
+ vulnerabilities in filelock, setuptools, certifi and opentelemetry-api. ruff is 0.17.4, and the
71
+ accessibility scan is axe-core 4.14.
72
+ - The reference pages are written the same way with Typer 0.29, whose options no longer carry a
73
+ Click type, and the check that every spec model is described skips the generic class pydantic
74
+ 2.14 adds to the spec's module.
75
+
5
76
  ## 0.7.1 (2026-10-14)
6
77
 
7
78
  Start here, a first page in the guide for someone new to Logogram or to interpretability, and two
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: logogram
3
- Version: 0.7.1
3
+ Version: 0.7.2
4
4
  Summary: A local-first workbench for causal experiments inside language models.
5
5
  Project-URL: Homepage, https://github.com/Jeevash23/logogram
6
6
  Project-URL: Source, https://github.com/Jeevash23/logogram
@@ -36,6 +36,11 @@ Requires-Dist: uvicorn>=0.30
36
36
  Requires-Dist: websockets>=12
37
37
  Description-Content-Type: text/markdown
38
38
 
39
+ <picture>
40
+ <source media="(prefers-color-scheme: dark)" srcset=".github/banner-dark.jpg">
41
+ <img src=".github/banner-light.jpg" alt="Logogram, a local workbench for causal experiments inside language models" width="100%">
42
+ </picture>
43
+
39
44
  # Logogram
40
45
 
41
46
  A local workbench for mechanistic interpretability: causal experiments inside language models,
@@ -50,19 +55,31 @@ watching what changes. Interpretability works the same way: replace one activati
50
55
  from a different input, remove a direction, add a feature, and measure what happens. Logogram
51
56
  makes those experiments visual, fast and rigorous, and asks the questions interpretability asks:
52
57
 
53
- * **Where is it computed?** Activation patching and ablation (zero, mean, resample, scaled or
54
- along a direction), attribution patching with integrated gradients, and direct logit
55
- attribution, over residual streams, heads, queries, keys, values, neurons and SAE features.
56
- * **How does it flow?** Path patching, edge attribution (EAP and EAP-IG) with its faithfulness
57
- curve, and ACDC, which finds a circuit by removing edges one at a time.
58
- * **What does a site represent?** Linear probes against shuffled-label controls, distributed
58
+ * **Where is it computed?** Which heads, MLPs or positions an answer depends on. Activation
59
+ patching and ablation (zero, mean, resample, scaled or along a direction), attribution patching
60
+ with integrated gradients, and direct logit attribution, over residual streams, heads, queries,
61
+ keys, values, neurons and SAE features.
62
+ * **How does it flow?** Which paths carry the answer, and the circuit they form. Path patching,
63
+ edge attribution (EAP and EAP-IG) with its faithfulness curve, and ACDC, which finds a circuit
64
+ by removing edges one at a time.
65
+ * **What does a site represent?** What a part of the model encodes, and whether the model uses
66
+ it. Linear probes against shuffled-label controls, distributed
59
67
  alignment search, and directions saved in the project and tested by patching along them,
60
68
  removing them, steering along them and reading them out; where a neuron, feature or direction
61
69
  is most active in your own texts; the principal components of activations over prompts or texts;
62
70
  SAEs, published or trained in the project; the logit lens, and a tuned lens trained in the
63
71
  project.
64
- * **What does adding a direction do?** Steering along a mean difference, an SAE feature or a saved
65
- direction, on held-out prompts, against a random direction.
72
+ * **What does adding a direction do?** How the answer moves when the model is pushed along a
73
+ direction. Steering along a mean difference, an SAE feature or a saved direction, on held-out
74
+ prompts, against a random direction.
75
+
76
+ The simplest of these experiments, on the bundled IOI example, copies one attention head's output
77
+ from a prompt where GPT-2 small answers *Mary* into one where it answers *John*, and measures how
78
+ far the answer moves back:
79
+
80
+ ![Activation patching on the IOI example: the clean prompt prefers Mary and the corrupt prompt
81
+ John; with head 9.9's output copied from the clean run into the corrupt run, the answer moves back
82
+ toward Mary by about a sixth of the gap, which is head 9.9's effect](docs/images/activation-patching.svg)
66
83
 
67
84
  Load GPT-2 (or Llama, Qwen, Gemma, Pythia and others, on a CPU, a GPU or Apple's MPS), set up
68
85
  prompt pairs from a task or your own file, run a sweep, watch the results paint onto a map of the
@@ -151,10 +168,17 @@ report, figures and CSV a finished run exports. **Help**, in the top bar, opens
151
168
  walkthrough of the IOI example at its own controls, the keyboard shortcuts, the documentation on
152
169
  GitHub, a problem report to paste into an issue (nothing is sent: you copy it), the system check,
153
170
  and About. The guide starts with the basics: **Start here**, for someone new to Logogram or to
154
- interpretability, follows the IOI example from its two prompts to what patching finds, names the
155
- parts of a model, and lays out a first hour. The first screens offer it under the tagline,
171
+ interpretability, says what Logogram can find out, then follows the IOI example in figures that
172
+ move: its two prompts and the logit difference each gives, a head's output copied from one run
173
+ into the other, the parts of a model, and what the example finds, head by head; and it lays out a
174
+ first hour. The guide's other pages draw the workbench part by part, how to read the map, how a
175
+ run's results write its logogram, and how an interval is built from each prompt's effect. Each
176
+ figure plays through its stages while it is in view, can be paused or stepped through, and stays
177
+ still when the system asks for less motion. The first screens offer Start here under the tagline,
156
178
  **Learn the basics** in the command palette opens it from anywhere, and it is part of the app, so
157
- it reads the same without a network.
179
+ it reads the same without a network. The walkthrough notices what you do: it says when the
180
+ baseline is checked or a cell is chosen, and when you press **Run** it follows the run to its
181
+ results.
158
182
 
159
183
  ## Documentation
160
184
 
@@ -1,3 +1,8 @@
1
+ <picture>
2
+ <source media="(prefers-color-scheme: dark)" srcset=".github/banner-dark.jpg">
3
+ <img src=".github/banner-light.jpg" alt="Logogram, a local workbench for causal experiments inside language models" width="100%">
4
+ </picture>
5
+
1
6
  # Logogram
2
7
 
3
8
  A local workbench for mechanistic interpretability: causal experiments inside language models,
@@ -12,19 +17,31 @@ watching what changes. Interpretability works the same way: replace one activati
12
17
  from a different input, remove a direction, add a feature, and measure what happens. Logogram
13
18
  makes those experiments visual, fast and rigorous, and asks the questions interpretability asks:
14
19
 
15
- * **Where is it computed?** Activation patching and ablation (zero, mean, resample, scaled or
16
- along a direction), attribution patching with integrated gradients, and direct logit
17
- attribution, over residual streams, heads, queries, keys, values, neurons and SAE features.
18
- * **How does it flow?** Path patching, edge attribution (EAP and EAP-IG) with its faithfulness
19
- curve, and ACDC, which finds a circuit by removing edges one at a time.
20
- * **What does a site represent?** Linear probes against shuffled-label controls, distributed
20
+ * **Where is it computed?** Which heads, MLPs or positions an answer depends on. Activation
21
+ patching and ablation (zero, mean, resample, scaled or along a direction), attribution patching
22
+ with integrated gradients, and direct logit attribution, over residual streams, heads, queries,
23
+ keys, values, neurons and SAE features.
24
+ * **How does it flow?** Which paths carry the answer, and the circuit they form. Path patching,
25
+ edge attribution (EAP and EAP-IG) with its faithfulness curve, and ACDC, which finds a circuit
26
+ by removing edges one at a time.
27
+ * **What does a site represent?** What a part of the model encodes, and whether the model uses
28
+ it. Linear probes against shuffled-label controls, distributed
21
29
  alignment search, and directions saved in the project and tested by patching along them,
22
30
  removing them, steering along them and reading them out; where a neuron, feature or direction
23
31
  is most active in your own texts; the principal components of activations over prompts or texts;
24
32
  SAEs, published or trained in the project; the logit lens, and a tuned lens trained in the
25
33
  project.
26
- * **What does adding a direction do?** Steering along a mean difference, an SAE feature or a saved
27
- direction, on held-out prompts, against a random direction.
34
+ * **What does adding a direction do?** How the answer moves when the model is pushed along a
35
+ direction. Steering along a mean difference, an SAE feature or a saved direction, on held-out
36
+ prompts, against a random direction.
37
+
38
+ The simplest of these experiments, on the bundled IOI example, copies one attention head's output
39
+ from a prompt where GPT-2 small answers *Mary* into one where it answers *John*, and measures how
40
+ far the answer moves back:
41
+
42
+ ![Activation patching on the IOI example: the clean prompt prefers Mary and the corrupt prompt
43
+ John; with head 9.9's output copied from the clean run into the corrupt run, the answer moves back
44
+ toward Mary by about a sixth of the gap, which is head 9.9's effect](docs/images/activation-patching.svg)
28
45
 
29
46
  Load GPT-2 (or Llama, Qwen, Gemma, Pythia and others, on a CPU, a GPU or Apple's MPS), set up
30
47
  prompt pairs from a task or your own file, run a sweep, watch the results paint onto a map of the
@@ -113,10 +130,17 @@ report, figures and CSV a finished run exports. **Help**, in the top bar, opens
113
130
  walkthrough of the IOI example at its own controls, the keyboard shortcuts, the documentation on
114
131
  GitHub, a problem report to paste into an issue (nothing is sent: you copy it), the system check,
115
132
  and About. The guide starts with the basics: **Start here**, for someone new to Logogram or to
116
- interpretability, follows the IOI example from its two prompts to what patching finds, names the
117
- parts of a model, and lays out a first hour. The first screens offer it under the tagline,
133
+ interpretability, says what Logogram can find out, then follows the IOI example in figures that
134
+ move: its two prompts and the logit difference each gives, a head's output copied from one run
135
+ into the other, the parts of a model, and what the example finds, head by head; and it lays out a
136
+ first hour. The guide's other pages draw the workbench part by part, how to read the map, how a
137
+ run's results write its logogram, and how an interval is built from each prompt's effect. Each
138
+ figure plays through its stages while it is in view, can be paused or stepped through, and stays
139
+ still when the system asks for less motion. The first screens offer Start here under the tagline,
118
140
  **Learn the basics** in the command palette opens it from anywhere, and it is part of the app, so
119
- it reads the same without a network.
141
+ it reads the same without a network. The walkthrough notices what you do: it says when the
142
+ baseline is checked or a cell is chosen, and when you press **Run** it follows the run to its
143
+ results.
120
144
 
121
145
  ## Documentation
122
146
 
@@ -12,6 +12,19 @@ the app and the methods, from a first run to the exact definition of every numbe
12
12
  * [The workbench](workbench.md): what each workspace and view is for.
13
13
  * [Models](models.md): which models load, memory, precision, weight processing, devices and GPUs.
14
14
 
15
+ ## What you can find out
16
+
17
+ Logogram's methods answer four kinds of question. [Choosing a method](concepts/choosing-a-method.md)
18
+ says which methods answer each, what they cost and where they mislead; the app's guide opens on
19
+ the same four, and walks through the first in moving figures.
20
+
21
+ | Question | What it finds out | Begin with |
22
+ |---|---|---|
23
+ | [Where is it computed?](concepts/choosing-a-method.md#where-is-it-computed) | Which heads, MLPs or positions an answer depends on. | [Replicate IOI on GPT-2](guides/replicate-ioi.md) |
24
+ | [How does it flow?](concepts/choosing-a-method.md#how-does-it-flow) | Which paths carry the answer, and the circuit they form. | [Find a circuit with ACDC](concepts/acdc.md) |
25
+ | [What does a site represent?](concepts/choosing-a-method.md#what-does-a-site-represent) | What a part of the model encodes, and whether the model uses it. | [Find a direction and test it](guides/find-and-test-a-direction.md) |
26
+ | [What does adding a direction do?](concepts/choosing-a-method.md#what-does-adding-a-direction-do) | How the answer moves when the model is pushed along a direction. | [Steering](concepts/steering.md) |
27
+
15
28
  ## Concepts
16
29
 
17
30
  What Logogram computes, exactly, and when to use each method. Each page cites the papers the
@@ -55,7 +55,7 @@ dev = [
55
55
  "pytest>=8",
56
56
  "pytest-cov>=7",
57
57
  "httpx2>=2.13",
58
- "ruff==0.16.10",
58
+ "ruff==0.17.4",
59
59
  ]
60
60
 
61
61
  [tool.hatch.version]
@@ -22,6 +22,7 @@ nothing in them depends on where or when they were made.
22
22
  from __future__ import annotations
23
23
 
24
24
  import dataclasses
25
+ import enum
25
26
  import inspect
26
27
  import json
27
28
  import re
@@ -585,6 +586,8 @@ def training_page() -> str:
585
586
 
586
587
  def _value_kind(param: Any) -> str:
587
588
  """What an option or argument takes, in words: never a library's own name for it."""
589
+ if not hasattr(param, "type"):
590
+ return _typed_kind(param)
588
591
  t = param.type
589
592
  name = type(t).__name__
590
593
  if "Choice" in name:
@@ -612,6 +615,40 @@ def _value_kind(param: Any) -> str:
612
615
  return kind
613
616
 
614
617
 
618
+ def _typed_kind(param: Any) -> str:
619
+ """The same, from Typer 0.29 and later, whose parameters keep their annotation and settings
620
+ rather than a Click type."""
621
+ annotation = param.type_descriptor.annotation
622
+ info = param.type_descriptor.parameter_info
623
+ while typing.get_origin(annotation) in (list, tuple, typing.Union, types.UnionType):
624
+ annotation = next(a for a in typing.get_args(annotation) if a is not type(None))
625
+ if typing.get_origin(annotation) is typing.Literal:
626
+ return either([f"`{c}`" for c in typing.get_args(annotation)])
627
+ if isinstance(annotation, type) and issubclass(annotation, enum.Enum):
628
+ return either([f"`{c.value}`" for c in annotation])
629
+ if annotation is bool:
630
+ return ""
631
+ if annotation is int:
632
+ kind = "integer"
633
+ elif annotation is float:
634
+ kind = "number"
635
+ elif isinstance(annotation, type) and issubclass(annotation, Path):
636
+ if getattr(info, "dir_okay", True) is False:
637
+ kind = "file"
638
+ elif getattr(info, "file_okay", True) is False:
639
+ kind = "folder"
640
+ else:
641
+ kind = "path"
642
+ else:
643
+ kind = "text"
644
+ low, high = getattr(param, "min", None), getattr(param, "max", None)
645
+ if low is not None and high is not None:
646
+ kind += f", {number(low)} to {number(high)}"
647
+ elif low is not None:
648
+ kind += f", {number(low)} or more"
649
+ return kind
650
+
651
+
615
652
  def _default(param: Any) -> str:
616
653
  if param.required:
617
654
  return "required"
@@ -7,10 +7,10 @@ clash with Logogram's modules: ``load_spec``, not ``spec``.)
7
7
 
8
8
  from typing import Any
9
9
 
10
- __version__ = "0.7.1"
10
+ __version__ = "0.7.2"
11
11
  # The release date of this version: after a few months the app suggests looking for a newer one
12
12
  # (no network needed). Set it with every release.
13
- __released__ = "2026-10-14"
13
+ __released__ = "2026-11-26"
14
14
 
15
15
  _API = (
16
16
  "Run",
@@ -629,6 +629,51 @@ def unit_sites(checks: ModelChecks) -> tuple[tuple[str, ...], dict[str, str]]:
629
629
  return tuple(kinds), notes
630
630
 
631
631
 
632
+ _CONTINUE_TAG = "CONTINUE_FINAL_MESSAGE_TAG "
633
+
634
+
635
+ def _render_compiled(
636
+ compiled: Any,
637
+ template: str,
638
+ messages: list[dict[str, str]],
639
+ *,
640
+ add_generation_prompt: bool,
641
+ continue_final_message: bool,
642
+ context: dict[str, Any],
643
+ ) -> str:
644
+ """A chat template rendered as transformers' apply_chat_template renders it (without
645
+ tokenizing), with ``context`` passed to the template as it is."""
646
+ chat = [dict(m) for m in messages]
647
+ final = ""
648
+ if continue_final_message:
649
+ # As apply_chat_template does: mark the end of the reply, render, cut at the mark.
650
+ final = chat[-1]["content"]
651
+ if "content" not in template:
652
+ raise ValueError(
653
+ 'continue_final_message is set to "content" but this is not an accepted field in '
654
+ "the chat_template"
655
+ )
656
+ chat[-1]["content"] = final + _CONTINUE_TAG
657
+ text = compiled.render(
658
+ messages=chat,
659
+ tools=None,
660
+ documents=None,
661
+ add_generation_prompt=add_generation_prompt,
662
+ **context,
663
+ )
664
+ if continue_final_message:
665
+ if final.strip() not in text or _CONTINUE_TAG.strip() not in text:
666
+ raise ValueError(
667
+ "continue_final_message is set but the final message does not appear in the chat "
668
+ "after applying the chat template"
669
+ )
670
+ at = text.rindex(_CONTINUE_TAG.strip())
671
+ text = (
672
+ text[:at] if text[at : at + len(_CONTINUE_TAG)] == _CONTINUE_TAG else text[:at].rstrip()
673
+ )
674
+ return str(text)
675
+
676
+
632
677
  class TransformerLensBackend(ModelBackend):
633
678
  def __init__(self, bridge: Any, info: ModelInfo) -> None:
634
679
  super().__init__()
@@ -855,15 +900,32 @@ class TransformerLensBackend(ModelBackend):
855
900
  # No clock: a template that writes today's date uses its own fallback, or can't run, so
856
901
  # the same spec reads the same text on any day (see logogram.chat).
857
902
  context["strftime_now"] = jinja2.Undefined(name="strftime_now")
858
- text = self.tokenizer.apply_chat_template(
903
+ try:
904
+ from transformers.utils.chat_template_utils import _compile_jinja_template
905
+ except ImportError: # transformers before the compiled template had a function of its own
906
+ _compile_jinja_template = None
907
+ if _compile_jinja_template is None:
908
+ text = self.tokenizer.apply_chat_template(
909
+ messages,
910
+ chat_template=self._chat_template,
911
+ tokenize=False,
912
+ add_generation_prompt=add_generation_prompt,
913
+ continue_final_message=continue_final_message,
914
+ **context,
915
+ )
916
+ return str(text)
917
+ # transformers 5.22 and later rebuild everything passed to a template out of plain JSON
918
+ # types, which turns an undefined value into an error, so the template is rendered here:
919
+ # compiled by transformers (the same sandbox and settings as apply_chat_template), with
920
+ # the reply continued the way apply_chat_template continues it.
921
+ return _render_compiled(
922
+ _compile_jinja_template(self._chat_template),
923
+ self._chat_template,
859
924
  messages,
860
- chat_template=self._chat_template,
861
- tokenize=False,
862
925
  add_generation_prompt=add_generation_prompt,
863
926
  continue_final_message=continue_final_message,
864
- **context,
927
+ context=context,
865
928
  )
866
- return str(text)
867
929
 
868
930
  def single_token_id(self, text: str) -> int | None:
869
931
  ids = self.tokenizer(text, add_special_tokens=False)["input_ids"]
@@ -0,0 +1 @@
1
+ ._frame_4o3mh_4{fill:var(--surface);stroke:var(--line)}._ink_4o3mh_9{fill:var(--text)}._text_4o3mh_14{fill:var(--line)}._pill_4o3mh_18{fill:none;stroke:var(--line)}._tool_4o3mh_23,._chip_4o3mh_28{fill:none;stroke:var(--control-line)}._token_4o3mh_33{fill:none;stroke:var(--line)}._marked_4o3mh_38{fill:none;stroke:var(--text);stroke-width:1.4px}._focus_4o3mh_46{fill:none;stroke:var(--text);stroke-width:2px;animation:_focus_4o3mh_46 .26s var(--ease) both}@keyframes _focus_4o3mh_46{0%{opacity:0}}._strong_4o3mh_59{fill:var(--text);font-weight:700}._card_4o3mh_64{fill:var(--raised);stroke:var(--line)}._big_4o3mh_69{font-size:28px;font-weight:680;font-stretch:var(--display-stretch);font-variant-numeric:tabular-nums}._interval_4o3mh_76{stroke:var(--text);stroke-width:4px;stroke-linecap:round;opacity:.85}._mean_4o3mh_83{stroke:var(--text);stroke-width:1.5px}._draw_4o3mh_89{stroke:var(--text);stroke-width:1px;opacity:.22}._glyph_4o3mh_96{width:240px;height:240px;color:var(--text);place-items:center;margin:0 auto;display:grid;position:relative}._dial_4o3mh_106{position:absolute;inset:0}
@@ -0,0 +1 @@
1
+ import{_ as e,b as t,g as n,h as r,i,m as a,o,p as s,v as c,y as l}from"./index-DreV1655.js";import{a as u,i as d,o as f,r as p}from"./PatchingFigures-BR5oqtfl.js";var m=t(l(),1),h={frame:`_frame_4o3mh_4`,ink:`_ink_4o3mh_9`,text:`_text_4o3mh_14`,pill:`_pill_4o3mh_18`,tool:`_tool_4o3mh_23`,chip:`_chip_4o3mh_28`,token:`_token_4o3mh_33`,marked:`_marked_4o3mh_38`,focus:`_focus_4o3mh_46`,strong:`_strong_4o3mh_59`,card:`_card_4o3mh_64`,big:`_big_4o3mh_69`,interval:`_interval_4o3mh_76`,mean:`_mean_4o3mh_83`,draw:`_draw_4o3mh_89`,glyph:`_glyph_4o3mh_96`,dial:`_dial_4o3mh_106`},g=a(),_=[{x:132,y:5,w:136,h:18},{x:6,y:29,w:150,h:14},{x:196,y:29,w:150,h:14},{x:2,y:47,w:292,h:160},{x:298,y:47,w:100,h:197},{x:2,y:211,w:292,h:33},{x:300,y:5,w:94,h:18}];function v(){let{label:t,stages:r}=o.workbench,i=c(e=>e.theme),a=n(1,i);return(0,g.jsx)(d,{label:t,stages:r,layout:`list`,still:-1,ms:2600,children:t=>{let n=e=>t>=0&&t!==e?``:void 0;return(0,g.jsxs)(`svg`,{viewBox:`0 0 400 262`,width:400,height:262,children:[(0,g.jsx)(`rect`,{className:h.frame,x:.5,y:.5,width:399,height:261,rx:8}),(0,g.jsx)(`line`,{className:u.hairline,x1:0,x2:400,y1:26,y2:26}),(0,g.jsx)(`circle`,{className:h.ink,cx:14,cy:13,r:5}),(0,g.jsx)(`rect`,{className:h.text,x:26,y:11,width:44,height:4,rx:2}),(0,g.jsxs)(`g`,{className:u.dim,"data-off":n(0),children:[(0,g.jsx)(`rect`,{x:136,y:7,width:40,height:14,rx:7,fill:`var(--explore)`}),(0,g.jsx)(`rect`,{className:h.pill,x:180,y:7,width:44,height:14,rx:7}),(0,g.jsx)(`rect`,{className:h.pill,x:228,y:7,width:38,height:14,rx:7})]}),(0,g.jsxs)(`g`,{className:u.dim,"data-off":n(6),children:[[304,324,344].map(e=>(0,g.jsx)(`rect`,{className:h.text,x:e,y:11,width:14,height:4,rx:2},e)),(0,g.jsx)(`circle`,{className:h.tool,cx:372,cy:13,r:4.5}),(0,g.jsx)(`circle`,{className:h.tool,cx:388,cy:13,r:4.5})]}),(0,g.jsx)(`line`,{className:u.hairline,x1:0,x2:400,y1:45,y2:45}),(0,g.jsxs)(`g`,{className:u.dim,"data-off":n(1),children:[[10,40,70,100,126].map((e,t)=>(0,g.jsx)(`rect`,{className:t===0?h.ink:h.text,x:e,y:34,width:22,height:4,rx:2},e)),(0,g.jsx)(`rect`,{x:10,y:42,width:22,height:2,fill:`var(--explore)`})]}),(0,g.jsxs)(`g`,{className:u.dim,"data-off":n(2),children:[(0,g.jsx)(`rect`,{className:h.chip,x:200,y:31,width:70,height:11,rx:5.5}),(0,g.jsx)(`circle`,{cx:208,cy:36.5,r:2.5,fill:`var(--live)`}),(0,g.jsx)(`rect`,{className:h.chip,x:276,y:31,width:66,height:11,rx:5.5})]}),(0,g.jsxs)(`g`,{className:u.dim,"data-off":n(3),children:[Array.from({length:6},(e,t)=>Array.from({length:10},(e,n)=>{let r=y[(t*10+n)%y.length];return(0,g.jsx)(`rect`,{x:46+n*19,y:62+t*19,width:16,height:16,rx:2,fill:a(r)},`${t}.${n}`)})),(0,g.jsx)(`rect`,{x:46,y:184,width:186,height:5,rx:2,fill:`url(#workbench-scale)`})]}),(0,g.jsx)(`line`,{className:u.hairline,x1:296,x2:296,y1:45,y2:246}),(0,g.jsxs)(`g`,{className:u.dim,"data-off":n(4),children:[(0,g.jsx)(`rect`,{className:h.ink,x:306,y:58,width:34,height:6,rx:2}),(0,g.jsx)(`rect`,{className:h.text,x:306,y:72,width:70,height:4,rx:2}),(0,g.jsx)(`rect`,{className:h.ink,x:306,y:90,width:46,height:10,rx:2}),[110,120,130,140].map(e=>(0,g.jsx)(`rect`,{className:h.text,x:306,y:e,width:78,height:3,rx:1.5},e)),[.1,.25,.3,.35,.42,.5,.55,.7].map((t,n)=>(0,g.jsx)(`circle`,{cx:312+t*74,cy:168+n%3*4,r:2.2,fill:e(a,t)},n))]}),(0,g.jsx)(`line`,{className:u.hairline,x1:0,x2:296,y1:209,y2:209}),(0,g.jsx)(`g`,{className:u.dim,"data-off":n(5),children:[0,1].map(e=>[12,34,54,78,100,124,146,170,190,214,238].map((t,n)=>(0,g.jsx)(`rect`,{className:n===7?h.marked:h.token,x:t,y:215+e*12,width:n%3==0?18:20,height:9,rx:2},`${e}.${t}`)))}),(0,g.jsx)(`line`,{className:u.hairline,x1:0,x2:400,y1:248,y2:248}),(0,g.jsx)(`rect`,{className:h.text,x:8,y:253,width:24,height:4,rx:2}),(0,g.jsx)(`defs`,{children:(0,g.jsx)(`linearGradient`,{id:`workbench-scale`,children:[-1,0,1].map(e=>(0,g.jsx)(`stop`,{offset:`${(e+1)*50}%`,stopColor:a(e)},e))})}),t>=0&&(0,g.jsx)(`rect`,{className:h.focus,x:_[t].x,y:_[t].y,width:_[t].w,height:_[t].h,rx:5},t)]})}})}var y=[0,.05,-.04,.1,0,.02,.62,-.08,0,.04,.03,0,-.55,.06,.12,0,.02,.35,-.03,0,.08,-.12,0,.9,.04,0,-.06,.02,.18,0,-.3,.05,0,.03,.46,-.02,0,.07,0,-.15],b=[`res`,`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`attn`,`mlp`],x={left:52,top:34,pitch:22,cell:18,rows:6},S={row:3,column:8};function C(){let{label:t,stages:r}=o.map,i=c(e=>e.theme),a=n(1,i),s=e=>x.left+e*x.pitch+(e>=1?4:0)+(e>=9?8:0)+(e>=10?8:0),l=e=>x.top+e*x.pitch,f=(e,t)=>y[(e*11+t*3)%y.length],m=f(S.row,S.column),_=e=>364+172*((e+.2)/1.2);return(0,g.jsx)(d,{label:t,stages:r,ms:[2600,3e3,3e3,3600],children:(t,n)=>(0,g.jsxs)(`svg`,{viewBox:`0 0 560 196`,width:560,height:196,children:[b.map((e,n)=>(0,g.jsx)(`text`,{className:`${u.tick} ${t===1?h.strong:``}`,x:s(n)+x.cell/2,y:x.top-8,textAnchor:`middle`,children:e},e)),Array.from({length:x.rows},(e,r)=>(0,g.jsxs)(`g`,{children:[(0,g.jsx)(`text`,{className:`${u.tick} ${t===0?h.strong:``}`,x:x.left-10,y:l(r)+13,textAnchor:`end`,children:r}),b.map((e,i)=>(0,g.jsx)(`rect`,{className:t>=2?u.enter:void 0,style:p({"--delay":`${t===2?r*110:0}ms`}),x:s(i),y:l(r),width:x.cell,height:x.cell,rx:2,fill:t>=2?a(f(r,i)):`var(--line)`},`${i}-${t>=2?n:`plain`}`))]},r)),(0,g.jsx)(`text`,{className:u.note,x:x.left-10,y:x.top-8,textAnchor:`end`,children:`layer`}),t===0&&(0,g.jsx)(`rect`,{className:`${u.ring} ${u.enter}`,x:x.left-4,y:l(2)-4,width:s(10)+x.cell-x.left+8,height:x.cell+8,rx:5},`row-${n}`),t===1&&[0,5,9,10].map((e,t)=>(0,g.jsx)(`rect`,{className:`${u.ring} ${u.enter}`,style:p({"--delay":`${t*350}ms`}),x:s(e)-3,y:l(1)-3,width:x.cell+6,height:x.cell+6,rx:4},`kind-${e}-${n}`)),t>=2&&(0,g.jsxs)(`g`,{className:u.enter,style:p({"--delay":t===2?`700ms`:`0ms`}),children:[(0,g.jsx)(`defs`,{children:(0,g.jsx)(`linearGradient`,{id:`map-scale`,children:[-1,-.5,0,.5,1].map(e=>(0,g.jsx)(`stop`,{offset:`${(e+1)*50}%`,stopColor:a(e)},e))})}),(0,g.jsx)(`rect`,{x:x.left,y:l(x.rows)+6,width:s(10)+x.cell-x.left,height:6,rx:2,fill:`url(#map-scale)`}),(0,g.jsx)(`text`,{className:u.tick,x:x.left,y:l(x.rows)+26,children:`−1`}),(0,g.jsx)(`text`,{className:u.tick,x:(x.left+s(10)+x.cell)/2,y:l(x.rows)+26,textAnchor:`middle`,children:`0`}),(0,g.jsx)(`text`,{className:u.tick,x:s(10)+x.cell,y:l(x.rows)+26,textAnchor:`end`,children:`+1`})]},`scale-${n}`),t>=3&&(0,g.jsxs)(`g`,{children:[(0,g.jsx)(`circle`,{className:`${u.ring} ${u.enter}`,cx:s(S.column)+x.cell/2,cy:l(S.row)+x.cell/2,r:14}),(0,g.jsxs)(`g`,{className:u.enter,style:p({"--delay":`300ms`}),children:[(0,g.jsx)(`rect`,{className:h.card,x:350,y:14,width:200,height:168,rx:8}),(0,g.jsxs)(`text`,{className:u.label,x:364,y:38,children:[`L`,S.row,` H`,S.column-1]}),(0,g.jsxs)(`text`,{className:u.note,x:364,y:54,children:[`Attention head `,S.column-1,` in layer `,S.row]}),(0,g.jsx)(`rect`,{x:364,y:68,width:14,height:14,rx:2,fill:a(m)}),(0,g.jsx)(`text`,{className:h.big,x:384,y:84,children:w(m)}),(0,g.jsx)(`text`,{className:u.note,x:364,y:104,children:`mean effect, with its 95% interval`}),(0,g.jsx)(`line`,{className:u.axis,x1:364,x2:536,y1:140,y2:140}),(0,g.jsx)(`line`,{className:h.interval,x1:_(m-.11),x2:_(m+.12),y1:140,y2:140}),[-.3,-.18,-.1,-.06,-.02,.01,.04,.08,.13,.2,.31].map((t,n)=>(0,g.jsx)(`circle`,{cx:_(m+t),cy:156+n%2*6,r:2.4,fill:e(a,m+t)},n)),(0,g.jsx)(`text`,{className:u.tick,x:364,y:176,children:`each prompt's effect`})]})]},`chosen-${n}`)]})})}function w(e){return`${e>=0?`+`:`−`}${Math.abs(e).toFixed(2)}`}function T(){let e=Array(12).fill(0);for(let t of f)Math.abs(t.effect)>Math.abs(e[t.layer])&&(e[t.layer]=t.effect);return e}var E=[Array(12).fill(0),Array.from({length:12},(e,t)=>t===2?.8:0),Array.from({length:12},(e,t)=>t===8?-.8:0),T()];function D(e){let t=i(),[n,r]=(0,m.useState)(e),a=(0,m.useRef)(e),o=(0,m.useRef)(e);return(0,m.useEffect)(()=>{if(t){o.current=e,r(e);return}a.current=o.current;let n=0,i=performance.now(),s=t=>{let c=Math.min(1,(t-i)/700),l=1-(1-c)**3,u=e.map((e,t)=>a.current[t]+(e-a.current[t])*l);o.current=u,r(u),c<1&&(n=requestAnimationFrame(s))};return n=requestAnimationFrame(s),()=>cancelAnimationFrame(n)},[e,t]),n}function O(){let{label:e,stages:t}=o.logogram;return(0,g.jsx)(d,{label:e,stages:t,ms:[2600,3e3,3e3,4e3],children:e=>(0,g.jsx)(k,{profile:E[e]??E[E.length-1]})})}function k({profile:e}){let t=D(e);return(0,g.jsxs)(`div`,{className:h.glyph,style:{flex:`none`},children:[(0,g.jsx)(s,{seed:`guide`,profile:t,size:176,detail:.6,haze:!1}),(0,g.jsxs)(`svg`,{className:h.dial,viewBox:`0 0 240 240`,width:240,height:240,children:[Array.from({length:12},(e,t)=>{let n=-Math.PI/2+Math.PI*2*(t+.5)/12,[r,i]=[104,110];return(0,g.jsxs)(`g`,{children:[(0,g.jsx)(`line`,{className:u.axis,x1:120+r*Math.cos(n),y1:120+r*Math.sin(n),x2:120+i*Math.cos(n),y2:120+i*Math.sin(n)}),t%3==0&&(0,g.jsx)(`text`,{className:u.tick,x:120+118*Math.cos(n),y:120+118*Math.sin(n)+4,textAnchor:`middle`,children:t})]},t)}),(0,g.jsx)(`path`,{className:u.arrow,d:`M 150 14 A 108 108 0 0 1 196 36`}),(0,g.jsx)(`path`,{className:u.arrow,d:`M 190 30 L 196 36 L 188 38`})]})]})}function A(){let e=r(7),t=()=>{let t=Math.max(1e-9,e());return Math.sqrt(-2*Math.log(t))*Math.cos(2*Math.PI*e())},n=Array.from({length:24},()=>.32+.22*t()),i=n.reduce((e,t)=>e+t,0)/n.length,a=Array.from({length:160},()=>{let t=0;for(let r=0;r<n.length;r++)t+=n[Math.floor(e()*n.length)];return t/n.length}),o=[...a].sort((e,t)=>e-t);return{effects:n,means:a,mean:i,low:o[Math.floor(.025*o.length)],high:o[Math.ceil(.975*o.length)-1]}}function j(){let{label:t,stages:r}=o.interval,i=c(e=>e.theme),a=n(1,i),s=(0,m.useMemo)(A,[]),l=e=>40+(e+.3)/1.3*480;return(0,g.jsx)(d,{label:t,stages:r,ms:[2600,2400,3600,4e3],children:(t,n)=>(0,g.jsxs)(`svg`,{viewBox:`0 0 560 176`,width:560,height:176,children:[(0,g.jsx)(`line`,{className:u.axis,x1:l(-.3),x2:l(1),y1:70,y2:70}),[-.2,0,.2,.4,.6,.8,1].map(e=>(0,g.jsx)(`text`,{className:u.tick,x:l(e),y:88,textAnchor:`middle`,children:e===0?`0`:e.toFixed(1).replace(`-`,`−`)},e)),(0,g.jsx)(`text`,{className:u.note,x:l(-.3),y:14,children:`effect, one dot per prompt`}),s.effects.map((r,i)=>(0,g.jsx)(`circle`,{className:u.enter,style:p({"--delay":`${t===0?i*60:0}ms`}),cx:l(r),cy:46+i%4*6,r:3.6,fill:e(a,r)},`${i}-${n}`)),t>=1&&(0,g.jsxs)(`g`,{className:u.enter,children:[(0,g.jsx)(`line`,{className:h.mean,x1:l(s.mean),x2:l(s.mean),y1:28,y2:76}),(0,g.jsxs)(`text`,{className:u.label,x:l(s.mean)+6,y:30,children:[`mean `,s.mean.toFixed(2)]})]},`mean-${n}`),t>=2&&(0,g.jsxs)(`g`,{children:[(0,g.jsx)(`text`,{className:u.note,x:l(-.3),y:112,children:`the mean of each draw`}),s.means.map((e,n)=>(0,g.jsx)(`line`,{className:`${h.draw} ${u.enter}`,style:p({"--delay":`${t===2?n*16:0}ms`}),x1:l(e),x2:l(e),y1:122,y2:142},n))]},`means-${n}`),t>=3&&(0,g.jsxs)(`g`,{className:u.enter,children:[(0,g.jsx)(`path`,{className:u.arrow,d:`M ${l(s.low)} 148 V 154 H ${l(s.high)} V 148`,strokeWidth:1.6}),(0,g.jsxs)(`text`,{className:u.label,x:(l(s.low)+l(s.high))/2,y:170,textAnchor:`middle`,children:[`95% interval `,s.low.toFixed(2),` to `,s.high.toFixed(2)]}),(0,g.jsx)(`line`,{className:h.interval,x1:l(s.low),x2:l(s.high),y1:70,y2:70})]},`interval-${n}`)]})})}export{j as IntervalFigure,O as LogogramFigure,C as MapFigure,v as WorkbenchFigure};
@@ -0,0 +1 @@
1
+ import{b as e,d as t,f as n,g as r,i,m as a,u as o,v as s,y as c}from"./index-DreV1655.js";var l=e(c(),1),u={clean:[`When`,`Mary`,`and`,`John`,`went`,`to`,`the`,`store`,`,`,`John`,`gave`,`a`,`drink`,`to`],corrupt:[`When`,`Mary`,`and`,`John`,`went`,`to`,`the`,`store`,`,`,`Mary`,`gave`,`a`,`drink`,`to`],changed:9,answer:`Mary`,distractor:`John`},d=[{layer:5,head:5,effect:.33,role:`induction`},{layer:8,head:6,effect:.3,role:`s-inhibition`},{layer:8,head:10,effect:.25,role:`s-inhibition`},{layer:7,head:9,effect:.21,role:`s-inhibition`},{layer:9,head:9,effect:.17,role:`name-mover`},{layer:10,head:0,effect:.11,role:`name-mover`},{layer:10,head:7,effect:-.45,role:`negative-name-mover`},{layer:11,head:10,effect:-.21,role:`negative-name-mover`}],f={layer:9,head:9};function p(){return d.find(e=>e.layer===f.layer&&e.head===f.head).effect}var m={clean:.74,corrupt:-.6};function h(e){return m.corrupt+e*(m.clean-m.corrupt)}var g={figure:`_figure_1vu3n_5`,drawing:`_drawing_1vu3n_12`,line:`_line_1vu3n_37`,controls:`_controls_1vu3n_44`,play:`_play_1vu3n_50`,stage:`_stage_1vu3n_68`,item:`_item_1vu3n_69`,stages:`_stages_1vu3n_74`,stageNumber:`_stageNumber_1vu3n_105`,fill:`_fill_1vu3n_1`,caption:`_caption_1vu3n_149`,stageText:`_stageText_1vu3n_156`,split:`_split_1vu3n_161`,side:`_side_1vu3n_174`,items:`_items_1vu3n_181`,itemTitle:`_itemTitle_1vu3n_212`,itemText:`_itemText_1vu3n_216`,listFoot:`_listFoot_1vu3n_226`,label:`_label_1vu3n_235`,note:`_note_1vu3n_241`,hairline:`_hairline_1vu3n_246`,axis:`_axis_1vu3n_252`,tick:`_tick_1vu3n_258`,ink:`_ink_1vu3n_264`,ring:`_ring_1vu3n_268`,arrow:`_arrow_1vu3n_274`,appear:`_appear_1vu3n_284`,cell:`_cell_1vu3n_294`,computed:`_computed_1vu3n_298`,cellInk:`_cellInk_1vu3n_307`,dim:`_dim_1vu3n_317`,enter:`_enter_1vu3n_327`,draw:`_draw_1vu3n_12`,slide:`_slide_1vu3n_353`},_={pair:`_pair_zk0je_5`,row:`_row_zk0je_11`,rowLabel:`_rowLabel_zk0je_18`,tokens:`_tokens_zk0je_23`,token:`_token_zk0je_23`,changed:`_changed_zk0je_40`,answer:`_answer_zk0je_46`,scale:`_scale_zk0je_61`},v=a(),y=3e3;function b({label:e,stages:r,children:a,caption:s,ms:c=y,layout:u=`row`,still:d,className:f}){let p=i(),m=r.length-1,h=d??m,[_,b]=(0,l.useState)(()=>({stage:p?h:0,run:0,cycle:0})),[x,S]=(0,l.useState)(!p),[C,w]=(0,l.useState)(!1),[T,E]=(0,l.useState)(()=>typeof document>`u`||!document.hidden),D=(0,l.useRef)(null),O=(0,l.useRef)({run:0,ms:0}),k=(0,l.useId)(),A=`${k}-text`;(0,l.useEffect)(()=>{let e=D.current;if(!e||typeof IntersectionObserver>`u`){w(!0);return}let t=new IntersectionObserver(([e])=>w(e.isIntersecting),{threshold:.35});return t.observe(e),()=>t.disconnect()},[]),(0,l.useEffect)(()=>{let e=()=>E(!document.hidden);return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),(0,l.useEffect)(()=>{p&&(S(!1),b(e=>({...e,stage:h,run:e.run+1})))},[p,h]);let j=e=>Array.isArray(c)?c[e]??y:c,M=x&&C&&T&&!p;(0,l.useEffect)(()=>{if(!M)return;let{stage:e,run:t}=_;O.current.run!==t&&(O.current={run:t,ms:0});let n=performance.now(),i=window.setTimeout(()=>b(e=>{let t=(e.stage+1)%r.length;return{stage:t,run:e.run+1,cycle:t===0?e.cycle+1:e.cycle}}),Math.max(0,j(e)-O.current.ms));return()=>{window.clearTimeout(i),O.current.run===t&&(O.current.ms+=performance.now()-n)}},[M,_,r.length]);let N=e=>{S(!1),b(t=>({...t,stage:e,run:t.run+1}))},P=()=>{x?S(!1):(_.stage===m&&b(e=>({stage:0,run:e.run+1,cycle:e.cycle+1})),S(!0))},F=_.stage,I=t(r.map((e,t)=>({value:t})),F,e=>N(e)),L=e=>{let t=e<F?`done`:e>F?`todo`:M?`playing`:`now`,n=t===`playing`?{animationDuration:`${j(e)}ms`,animationDelay:`-${Math.round(O.current.run===_.run?O.current.ms:0)}ms`}:void 0;return(0,v.jsx)(`span`,{className:g.line,"data-state":t,"aria-hidden":`true`,children:(0,v.jsx)(`span`,{style:n},`${_.run}`)})},R=p?null:(0,v.jsx)(o,{text:x?`Pause`:`Play`,children:(0,v.jsx)(`button`,{type:`button`,className:g.play,onClick:P,"aria-label":`${x?`Pause`:`Play`} the figure: ${e}`,children:(0,v.jsx)(n,{name:x?`pause`:`play`,size:14})})});return u===`list`?(0,v.jsxs)(`figure`,{ref:D,className:`${g.figure} ${g.split} ${f??``}`,"aria-label":e,children:[(0,v.jsx)(`div`,{className:g.drawing,"aria-hidden":`true`,children:a(F,_.cycle)}),(0,v.jsxs)(`div`,{className:g.side,children:[(0,v.jsx)(`div`,{className:g.items,role:`radiogroup`,"aria-label":e,children:r.map((e,t)=>(0,v.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t===F,"aria-labelledby":`${k}-${t}-title`,"aria-describedby":`${k}-${t}-text`,className:g.item,"data-current":t===F||void 0,...I(t),onClick:()=>N(t),children:[(0,v.jsx)(`span`,{id:`${k}-${t}-title`,className:g.itemTitle,children:e.title}),(0,v.jsx)(`span`,{id:`${k}-${t}-text`,className:g.itemText,children:e.text})]},e.title))}),(R||s)&&(0,v.jsxs)(`div`,{className:g.listFoot,children:[R,s&&(0,v.jsx)(`figcaption`,{className:g.caption,children:s})]})]})]}):(0,v.jsxs)(`figure`,{ref:D,className:`${g.figure} ${f??``}`,"aria-labelledby":A,children:[(0,v.jsx)(`div`,{className:g.drawing,"aria-hidden":`true`,children:a(F,_.cycle)}),(0,v.jsxs)(`div`,{className:g.controls,children:[R,(0,v.jsx)(`div`,{className:g.stages,role:`radiogroup`,"aria-label":`Stages of the figure: ${e}`,children:r.map((e,t)=>(0,v.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t===F,className:g.stage,...I(t),onClick:()=>N(t),children:[L(t),(0,v.jsxs)(`span`,{className:g.stageTitle,children:[(0,v.jsx)(`span`,{className:g.stageNumber,children:t+1}),` `,e.title]})]},e.title))})]}),(0,v.jsxs)(`figcaption`,{id:A,className:g.caption,children:[(0,v.jsx)(`span`,{className:g.stageText,"aria-live":M?`off`:`polite`,children:r[F]?.text}),s&&(0,v.jsxs)(v.Fragment,{children:[` `,s]})]})]})}function x(e){return e}function S(){let e=s(e=>e.theme),t=r(.75,e);return e=>t(e)}function C({scale:e}){let t=e.x(0);return(0,v.jsxs)(`g`,{children:[(0,v.jsx)(`line`,{className:g.axis,x1:e.left,x2:e.right,y1:e.y,y2:e.y}),(0,v.jsx)(`line`,{className:g.axis,x1:t,x2:t,y1:e.y-6,y2:e.y+6}),(0,v.jsx)(`text`,{className:g.tick,x:t,y:e.y-12,textAnchor:`middle`,children:`0`}),(0,v.jsx)(`text`,{className:g.label,x:e.left-10,y:e.y+4,textAnchor:`end`,children:u.distractor}),(0,v.jsx)(`text`,{className:g.label,x:e.right+10,y:e.y+4,children:u.answer})]})}function w({scale:e,value:t,from:n=0,name:r,delay:i,color:a,below:o}){let s=e.x(t);return(0,v.jsx)(`g`,{transform:`translate(${s} ${e.y})`,children:(0,v.jsxs)(`g`,{className:g.slide,style:x({"--delay":`${i}ms`,"--from":`${e.x(n)-s}px`}),children:[(0,v.jsx)(`circle`,{r:5.5,fill:a,stroke:`var(--surface)`,strokeWidth:1.5}),(0,v.jsx)(`text`,{className:g.note,y:o?22:-12,textAnchor:`middle`,children:r})]})})}function T({scale:e,from:t,to:n,y:r,name:i,delay:a,strong:o}){let[s,c]=[e.x(t),e.x(n)].sort((e,t)=>e-t);return(0,v.jsxs)(`g`,{className:g.enter,style:x({"--delay":`${a}ms`}),children:[(0,v.jsx)(`path`,{className:g.arrow,d:`M ${s} ${r-5} V ${r} H ${c} V ${r-5}`,strokeWidth:o?1.6:1,opacity:o?1:.7}),(0,v.jsx)(`text`,{className:o?g.label:g.note,x:(s+c)/2,y:r+15,textAnchor:`middle`,children:i})]})}function E({which:e,tokens:t,changed:n,answer:r,hidden:i}){return(0,v.jsxs)(`div`,{className:_.row,style:i?{visibility:`hidden`}:void 0,children:[(0,v.jsx)(`span`,{className:_.rowLabel,children:e}),(0,v.jsxs)(`span`,{className:_.tokens,children:[t.map((e,t)=>(0,v.jsx)(`span`,{className:`${_.token} ${t===n?_.changed:``}`,style:x({"--i":t}),children:e},t)),(0,v.jsxs)(`span`,{className:_.answer,style:x({"--i":t.length}),children:[`→ `,r]})]})]})}var D=u.clean.length*55+400,O={x:e=>460+e*260,y:40,left:200,right:720};function k({label:e,stages:t}){let n=S();return(0,v.jsx)(b,{label:e,stages:t,ms:[3600,3600,3400],children:(e,t)=>(0,v.jsxs)(`div`,{className:_.pair,children:[(0,v.jsx)(E,{which:`clean`,tokens:u.clean,answer:u.answer},`clean-${t}`),e>=1?(0,v.jsx)(E,{which:`corrupt`,tokens:u.corrupt,changed:u.changed,answer:u.distractor},`corrupt-${t}`):(0,v.jsx)(E,{which:`corrupt`,tokens:u.corrupt,answer:u.distractor,hidden:!0}),(0,v.jsxs)(`svg`,{viewBox:`0 0 900 84`,width:900,height:84,className:_.scale,children:[(0,v.jsx)(`text`,{className:g.note,x:O.left,y:12,children:`logit difference`}),(0,v.jsx)(C,{scale:O}),(0,v.jsx)(w,{scale:O,value:m.clean,name:`clean`,delay:D,color:n(m.clean)},`clean-${t}`),e>=1&&(0,v.jsx)(w,{scale:O,value:m.corrupt,name:`corrupt`,delay:D,color:n(m.corrupt)},`corrupt-${t}`),e>=2&&(0,v.jsx)(T,{scale:O,from:m.corrupt,to:m.clean,y:64,name:`the gap`,delay:150,strong:!0},`gap-${t}`)]})]})})}var A=12,j=10,M=142,N=40,P=[{x:79,name:`Clean`,says:`prefers Mary`},{x:379,name:`Corrupt`,says:`prefers John`},{x:679,name:`Patched`,says:`moves toward Mary`}],F=70,I={delay:250,ms:900},L=I.delay+I.ms,R={x:e=>450+e*260,y:302,left:190,right:710};function z(e){return{x:P[e].x+f.head*A+j/2,y:N+f.layer*A+j/2}}function B(){let[e,t]=[z(0),z(2)];return`M ${e.x} ${e.y+8} C ${e.x} ${e.y+118}, ${t.x} ${t.y+118}, ${t.x} ${t.y+8}`}function V(e){let[t,n]=[z(0),z(2)],r={x:t.x,y:t.y+8},i={x:t.x,y:t.y+118},a={x:n.x,y:n.y+118},o={x:n.x,y:n.y+8},s=1-e,c=[s*s*s,3*s*s*e,3*s*e*e,e*e*e];return{x:c[0]*r.x+c[1]*i.x+c[2]*a.x+c[3]*o.x,y:c[0]*r.y+c[1]*i.y+c[2]*a.y+c[3]*o.y}}function H(){let e=i(),[t,n]=(0,l.useState)(0);if((0,l.useEffect)(()=>{if(e)return;let t=0,r=performance.now()+I.delay,i=e=>{let a=Math.min(1,Math.max(0,(e-r)/I.ms));n(a),a<1&&(t=requestAnimationFrame(i))};return t=requestAnimationFrame(i),()=>cancelAnimationFrame(t)},[e]),e||t<=0||t>=1)return null;let r=V(t<.5?2*t*t:1-(-2*t+2)**2/2);return(0,v.jsx)(`circle`,{className:g.ink,cx:r.x,cy:r.y,r:3.5})}function U({run:e,from:t=0,to:n=12,delay:r=0,fill:i}){return(0,v.jsx)(v.Fragment,{children:Array.from({length:n-t},(e,n)=>t+n).map(n=>(0,v.jsx)(`rect`,{className:g.enter,style:x({"--delay":`${r+(n-t)*F}ms`}),x:P[e].x,y:N+n*A,width:M,height:j,fill:i},n))})}function W({label:e,stages:t,caption:n}){let r=S(),i=(0,l.useId)().replace(/[^a-zA-Z0-9_-]/g,``),a=h(p()),o=`url(#${i}-ink)`,s=z(2);return(0,v.jsx)(b,{label:e,stages:t,caption:n,ms:[2800,2800,3400,4600],children:(e,t)=>(0,v.jsxs)(`svg`,{viewBox:`0 0 900 374`,width:900,height:374,children:[(0,v.jsxs)(`defs`,{children:[(0,v.jsx)(`pattern`,{id:`${i}-cells`,x:P[0].x,y:N,width:A,height:A,patternUnits:`userSpaceOnUse`,children:(0,v.jsx)(`rect`,{className:g.cell,width:j,height:j})}),(0,v.jsx)(`pattern`,{id:`${i}-ink`,x:P[0].x,y:N,width:A,height:A,patternUnits:`userSpaceOnUse`,children:(0,v.jsx)(`rect`,{className:g.cellInk,width:j,height:j})})]}),P.map(e=>(0,v.jsxs)(`g`,{children:[(0,v.jsx)(`text`,{className:g.label,x:e.x,y:16,children:e.name}),(0,v.jsx)(`rect`,{x:e.x,y:N,width:M,height:M,fill:`url(#${i}-cells)`})]},e.name)),(0,v.jsxs)(`g`,{children:[(0,v.jsx)(U,{run:0,fill:o}),(0,v.jsx)(`text`,{className:`${g.note} ${g.enter}`,style:x({"--delay":`840ms`}),x:P[0].x,y:30,children:P[0].says})]},`clean-${t}`),e>=1&&(0,v.jsxs)(`g`,{children:[(0,v.jsx)(U,{run:1,fill:o}),(0,v.jsx)(`text`,{className:`${g.note} ${g.enter}`,style:x({"--delay":`840ms`}),x:P[1].x,y:30,children:P[1].says})]},`corrupt-${t}`),e>=2&&(0,v.jsxs)(`g`,{children:[(0,v.jsx)(`circle`,{className:`${g.ring} ${g.enter}`,cx:z(0).x,cy:z(0).y,r:8.5}),(0,v.jsx)(`path`,{className:`${g.arrow} ${g.draw}`,style:x({"--length":1,"--delay":`${I.delay}ms`}),pathLength:1,d:B(),opacity:.75}),(0,v.jsx)(`path`,{className:`${g.arrow} ${g.enter}`,style:x({"--delay":`${L}ms`}),d:`M ${s.x-3.5} ${s.y+13.5} L ${s.x} ${s.y+8} L ${s.x+3.5} ${s.y+13.5}`}),(0,v.jsx)(H,{}),(0,v.jsx)(U,{run:2,to:f.layer,fill:o}),(0,v.jsx)(`rect`,{className:`${g.ink} ${g.enter}`,style:x({"--delay":`${L}ms`}),x:s.x-j/2,y:s.y-j/2,width:j,height:j}),(0,v.jsx)(U,{run:2,from:f.layer,delay:L+120,fill:o}),(0,v.jsx)(`text`,{className:`${g.note} ${g.enter}`,style:x({"--delay":`${L+120+210}ms`}),x:P[2].x,y:30,children:P[2].says})]},`patched-${t}`),(0,v.jsx)(C,{scale:R}),(0,v.jsx)(w,{scale:R,value:m.clean,name:`clean`,delay:840,color:r(m.clean)},`m-clean-${t}`),e>=1&&(0,v.jsx)(w,{scale:R,value:m.corrupt,name:`corrupt`,delay:840,color:r(m.corrupt)},`m-corrupt-${t}`),e>=3&&(0,v.jsxs)(`g`,{children:[(0,v.jsx)(w,{scale:R,value:a,from:m.corrupt,name:`patched`,delay:150,color:r(a)}),(0,v.jsx)(T,{scale:R,from:m.corrupt,to:a,y:326,name:`effect`,delay:1150,strong:!0}),(0,v.jsx)(T,{scale:R,from:m.corrupt,to:m.clean,y:354,name:`the gap`,delay:1500})]},`measure-${t}`)]})})}export{g as a,b as i,k as n,d as o,x as r,u as s,W as t};
@@ -0,0 +1 @@
1
+ ._figure_1vu3n_5{flex-direction:column;gap:10px;margin:6px 0 2px;display:flex}._drawing_1vu3n_12{min-width:0;color:var(--text);justify-content:center;display:flex}._drawing_1vu3n_12>:not(svg){flex:1;min-width:0}._drawing_1vu3n_12 svg{max-width:100%;height:auto;display:block;overflow:visible}@media (prefers-reduced-motion:reduce){._drawing_1vu3n_12 *,._drawing_1vu3n_12 :before,._drawing_1vu3n_12 :after,._line_1vu3n_37>span{transition:none!important;animation:none!important}}._controls_1vu3n_44{align-items:flex-start;gap:12px;display:flex}._play_1vu3n_50{border:1px solid var(--control-line);background:var(--surface);width:28px;height:28px;color:var(--text);cursor:pointer;border-radius:50%;flex:none;place-items:center;display:grid}._play_1vu3n_50:hover{background:var(--hover)}._play_1vu3n_50:focus-visible,._stage_1vu3n_68:focus-visible,._item_1vu3n_69:focus-visible{outline:2px solid var(--text);outline-offset:2px}._stages_1vu3n_74{flex-wrap:wrap;flex:1;gap:8px 14px;display:flex}._stage_1vu3n_68{border-radius:var(--radius-sm);min-width:0;color:var(--muted);font:inherit;font-size:var(--text-xs);text-align:left;cursor:pointer;background:0 0;border:0;flex-direction:column;flex:96px;gap:6px;padding:3px 0 2px;font-weight:560;line-height:1.3;display:flex}._stage_1vu3n_68:hover,._stage_1vu3n_68[aria-checked=true]{color:var(--text)}._stageNumber_1vu3n_105{font-variant-numeric:tabular-nums;color:var(--faint)}._stage_1vu3n_68[aria-checked=true] ._stageNumber_1vu3n_105{color:var(--text)}._line_1vu3n_37{background:var(--line);border-radius:1px;height:2px;display:block;position:relative;overflow:hidden}._line_1vu3n_37>span{background:var(--text);transform-origin:0;position:absolute;inset:0;transform:scaleX(0)}._line_1vu3n_37[data-state=done]>span,._line_1vu3n_37[data-state=now]>span{transform:none}._line_1vu3n_37[data-state=playing]>span{animation-name:_fill_1vu3n_1;animation-timing-function:linear;animation-fill-mode:both}@keyframes _fill_1vu3n_1{to{transform:scaleX(1)}}._caption_1vu3n_149{max-width:68ch;color:var(--muted);font-size:var(--text-sm);line-height:1.5}._stageText_1vu3n_156{color:var(--text)}._split_1vu3n_161{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:22px;display:grid}@media (width<=760px){._split_1vu3n_161{grid-template-columns:minmax(0,1fr)}}._side_1vu3n_174{flex-direction:column;gap:10px;min-width:0;display:flex}._items_1vu3n_181{flex-direction:column;display:flex}._item_1vu3n_69{border:0;border-left:2px solid var(--line);color:var(--text);font:inherit;text-align:left;cursor:pointer;transition:border-color var(--dur) var(--ease);background:0 0;border-radius:0;flex-direction:column;gap:1px;padding:6px 0 7px 12px;display:flex}._item_1vu3n_69:hover{border-left-color:var(--control-line)}._item_1vu3n_69[data-current],._item_1vu3n_69[data-current]:hover{border-left-color:var(--text)}._itemTitle_1vu3n_212{font-weight:620}._itemText_1vu3n_216{color:var(--muted);font-size:var(--text-sm);line-height:1.45}._item_1vu3n_69[data-current] ._itemText_1vu3n_216{color:var(--text)}._listFoot_1vu3n_226{align-items:center;gap:10px;display:flex}._label_1vu3n_235{fill:currentColor;font-size:11.5px;font-weight:600}._note_1vu3n_241{fill:var(--muted);font-size:11px}._hairline_1vu3n_246{fill:none;stroke:var(--line);stroke-width:1px}._axis_1vu3n_252{fill:none;stroke:var(--control-line);stroke-width:1px}._tick_1vu3n_258{fill:var(--faint);font-variant-numeric:tabular-nums;font-size:10.5px}._ink_1vu3n_264{fill:currentColor}._ring_1vu3n_268{fill:none;stroke:currentColor;stroke-width:1.5px}._arrow_1vu3n_274{fill:none;stroke:currentColor;stroke-width:1.25px;stroke-linecap:round;stroke-linejoin:round}._appear_1vu3n_284{opacity:0;transition:opacity .32s var(--ease) var(--delay,0s)}._appear_1vu3n_284[data-on]{opacity:1}._cell_1vu3n_294{fill:var(--line)}._computed_1vu3n_298{opacity:0;transition:opacity .26s var(--ease) var(--delay,0s)}._computed_1vu3n_298[data-on]{opacity:1}._cellInk_1vu3n_307{fill:var(--text);opacity:.42}:root[data-theme=dark] ._cellInk_1vu3n_307{opacity:.5}._dim_1vu3n_317{transition:opacity .32s var(--ease)}._dim_1vu3n_317[data-off]{opacity:.28}._enter_1vu3n_327{animation:_enter_1vu3n_327 .3s var(--ease) var(--delay,0s) both}@keyframes _enter_1vu3n_327{0%{opacity:0}}._draw_1vu3n_12{stroke-dasharray:var(--length);animation:_draw_1vu3n_12 .9s var(--ease) var(--delay,0s) both}@keyframes _draw_1vu3n_12{0%{stroke-dashoffset:var(--length)}to{stroke-dashoffset:0}}._slide_1vu3n_353{animation:_slide_1vu3n_353 .9s var(--ease) var(--delay,0s) both}@keyframes _slide_1vu3n_353{0%{opacity:0;transform:translateX(var(--from))}30%{opacity:1}}._pair_zk0je_5{flex-direction:column;gap:6px;display:flex}._row_zk0je_11{grid-template-columns:54px minmax(0,1fr);align-items:center;gap:10px;display:grid}._rowLabel_zk0je_18{color:var(--muted);font-size:var(--text-xs)}._tokens_zk0je_23{flex-wrap:wrap;align-items:center;gap:3px;display:flex}._token_zk0je_23{border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);font-size:var(--text-sm);animation:_token_zk0je_23 .24s var(--ease) calc(var(--i) * 55ms) both;padding:2px 5px;line-height:1.35}._changed_zk0je_40{border-color:var(--text);box-shadow:inset 0 0 0 1px var(--text);font-weight:620}._answer_zk0je_46{font-size:var(--text-sm);white-space:nowrap;animation:_token_zk0je_23 .24s var(--ease) calc(var(--i) * 55ms + .16s) both;margin-left:8px;font-weight:620}@keyframes _token_zk0je_23{0%{opacity:0;transform:translateY(3px)}}._scale_zk0je_61{margin-top:4px}@media (width<=640px){._row_zk0je_11{grid-template-columns:minmax(0,1fr);gap:4px}}
@@ -0,0 +1 @@
1
+ ._band_o9x1q_5{fill:none;stroke:var(--line)}._bandOn_o9x1q_10{fill:none;stroke:var(--text);stroke-width:1.5px}._stream_o9x1q_16{stroke:var(--control-line);stroke-width:1px}._lastStream_o9x1q_21{stroke:var(--text);stroke-width:2px}._pulse_o9x1q_27{fill:var(--text);animation:_rise_o9x1q_1 1.8s var(--ease) infinite}@keyframes _rise_o9x1q_1{0%{opacity:0;transform:translateY(0)}15%{opacity:1}85%{opacity:1}to{opacity:0;transform:translateY(-228px)}}._attend_o9x1q_49{fill:none;stroke:var(--text);stroke-width:1.25px;stroke-linecap:round}._flow_o9x1q_57{stroke-dasharray:4 4;animation:.7s linear infinite _flow_o9x1q_57}@keyframes _flow_o9x1q_57{to{stroke-dashoffset:-8px}}._mlp_o9x1q_68{fill:var(--surface);stroke:var(--text);stroke-width:1.25px}._token_o9x1q_74{fill:var(--surface);stroke:var(--line)}._tokenOn_o9x1q_79{fill:var(--surface);stroke:var(--text);stroke-width:1.5px}._tokenText_o9x1q_85{fill:currentColor;font-size:11px}._mapOn_o9x1q_90{fill:var(--text);opacity:.55}._mapOff_o9x1q_95{fill:var(--line)}._section_vdjlx_5{flex-direction:column;gap:8px;display:flex}._section_vdjlx_5+._section_vdjlx_5{border-top:1px solid var(--line-soft);margin-top:14px;padding-top:16px}._title_vdjlx_17{font-size:var(--text-lg);font-weight:640;font-stretch:var(--display-stretch);letter-spacing:-.005em}._steps_vdjlx_25{flex-direction:column;gap:12px;max-width:68ch;margin:2px 0 0;padding:0;list-style:none;display:flex;position:relative}._steps_vdjlx_25:before{content:"";background:var(--line);width:1px;position:absolute;top:14px;bottom:14px;left:12px}._steps_vdjlx_25 li{grid-template-columns:26px minmax(0,1fr);align-items:start;gap:12px;display:grid;position:relative}._stepNumber_vdjlx_54{border:2px solid var(--step,var(--text));background:var(--raised);width:26px;height:26px;font-size:var(--text-xs);font-variant-numeric:tabular-nums;border-radius:50%;place-items:center;font-weight:680;display:grid;position:relative}._stepBody_vdjlx_68{flex-direction:column;gap:6px;padding-top:3px;display:flex}._stepAction_vdjlx_75{display:block}
@@ -0,0 +1 @@
1
+ import{a as e,b as t,c as n,g as r,l as i,m as a,n as o,r as s,s as c,t as l,v as u,y as d}from"./index-DreV1655.js";import{a as f,i as p,n as m,o as h,r as g,s as _,t as v}from"./PatchingFigures-BR5oqtfl.js";var y=t(d(),1),b=a(),x=[`induction`,`s-inhibition`,`name-mover`,`negative-name-mover`],S=20,C=17,w=44,T=34,E=237,D=.5;function O({label:e,stages:t}){return(0,b.jsx)(p,{label:e,stages:t,layout:`list`,still:-1,ms:[3400,2600,2600,2600,2600],children:(e,t)=>(0,b.jsx)(k,{stage:e,cycle:t})})}function k({stage:e,cycle:t}){let n=u(e=>e.theme),i=r(D,n),a=(0,y.useId)().replace(/[^a-zA-Z0-9_-]/g,``),o=e>=1?x[e-1]:null,s=h.filter(t=>e===-1||t.role===o),c=new Map(h.map(e=>[`${e.layer}.${e.head}`,e.effect])),l=e=>w+e*S,d=e=>T+e*S;return(0,b.jsxs)(`svg`,{viewBox:`0 0 360 358`,width:360,height:358,children:[(0,b.jsx)(`defs`,{children:(0,b.jsx)(`linearGradient`,{id:a,children:[-1,-.5,0,.5,1].map(e=>(0,b.jsx)(`stop`,{offset:`${(e+1)*50}%`,stopColor:i(e*D)},e))})}),(0,b.jsx)(`text`,{className:f.tick,x:w,y:16,children:`head`}),[0,5,11].map(e=>(0,b.jsx)(`text`,{className:f.tick,x:l(e)+C/2,y:30,textAnchor:`middle`,children:e},e)),(0,b.jsx)(`text`,{className:f.tick,x:34,y:16,textAnchor:`end`,children:`layer`}),Array.from({length:12},(n,r)=>(0,b.jsxs)(`g`,{className:f.enter,style:g({"--delay":`${e===0?r*110:0}ms`}),children:[(0,b.jsx)(`text`,{className:f.tick,x:36,y:d(r)+C-3,textAnchor:`end`,children:r}),Array.from({length:12},(e,t)=>{let n=c.get(`${r}.${t}`)??0,a=s.some(e=>e.layer===r&&e.head===t);return(0,b.jsx)(`rect`,{className:f.dim,"data-off":o&&!a?``:void 0,x:l(t),y:d(r),width:C,height:C,rx:2,fill:i(n)},t)})]},`${r}-${t}`)),s.map(n=>(0,b.jsx)(`rect`,{className:`${f.ring} ${f.enter}`,style:g({"--delay":e===0?`0ms`:`120ms`}),x:l(n.head)-2.5,y:d(n.layer)-2.5,width:22,height:22,rx:3.5},`${n.layer}.${n.head}-${e}-${t}`)),o&&(0,b.jsx)(`text`,{className:`${f.label} ${f.enter}`,style:g({"--delay":`120ms`}),x:w,y:349,children:s.map(e=>`${e.layer}.${e.head} ${e.effect>0?`+`:`−`}${Math.abs(e.effect).toFixed(2)}`).join(` · `)},`${o}-${t}`),(0,b.jsxs)(`g`,{transform:`translate(${w} 295)`,children:[(0,b.jsx)(`rect`,{width:E,height:8,rx:2,fill:`url(#${a})`}),(0,b.jsxs)(`text`,{className:f.tick,x:0,y:22,children:[`−`,D]}),(0,b.jsx)(`text`,{className:f.tick,x:E/2,y:22,textAnchor:`middle`,children:`0`}),(0,b.jsxs)(`text`,{className:f.tick,x:E,y:22,textAnchor:`end`,children:[`+`,D]}),(0,b.jsx)(`text`,{className:f.note,x:247,y:8,children:`effect`})]})]})}var A={band:`_band_o9x1q_5`,bandOn:`_bandOn_o9x1q_10`,stream:`_stream_o9x1q_16`,lastStream:`_lastStream_o9x1q_21`,pulse:`_pulse_o9x1q_27`,rise:`_rise_o9x1q_1`,attend:`_attend_o9x1q_49`,flow:`_flow_o9x1q_57`,mlp:`_mlp_o9x1q_68`,token:`_token_o9x1q_74`,tokenOn:`_tokenOn_o9x1q_79`,tokenText:`_tokenText_o9x1q_85`,mapOn:`_mapOn_o9x1q_90`,mapOff:`_mapOff_o9x1q_95`},j=[`token`,`layer`,`stream`,`head`,`mlp`,`site`],M=[{x:84,text:_.clean[0]},{x:132,text:_.clean[1]},{x:180,text:_.clean[2]},{x:228,text:_.clean[3]},{x:276,text:`…`,gap:!0},{x:324,text:_.clean[_.clean.length-1]}],N=M.filter(e=>!e.gap).map(e=>e.x),P=M[3].x,F=M[M.length-1].x,I=[{y:226,name:`layer 0`},{y:168,name:`layer 1`},{y:84,name:`layer 11`}],L=40,R=284,z=1,B=344,V={res:48,heads:72,pitch:12,attn:226,mlp:256,size:10},H=9;function U({label:e,stages:t}){return(0,b.jsx)(p,{label:e,stages:t,layout:`list`,still:-1,ms:3e3,children:(e,t)=>(0,b.jsx)(W,{part:e>=0?j[e]:null,cycle:t})})}function W({part:e,cycle:t}){let n=(...t)=>e===null||t.includes(e)?void 0:``,r=e=>e.y+12,i=e=>e.y+L-15;return(0,b.jsxs)(`svg`,{viewBox:`0 0 360 362`,width:360,height:362,children:[(0,b.jsxs)(`g`,{className:f.dim,"data-off":n(`stream`),children:[(0,b.jsx)(`text`,{className:f.label,x:F,y:16,textAnchor:`middle`,children:_.answer}),(0,b.jsx)(`path`,{className:f.arrow,d:`M ${F} 54 V 26 M ${F-3.5} 31.5 L ${F} 26 L ${F+3.5} 31.5`})]}),I.map((t,r)=>(0,b.jsxs)(`g`,{className:f.dim,"data-off":n(`layer`,`site`)??(e===`site`&&r!==z?``:void 0),children:[(0,b.jsx)(`rect`,{className:e===`layer`&&r===z?A.bandOn:A.band,x:44,y:t.y,width:306,height:L,rx:4}),(0,b.jsx)(`text`,{className:f.note,x:0,y:t.y+L/2+4,children:t.name})]},t.name)),(0,b.jsx)(`text`,{className:f.note,x:0,y:152,children:`…`}),(0,b.jsxs)(`g`,{className:f.dim,"data-off":n(`stream`),children:[N.map(e=>(0,b.jsx)(`line`,{className:e===F?A.lastStream:A.stream,x1:e,x2:e,y1:R,y2:e===F?56:66},e)),e===`stream`&&(0,b.jsx)(`circle`,{className:A.pulse,cx:F,cy:R,r:4},`pulse-${t}`)]}),(0,b.jsx)(`g`,{className:f.dim,"data-off":n(`head`,`layer`),children:I.map(t=>(0,b.jsxs)(y.Fragment,{children:[(0,b.jsx)(`path`,{className:`${A.attend} ${e===`head`?A.flow:``}`,d:`M ${P} ${r(t)+4} C ${P+30} ${r(t)-12}, ${F-40} ${r(t)-12}, ${F-7} ${r(t)}`}),(0,b.jsx)(`rect`,{className:f.ink,x:F-5,y:r(t)-5,width:10,height:10,rx:1.5})]},t.name))}),(0,b.jsx)(`g`,{className:f.dim,"data-off":n(`mlp`,`layer`),children:I.map(e=>N.map(t=>(0,b.jsx)(`rect`,{className:A.mlp,x:t-6,y:i(e)-6,width:12,height:12,rx:2},`${e.name}-${t}`)))}),(e===`site`||e===null)&&(0,b.jsxs)(`g`,{className:f.enter,children:[(0,b.jsx)(`circle`,{className:f.ring,cx:F,cy:r(I[z]),r:10}),e===`site`&&(0,b.jsx)(`text`,{className:f.label,x:F-16,y:r(I[z])+4,textAnchor:`end`,children:`a site`})]},`site-${t}`),(0,b.jsx)(`g`,{className:f.dim,"data-off":n(`token`),children:M.map(t=>t.gap?(0,b.jsx)(`text`,{className:f.note,x:t.x,y:300,textAnchor:`middle`,children:`…`},t.x):(0,b.jsxs)(`g`,{children:[(0,b.jsx)(`rect`,{className:e===`token`?A.tokenOn:A.token,x:t.x-22,y:R,width:44,height:22,rx:4}),(0,b.jsx)(`text`,{className:A.tokenText,x:t.x,y:299,textAnchor:`middle`,children:t.text})]},t.x))}),(0,b.jsxs)(`g`,{className:f.dim,"data-off":e===`token`?``:void 0,children:[(0,b.jsx)(`text`,{className:f.note,x:0,y:322,children:`One layer, as a row of the map`}),(0,b.jsx)(G,{x:V.res,on:e===null||e===`layer`||e===`stream`,label:`res`}),Array.from({length:12},(t,n)=>(0,b.jsx)(G,{x:V.heads+n*V.pitch,on:e===null||e===`layer`||e===`head`&&n===H||e===`site`&&n===H,label:n===0?`heads`:void 0,ring:e===`site`&&n===H},n)),(0,b.jsx)(G,{x:V.attn,on:e===null||e===`layer`||e===`head`,label:`attn`}),(0,b.jsx)(G,{x:V.mlp,on:e===null||e===`layer`||e===`mlp`,label:`mlp`})]})]})}function G({x:e,on:t,label:n,ring:r}){return(0,b.jsxs)(`g`,{children:[(0,b.jsx)(`rect`,{className:t?A.mapOn:A.mapOff,x:e,y:B,width:V.size,height:V.size,rx:1.5}),r&&(0,b.jsx)(`circle`,{className:f.ring,cx:e+V.size/2,cy:B+V.size/2,r:9}),n&&(0,b.jsx)(`text`,{className:f.tick,x:e,y:339,children:n})]})}var K={section:`_section_vdjlx_5`,title:`_title_vdjlx_17`,steps:`_steps_vdjlx_25`,stepNumber:`_stepNumber_vdjlx_54`,stepBody:`_stepBody_vdjlx_68`,stepAction:`_stepAction_vdjlx_75`};function q({inWorkbench:t,go:n,toExamples:r}){let a=(0,y.useId)(),o=e=>e.to===`tour`||t,u=(e,t=!1)=>(0,b.jsx)(i,{size:`small`,variant:t?`primary`:`secondary`,onClick:()=>e.to===`tour`?void c():e.to===`view`?n(e.view):r(),children:e.label},e.label);return(0,b.jsx)(b.Fragment,{children:l.map(t=>{let n=`${a}-${t.id}`,r=(t.actions??[]).filter(o);return(0,b.jsxs)(`div`,{className:K.section,children:[t.title&&(0,b.jsx)(`h3`,{id:n,className:K.title,children:t.title}),t.paragraphs.map(e=>(0,b.jsx)(`p`,{children:(0,b.jsx)(X,{text:e})},e)),t.id===`ask`?(0,b.jsx)(s,{compact:!0}):t.terms&&t.figure?.id!==`parts`&&(0,b.jsx)(`dl`,{className:e.rows,"aria-labelledby":t.title?n:void 0,children:t.terms.map(t=>(0,b.jsxs)(`div`,{className:e.row,children:[(0,b.jsx)(`dt`,{children:t.term}),(0,b.jsx)(`dd`,{children:(0,b.jsx)(X,{text:t.text})})]},t.term))}),t.steps&&(0,b.jsx)(`ol`,{className:K.steps,"aria-labelledby":t.title?n:void 0,children:t.steps.map((e,t)=>(0,b.jsxs)(`li`,{style:{"--step":`var(--${J[t]??`text`})`},children:[(0,b.jsx)(`span`,{className:K.stepNumber,"aria-hidden":`true`,children:t+1}),(0,b.jsxs)(`span`,{className:K.stepBody,children:[(0,b.jsx)(`span`,{children:(0,b.jsx)(X,{text:e.text})}),e.action&&o(e.action)&&(0,b.jsx)(`span`,{className:K.stepAction,children:u(e.action,!0)})]})]},e.text))}),r.length>0&&(0,b.jsx)(`div`,{className:e.actions,children:r.map(e=>u(e))}),(0,b.jsx)(Y,{section:t})]},t.id)})})}var J=[`text`,`live`,`experiment`,`experiment`,`evidence`,`evidence`];function Y({section:e}){let t=e.figure;if(!t)return null;let n=o(e);switch(t.id){case`pair`:return(0,b.jsx)(m,{label:t.label,stages:n});case`patching`:return(0,b.jsx)(v,{label:t.label,stages:n,caption:t.caption??``});case`parts`:return(0,b.jsx)(U,{label:t.label,stages:n});case`finds`:return(0,b.jsx)(O,{label:t.label,stages:n})}}function X({text:e}){return(0,b.jsx)(b.Fragment,{children:n(e).map((e,t)=>e.strong?(0,b.jsx)(`strong`,{children:e.text},t):e.text)})}export{q as StartHere};