logogram 0.1.2__tar.gz → 0.2.0__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.
- {logogram-0.1.2 → logogram-0.2.0}/.gitignore +5 -0
- {logogram-0.1.2 → logogram-0.2.0}/AGENTS.md +18 -10
- logogram-0.2.0/CHANGELOG.md +213 -0
- {logogram-0.1.2 → logogram-0.2.0}/PKG-INFO +218 -40
- {logogram-0.1.2 → logogram-0.2.0}/README.md +216 -38
- {logogram-0.1.2 → logogram-0.2.0}/pyproject.toml +29 -3
- {logogram-0.1.2 → logogram-0.2.0}/scripts/check_privacy.py +77 -32
- {logogram-0.1.2 → logogram-0.2.0}/scripts/smoke_wheel.py +1 -1
- {logogram-0.1.2 → logogram-0.2.0}/scripts/validate_real_weights.py +199 -10
- logogram-0.2.0/src/logogram/__init__.py +41 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/analysis.py +130 -51
- logogram-0.2.0/src/logogram/api.py +397 -0
- logogram-0.2.0/src/logogram/atp.py +258 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/backends/base.py +42 -12
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/backends/hub.py +12 -6
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/backends/saes.py +181 -33
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/backends/transformer_lens.py +134 -46
- logogram-0.2.0/src/logogram/circuits.py +586 -0
- logogram-0.2.0/src/logogram/cli.py +954 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/compare.py +86 -1
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/datasets.py +39 -9
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/direct.py +24 -5
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/engine.py +260 -57
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/examples/ioi-gpt2/experiments/ioi-head-patching/spec.json +3 -2
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/features.py +185 -47
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/fileio.py +35 -1
- logogram-0.2.0/src/logogram/metrics.py +277 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/paths.py +38 -14
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/project.py +23 -9
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/prompts.py +126 -35
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/results.py +154 -50
- logogram-0.2.0/src/logogram/robustness.py +44 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/runner.py +71 -14
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/runs.py +15 -3
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/sae.py +49 -11
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/schema.py +102 -3
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/server/app.py +154 -37
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/server/models.py +66 -2
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/server/security.py +11 -1
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/server/state.py +28 -17
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/sites.py +21 -7
- logogram-0.2.0/src/logogram/spec.py +908 -0
- logogram-0.2.0/src/logogram/stats.py +309 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/steering.py +81 -38
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/system.py +29 -10
- logogram-0.2.0/src/logogram/tasks.py +1011 -0
- logogram-0.2.0/src/logogram/web_dist/assets/index-73rNh-lK.js +55 -0
- logogram-0.2.0/src/logogram/web_dist/assets/index-B1QioA38.css +1 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/web_dist/index.html +3 -3
- {logogram-0.1.2 → logogram-0.2.0}/tests/browser_server.py +2 -1
- {logogram-0.1.2 → logogram-0.2.0}/tests/conftest.py +14 -4
- logogram-0.2.0/tests/test_api.py +164 -0
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_architectures.py +1 -1
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_atp.py +10 -4
- logogram-0.2.0/tests/test_circuits.py +286 -0
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_direct.py +1 -1
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_engine.py +39 -10
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_explorer.py +19 -2
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_hardening.py +39 -2
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_loading.py +11 -0
- logogram-0.2.0/tests/test_metrics.py +323 -0
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_paths.py +32 -7
- logogram-0.2.0/tests/test_privacy.py +168 -0
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_release_fixes.py +1 -0
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_sae.py +59 -9
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_sanity.py +4 -4
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_server.py +66 -6
- logogram-0.2.0/tests/test_specs.py +240 -0
- logogram-0.2.0/tests/test_statistics.py +158 -0
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_steering.py +23 -15
- logogram-0.2.0/tests/test_tasks.py +525 -0
- logogram-0.2.0/tests/test_transcoders.py +349 -0
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_units.py +24 -12
- logogram-0.2.0/tests/test_validation_script.py +248 -0
- {logogram-0.1.2 → logogram-0.2.0}/uv.lock +239 -53
- {logogram-0.1.2 → logogram-0.2.0}/web/index.html +1 -1
- {logogram-0.1.2 → logogram-0.2.0}/web/package-lock.json +11 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/package.json +1 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/playwright.config.ts +6 -1
- {logogram-0.1.2 → logogram-0.2.0}/web/src/App.module.css +4 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/App.tsx +3 -1
- {logogram-0.1.2 → logogram-0.2.0}/web/src/api/client.ts +49 -23
- {logogram-0.1.2 → logogram-0.2.0}/web/src/api/events.ts +11 -2
- {logogram-0.1.2 → logogram-0.2.0}/web/src/api/types.ts +231 -29
- logogram-0.2.0/web/src/components/CancelRunDialog.tsx +41 -0
- logogram-0.2.0/web/src/components/CircuitDialog.tsx +151 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/CommandPalette.tsx +34 -6
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/CopyCommand.module.css +5 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/CopyCommand.tsx +2 -1
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/Distribution.tsx +7 -2
- logogram-0.2.0/web/src/components/ErrorBoundary.module.css +46 -0
- logogram-0.2.0/web/src/components/ErrorBoundary.tsx +95 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/Header.tsx +1 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/Heatmap/Heatmap.module.css +13 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/Heatmap/Heatmap.tsx +86 -48
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/History.tsx +4 -1
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/Inspector.module.css +2 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/Inspector.tsx +176 -34
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/ModelDialog.tsx +20 -9
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/ModelMap/Legend.tsx +1 -1
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/ModelMap/ModelMap.module.css +13 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/ModelMap/ModelMap.tsx +92 -50
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/Notices.module.css +24 -0
- logogram-0.2.0/web/src/components/Notices.tsx +42 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/RobustnessDialog.tsx +28 -9
- logogram-0.2.0/web/src/components/ShortcutsDialog.module.css +65 -0
- logogram-0.2.0/web/src/components/ShortcutsDialog.tsx +127 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/Splitter.tsx +11 -1
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/StatusLine.tsx +37 -4
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/TokenStrip.module.css +12 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/TokenStrip.tsx +41 -15
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/ui/Icon.tsx +2 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/ui/index.tsx +110 -45
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/ui/ui.module.css +33 -41
- logogram-0.2.0/web/src/lib/analysis.ts +93 -0
- logogram-0.2.0/web/src/lib/buildSpec.ts +337 -0
- logogram-0.2.0/web/src/lib/circuits.ts +247 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/lib/color.ts +15 -5
- {logogram-0.1.2 → logogram-0.2.0}/web/src/lib/export.ts +21 -5
- logogram-0.2.0/web/src/lib/formDraft.ts +224 -0
- logogram-0.2.0/web/src/lib/formHistory.ts +79 -0
- logogram-0.2.0/web/src/lib/formState.ts +146 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/lib/format.ts +27 -15
- {logogram-0.1.2 → logogram-0.2.0}/web/src/lib/hooks.ts +7 -3
- {logogram-0.1.2 → logogram-0.2.0}/web/src/lib/keys.ts +34 -1
- logogram-0.2.0/web/src/lib/metrics.ts +162 -0
- logogram-0.2.0/web/src/lib/milestones.ts +36 -0
- logogram-0.2.0/web/src/lib/motion.ts +25 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/lib/sites.ts +30 -5
- {logogram-0.1.2 → logogram-0.2.0}/web/src/lib/spec.ts +81 -84
- {logogram-0.1.2 → logogram-0.2.0}/web/src/main.tsx +4 -1
- {logogram-0.1.2 → logogram-0.2.0}/web/src/screens/Projects.tsx +3 -3
- {logogram-0.1.2 → logogram-0.2.0}/web/src/screens/Screens.module.css +3 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/screens/SystemCheck.tsx +2 -2
- {logogram-0.1.2 → logogram-0.2.0}/web/src/screens/Workbench.module.css +7 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/screens/Workbench.tsx +22 -6
- {logogram-0.1.2 → logogram-0.2.0}/web/src/store/app.ts +346 -147
- {logogram-0.1.2 → logogram-0.2.0}/web/src/styles/tokens.css +42 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/AttentionView.tsx +50 -44
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/BaselineView.module.css +24 -0
- logogram-0.2.0/web/src/views/BaselineView.tsx +330 -0
- logogram-0.2.0/web/src/views/CircuitResults.tsx +289 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/CompareView.tsx +166 -82
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/ExperimentView.module.css +17 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/ExperimentView.tsx +185 -211
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/ExploreView.tsx +22 -7
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/FeaturesView.module.css +3 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/FeaturesView.tsx +16 -11
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/Forest.module.css +8 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/Forest.tsx +14 -2
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/HeadComparisonView.tsx +25 -7
- logogram-0.2.0/web/src/views/MetricSettings.tsx +123 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/PredictionsView.tsx +9 -6
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/PromptsView.tsx +51 -144
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/ResearchView.tsx +3 -1
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/ResultsView.module.css +24 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/ResultsView.tsx +239 -69
- logogram-0.2.0/web/src/views/SiteSets.module.css +286 -0
- logogram-0.2.0/web/src/views/SiteSetsEditor.tsx +232 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/SpecView.tsx +13 -11
- logogram-0.2.0/web/src/views/StatisticsSettings.tsx +52 -0
- logogram-0.2.0/web/src/views/TaskGenerator.tsx +237 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/views.module.css +12 -0
- logogram-0.2.0/web/tests/a11y.browser.ts +83 -0
- logogram-0.2.0/web/tests/analyses.browser.ts +141 -0
- logogram-0.2.0/web/tests/autosave.unit.ts +231 -0
- logogram-0.2.0/web/tests/circuits.unit.ts +179 -0
- logogram-0.2.0/web/tests/color.unit.ts +29 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/tests/context.unit.ts +55 -2
- logogram-0.2.0/web/tests/form.unit.ts +132 -0
- logogram-0.2.0/web/tests/heatmap.unit.ts +27 -0
- logogram-0.2.0/web/tests/notices.unit.ts +97 -0
- logogram-0.2.0/web/tests/spec.unit.ts +229 -0
- logogram-0.2.0/web/tests/tasks.unit.ts +54 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/tests/workbench.browser.ts +58 -1
- logogram-0.1.2/CHANGELOG.md +0 -94
- logogram-0.1.2/src/logogram/__init__.py +0 -6
- logogram-0.1.2/src/logogram/atp.py +0 -130
- logogram-0.1.2/src/logogram/cli.py +0 -493
- logogram-0.1.2/src/logogram/spec.py +0 -518
- logogram-0.1.2/src/logogram/stats.py +0 -171
- logogram-0.1.2/src/logogram/web_dist/assets/index-Cw0WBZBB.js +0 -54
- logogram-0.1.2/src/logogram/web_dist/assets/index-Dt6ecB66.css +0 -1
- logogram-0.1.2/tests/test_privacy.py +0 -45
- logogram-0.1.2/tests/test_validation_script.py +0 -45
- logogram-0.1.2/web/src/components/Notices.tsx +0 -22
- logogram-0.1.2/web/src/lib/analysis.ts +0 -47
- logogram-0.1.2/web/src/views/BaselineView.tsx +0 -238
- {logogram-0.1.2 → logogram-0.2.0}/LICENSE +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/__main__.py +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/backends/__init__.py +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/examples/ioi-gpt2/.gitignore +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/examples/ioi-gpt2/datasets/ioi.jsonl +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/examples/ioi-gpt2/project.json +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/exports.py +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/ioi.py +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/research.py +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/server/__init__.py +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/updates.py +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/verify.py +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/web_dist/assets/instrument-sans-latin-ext-standard-normal-C5E2Gvlv.woff2 +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/web_dist/assets/instrument-sans-latin-standard-normal-BVScPF0l.woff2 +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/src/logogram/web_dist/favicon.svg +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_cli.py +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_devices.py +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/tests/test_updates.py +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/public/favicon.svg +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/CommandPalette.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/Distribution.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/FolderPicker.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/FolderPicker.tsx +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/Header.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/Heatmap/ScaleBar.tsx +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/History.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/Logogram.tsx +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/LogogramDial.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/LogogramDial.tsx +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/ModelDialog.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/Splitter.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/StatusLine.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/TopBar.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/TopBar.tsx +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/UpdateNotice.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/components/UpdateNotice.tsx +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/lib/canvas.ts +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/lib/heatmapNavigation.ts +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/lib/logogram.ts +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/screens/Welcome.tsx +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/styles/global.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/AttentionView.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/CompareView.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/ExploreView.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/HeadComparisonView.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/PredictionsView.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/ResearchView.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/src/views/SpecView.module.css +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/tests/logogram.unit.ts +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/tsconfig.json +0 -0
- {logogram-0.1.2 → logogram-0.2.0}/web/vite.config.ts +0 -0
|
@@ -31,12 +31,15 @@ traceability come before features.
|
|
|
31
31
|
|
|
32
32
|
## Science rules
|
|
33
33
|
|
|
34
|
-
* The experiment spec (`src/logogram/spec.py`) is the single source of truth. The app
|
|
35
|
-
`logogram run` execute the same spec through `logogram.runner.run_spec`;
|
|
36
|
-
that only one of them uses.
|
|
34
|
+
* The experiment spec (`src/logogram/spec.py`) is the single source of truth. The app,
|
|
35
|
+
`logogram run` and the Python API execute the same spec through `logogram.runner.run_spec`;
|
|
36
|
+
never add a code path that only one of them uses.
|
|
37
37
|
* Every choice that can change a number lives in the spec and is shown in the UI: direction,
|
|
38
|
-
baseline, site, position, metric, normalization, seeds, batch size, dtype, model
|
|
39
|
-
Nothing methodological is silently defaulted
|
|
38
|
+
baseline, site, position, metric, normalization, seeds, clustering, batch size, dtype, model
|
|
39
|
+
revision. Nothing methodological is silently defaulted: a version 2 spec states every such
|
|
40
|
+
field, and a new one is required (with the value that reproduces earlier behavior filled in
|
|
41
|
+
for version 1 specs by `upgrade_v1`, listed when it was a choice). Ablation has no default
|
|
42
|
+
baseline.
|
|
40
43
|
* Specs use abstract sites (`resid_pre`, `resid_mid`, `resid_post`, `attn_out`, `mlp_out`,
|
|
41
44
|
`head`). Library hook names appear only inside a backend (`src/logogram/backends/`).
|
|
42
45
|
* Keep per-prompt values. Statistics come from them: n, mean, SD, a seeded percentile bootstrap
|
|
@@ -92,11 +95,14 @@ traceability come before features.
|
|
|
92
95
|
|
|
93
96
|
```text
|
|
94
97
|
src/logogram/
|
|
95
|
-
spec.py experiment spec (pydantic)
|
|
98
|
+
spec.py experiment spec (pydantic); version 1 specs are upgraded here
|
|
96
99
|
datasets.py, ioi.py JSONL datasets and the IOI generator
|
|
97
|
-
|
|
100
|
+
tasks.py seeded datasets for the other tasks (greater-than, docstring, ...)
|
|
101
|
+
prompts.py tokenization, alignment checks, length groups, seeded splits
|
|
102
|
+
metrics.py the metrics: answers, answer sets and continuations, scored per prompt
|
|
98
103
|
sites.py scope expansion and result layouts
|
|
99
104
|
engine.py the sweep: captures, patches, streams per layer, cancels; routes methods
|
|
105
|
+
circuits.py sets of sites intervened on at once, faithfulness and minimality
|
|
100
106
|
direct.py direct logit attribution
|
|
101
107
|
atp.py attribution patching (first-order estimates of patching)
|
|
102
108
|
verify.py the spec that verifies an estimate by patching its strongest sites
|
|
@@ -104,12 +110,14 @@ src/logogram/
|
|
|
104
110
|
paths.py path patching
|
|
105
111
|
features.py SAE features: patching and attribution patching
|
|
106
112
|
sae.py SAE encode, decode and fit
|
|
107
|
-
stats.py bootstrap
|
|
113
|
+
stats.py bootstrap (over prompts or clusters), bands, q-values, paired differences
|
|
108
114
|
results.py summary.json and results.parquet
|
|
109
115
|
schema.py schemas for run files, history listings and live events
|
|
110
116
|
fileio.py atomic writes that never follow symlinks
|
|
111
|
-
runner.py run a spec end to end (used by the app and the
|
|
112
|
-
|
|
117
|
+
runner.py run a spec end to end (used by the app, the CLI and the Python API)
|
|
118
|
+
robustness.py the spec that reruns a run with one choice changed
|
|
119
|
+
compare.py run comparisons, paired prompt by prompt where they can be
|
|
120
|
+
api.py the Python API for notebooks (imported lazily by logogram/__init__.py)
|
|
113
121
|
analysis.py token strip, baseline check, attention patterns
|
|
114
122
|
backends/ ModelBackend interface, TransformerLens backend, Hugging Face access,
|
|
115
123
|
published SAE formats
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
What changed in each version of Logogram.
|
|
4
|
+
|
|
5
|
+
## 0.2.0 (2026-10-11)
|
|
6
|
+
|
|
7
|
+
Specs that state every choice, more metrics, circuits, five more tasks, statistics that hold across
|
|
8
|
+
many sites, a Python API and more commands, Gemma Scope 2 and transcoders, and integrated
|
|
9
|
+
gradients, all checked by patching.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **Specs are version 2.** Every choice that can change a number must be stated: the model's
|
|
14
|
+
revision, dtype, device and weight processing, the dataset's hash and limit, tokenization, the
|
|
15
|
+
metric, the statistics (bootstrap, interval, seed, clustering) and the batch size, and every
|
|
16
|
+
field of an ablation's baseline and a sweep's positions. A version 1 spec still runs: where it
|
|
17
|
+
leaves a choice out, it takes version 1's value, the run's first warning lists each one, and
|
|
18
|
+
`logogram validate` shows the list without running.
|
|
19
|
+
- Spec paths must lie inside the project, and an SAE's revision must be a commit, tag or branch.
|
|
20
|
+
- Seeds must be whole numbers from 0 to 2³² − 1; a negative or huge seed used to crash a run.
|
|
21
|
+
- Sign flips count prompts whose preference for the answer, log P(answer) − log P(distractor),
|
|
22
|
+
changes sign (for single tokens that is the logit difference, as before).
|
|
23
|
+
- Attribution patching no longer reports patched logit differences, probabilities and sign flips
|
|
24
|
+
computed from first-order estimates; like direct logit attribution, it leaves them empty.
|
|
25
|
+
- The count of prompts with an effect of the opposite sign ignores rounding noise, so a site with
|
|
26
|
+
no effect no longer reads as half opposite.
|
|
27
|
+
- Steering compares each strength with its random control prompt by prompt, from the same
|
|
28
|
+
resamples, and doing significantly *less* than the control no longer counts as beating it.
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- **Metrics:** the log-probability difference, the answer's log-probability, its probability,
|
|
33
|
+
the probability difference and the KL divergence from the clean or corrupt prompt's next-token
|
|
34
|
+
distribution, beside the logit difference. Every run also keeps each prompt's answer
|
|
35
|
+
probability and preference.
|
|
36
|
+
- **Answer sets and continuations:** an answer or distractor can be a list of single tokens, read
|
|
37
|
+
as one answer (every later year in greater-than), or text of several tokens, read token by
|
|
38
|
+
token. Patching at every position covers the continuation too.
|
|
39
|
+
- **Sets of sites:** intervene on several sites at once, or on everything except a set ("keep
|
|
40
|
+
the circuit, replace the rest"), and read each set's faithfulness (how much of the behavior the
|
|
41
|
+
kept sites carry alone), the share of removing a set (how complete a circuit is), the
|
|
42
|
+
faithfulness each site adds (minimality) and the interaction of two sites, all with intervals.
|
|
43
|
+
- **Tasks:** seeded datasets for greater-than, docstring, gendered pronouns, subject–verb
|
|
44
|
+
agreement and capital cities, beside IOI, each with templates of one token length, named
|
|
45
|
+
positions and the metric that reads them, from the app, `logogram generate` or Python.
|
|
46
|
+
- **Integrated gradients** for attribution patching (as in EAP-IG): the gradient is averaged over
|
|
47
|
+
steps between the two prompts' embeddings, which corrects much of what one gradient misses.
|
|
48
|
+
Its estimates are verified by patching like any others.
|
|
49
|
+
- **Statistics across many sites:** simultaneous bands that hold for every site of a sweep at
|
|
50
|
+
once, Benjamini–Hochberg q-values, a bootstrap that resamples clusters of prompts (such as
|
|
51
|
+
templates, with a warning when there are too few), and paired differences between two runs on
|
|
52
|
+
the same prompts.
|
|
53
|
+
- **The every-feature sweep can choose its strongest features on a seeded share of the prompts
|
|
54
|
+
and report them on the rest**, so their effects aren't biased by the choice.
|
|
55
|
+
- **Gemma Scope 2** SAEs and transcoders (`config.json` and `params.safetensors`), EleutherAI
|
|
56
|
+
transcoders, and SAEs on attention heads' outputs. Transcoder features are read from an MLP's
|
|
57
|
+
input and patched in its output.
|
|
58
|
+
- **A Python API for notebooks:** `logogram.run`, `load_run`, `list_runs`, `compare_runs`,
|
|
59
|
+
`verify_run`, `check_robustness`, `generate` and `write_dataset`, with tables as pandas or
|
|
60
|
+
Arrow and runs that show their heatmap in a notebook. Importing `logogram` loads no PyTorch.
|
|
61
|
+
- **Commands:** `list`, `show`, `compare`, `diff`, `verify`, `robustness`, `export`, `validate`,
|
|
62
|
+
`tasks` and `generate`.
|
|
63
|
+
- **In the app,** every new choice is in the experiment form, which says before a run what the
|
|
64
|
+
prompts and the method allow; staged sites can be tested as a circuit, two sites checked for
|
|
65
|
+
their interaction, and a run's strongest sites tested as nested circuits, with a chart of
|
|
66
|
+
faithfulness against circuit size; results show simultaneous bands, q-values, clusters and
|
|
67
|
+
paired comparisons; and **Prompts → Generate a task** writes any task's dataset and offers the
|
|
68
|
+
metric that reads it.
|
|
69
|
+
- **The web app** contains errors to the part of the page that failed, with a way to reload it
|
|
70
|
+
and copy the details; undoes and redoes changes to the experiment form (Ctrl/⌘ Z), says when an
|
|
71
|
+
action replaces the form and offers to undo it, and keeps an unsaved form for each project; asks
|
|
72
|
+
before cancelling a run; and lists every shortcut on **?**. Radio groups take one tab stop and
|
|
73
|
+
arrow keys, form fields have visible edges in both themes, and the status line announces a
|
|
74
|
+
run's milestones rather than every tick.
|
|
75
|
+
|
|
76
|
+
### Fixed
|
|
77
|
+
|
|
78
|
+
- **Path patching with head receivers and the logits receiver measured only the logits path.**
|
|
79
|
+
The logits receiver now adds its change to what the head receivers changed, so the two together
|
|
80
|
+
measure both paths (checked against each alone).
|
|
81
|
+
- A metric or gap that isn't a finite number, as a 16-bit overflow gives, stops the run with the
|
|
82
|
+
reason instead of finishing with empty effects; patched values that aren't finite are reported.
|
|
83
|
+
- A failed run's saved error no longer contains this machine's paths (the home folder, the
|
|
84
|
+
Hugging Face cache or the project folder).
|
|
85
|
+
- Running out of memory during a run says to lower `execution.batch_size`, and frees the memory.
|
|
86
|
+
- Memory: gradient methods no longer keep what weight gradients would need; attribution patching
|
|
87
|
+
computes each layer's terms once per batch instead of once per site; on a GPU, a layer's
|
|
88
|
+
captured activations move to CPU memory when they would take more than a quarter of what is
|
|
89
|
+
free; an SAE's fit is measured a chunk of tokens at a time; and the memory estimate counts what
|
|
90
|
+
gradient methods and path patching hold.
|
|
91
|
+
- A deeply nested or very large file in a shared project no longer stops the project or its
|
|
92
|
+
history from opening; it shows up as an error on that run or dataset.
|
|
93
|
+
- The server checks which project a tab shows on the SAE routes too, a tab whose session has
|
|
94
|
+
expired stops reconnecting, unloading a model waits for work in progress, and cancelling a run
|
|
95
|
+
no longer waits behind queued analyses.
|
|
96
|
+
- The token strip shows a run's own prompts again when you return to its results, instead of
|
|
97
|
+
the experiment form's.
|
|
98
|
+
- Heatmaps and the model map draw hover and selection on a layer of their own, and find cells
|
|
99
|
+
through a map, so large sweeps no longer redraw everything on every mouse move.
|
|
100
|
+
- Every view has one top-level heading, with the headings below it in order, and the inspector's
|
|
101
|
+
resize handle belongs to the inspector, so screen reader users can move through each page by
|
|
102
|
+
its headings and landmarks.
|
|
103
|
+
- Pydantic before 2.10 no longer warns about a field named `model_id` when Logogram starts.
|
|
104
|
+
- Text on data colors (heatmap values, the model map's labels and a feature's token highlights)
|
|
105
|
+
is black or white, whichever contrasts more; some mid-tone cells in the black theme had light
|
|
106
|
+
text below the 4.5:1 that small text needs.
|
|
107
|
+
|
|
108
|
+
### Development
|
|
109
|
+
|
|
110
|
+
- **A weekly check against published results:** the Golden workflow runs every method on GPT-2
|
|
111
|
+
small's real weights and checks the bundled example against its indirect-object circuit (Wang
|
|
112
|
+
et al. 2022): the name movers, S-inhibition and induction heads restore the answer, the negative
|
|
113
|
+
name movers work against it, and the name movers write the answer most directly.
|
|
114
|
+
- CI type-checks the package with pyright, lints with ruff's security, async and blind-except
|
|
115
|
+
rules too, checks the lockfile, keeps coverage at 85% or more, tests at the lowest declared
|
|
116
|
+
dependency versions, audits Python and web dependencies, and pins its actions to commits;
|
|
117
|
+
Dependabot and CodeQL watch them. Typer 0.13 or later is required.
|
|
118
|
+
- The browser checks also run in the dark theme, and an axe scan of every view fails on any
|
|
119
|
+
accessibility violation. The inspector's resize handle now says its width to assistive
|
|
120
|
+
technology, and commands wider than their box can be scrolled from the keyboard.
|
|
121
|
+
- The privacy check also reads binary files and catches more home paths and short usernames.
|
|
122
|
+
- What 0.2 added was checked on GPT-2 small's real weights (see Models in the README).
|
|
123
|
+
|
|
124
|
+
## 0.1.2 (2026-10-08)
|
|
125
|
+
|
|
126
|
+
Fixes and checks that came out of validating every method on real weights.
|
|
127
|
+
|
|
128
|
+
### Changed
|
|
129
|
+
|
|
130
|
+
- On Apple Silicon, **Automatic** runs models on the CPU. TransformerLens reports that Apple's MPS
|
|
131
|
+
can give silently wrong results, and Logogram hasn't been checked on it yet, so MPS runs only when
|
|
132
|
+
you choose it; the system check and the model dialog say why.
|
|
133
|
+
|
|
134
|
+
### Added
|
|
135
|
+
|
|
136
|
+
- **Check robustness** reruns a float16 or bfloat16 run in float32 and compares the two.
|
|
137
|
+
- When processing a model's weights is what doesn't fit, the model dialog offers to turn it off.
|
|
138
|
+
- When a generated IOI dataset has names the loaded model splits into several tokens, one click
|
|
139
|
+
makes a new one with names it doesn't.
|
|
140
|
+
- Steering results say when the direction does no more than its random control at any site and
|
|
141
|
+
strength.
|
|
142
|
+
- Attribution patching of residual stream sites warns that it can miss effects there, and that
|
|
143
|
+
**Check robustness** patches every site.
|
|
144
|
+
- `scripts/validate_real_weights.py` runs every method on a real model and checks identities,
|
|
145
|
+
agreement and bit-identical reruns, on one device or two. It is how a release, or Apple's MPS, is
|
|
146
|
+
checked.
|
|
147
|
+
|
|
148
|
+
### Fixed
|
|
149
|
+
|
|
150
|
+
- The baseline says that the clean prompts prefer the distractor, instead of preferring the answer
|
|
151
|
+
by a negative amount.
|
|
152
|
+
|
|
153
|
+
### Development
|
|
154
|
+
|
|
155
|
+
- Tests run on Python 3.14 too, and the Linux runners are pinned to Ubuntu 24.04.
|
|
156
|
+
- The test client uses httpx2, as Starlette recommends.
|
|
157
|
+
|
|
158
|
+
## 0.1.1 (2026-10-08)
|
|
159
|
+
|
|
160
|
+
Every method has now run end to end on real weights: GPT-2 small with a SAELens and an OpenAI
|
|
161
|
+
SAE, Pythia-70m with an EleutherAI SAE, and Qwen 2.5 0.5B. This release fixes what that turned up.
|
|
162
|
+
|
|
163
|
+
### Fixed
|
|
164
|
+
|
|
165
|
+
- Runs work on Apple Silicon. Every method converted tensors to float64 on the model's device,
|
|
166
|
+
which Apple's Metal (MPS) doesn't have, so no run got past its baseline on a Mac. This still
|
|
167
|
+
needs a check on a Mac.
|
|
168
|
+
- A model whose own forward pass overflows in the chosen dtype (Pythia in float16) is refused, with
|
|
169
|
+
the dtype to use. Its load checks used to read as passed.
|
|
170
|
+
- When processing a model's weights doesn't fit in memory, loading says so and frees the memory,
|
|
171
|
+
instead of failing with a raw CUDA error and keeping it.
|
|
172
|
+
- The memory estimate counts weight processing, which needs three to four times the float32 size
|
|
173
|
+
of the weights while the model loads. Qwen 2.5 0.5B on a 6 GB GPU now reads "won't fit" with
|
|
174
|
+
processing and "fits" without it.
|
|
175
|
+
- Models without a beginning-of-sequence token, such as Qwen, run without one, as documented.
|
|
176
|
+
TransformerLens 4 had given them its end-of-text token instead.
|
|
177
|
+
- Models and SAEs that Logogram downloaded open offline without a revision, and offline memory
|
|
178
|
+
estimates use the model's real size.
|
|
179
|
+
- `logogram run` reports an identical rerun of direct logit attribution or attribution patching as
|
|
180
|
+
identical.
|
|
181
|
+
- Direct logit attribution in float16 and bfloat16 no longer warns about drift that is only
|
|
182
|
+
rounding.
|
|
183
|
+
|
|
184
|
+
### Added
|
|
185
|
+
|
|
186
|
+
- Runs warn when the model prefers the distractor on the clean prompts, so it doesn't show the
|
|
187
|
+
behavior they test (Pythia-70m on IOI).
|
|
188
|
+
- The model dialog shows the memory that weight processing needs. Qwen 2.5 0.5B is marked as
|
|
189
|
+
tested.
|
|
190
|
+
- Project links on PyPI, and this changelog, which the update notice links to.
|
|
191
|
+
|
|
192
|
+
### Documentation
|
|
193
|
+
|
|
194
|
+
- What has been validated with real weights, and where attribution patching is least reliable:
|
|
195
|
+
residual stream sites at the token that differs between the prompts.
|
|
196
|
+
- Steering needs prompt pairs that differ the same way; IOI prompts that mix the ABBA and BABA
|
|
197
|
+
orders cancel out.
|
|
198
|
+
- What float16 and bfloat16 do to results, and how weight processing changes heads' direct effects.
|
|
199
|
+
|
|
200
|
+
## 0.1.0 (2026-10-08)
|
|
201
|
+
|
|
202
|
+
First public release.
|
|
203
|
+
|
|
204
|
+
- Activation patching, ablation (zero, mean or resample), direct logit attribution, attribution
|
|
205
|
+
patching verified by patching, steering with a random control, path patching, and SAE features,
|
|
206
|
+
all described by one spec that the app and `logogram run` execute the same way.
|
|
207
|
+
- Every model is checked when it loads: that TransformerLens reproduces its predictions, how its
|
|
208
|
+
layers add into the residual stream, and whether the logit lens reproduces its output.
|
|
209
|
+
- Per-prompt values with seeded bootstrap intervals, and bit-identical reruns on the same machine.
|
|
210
|
+
- The workbench: Explore, Experiment and Evidence, logograms written by results, robustness checks
|
|
211
|
+
and run comparisons.
|
|
212
|
+
- Local-first: no account and no telemetry, safetensors weights only, and an update check that
|
|
213
|
+
runs only when you allow it.
|