Spaces:
Running
Running
Commit History
-
Fixed ablation experiments, drilled down on which pre-loaded ones to run
3d71d04
-
Bug fix: type issue with models leading to gibberish outputs
5528a77
-
Added numbers to BertViz visualization, easier to map attention head numbers
67f5be3
-
added color swatches for easy mapping from attention categories to BertViz
96e2bc7 -
Fixed model-switching bug with activation store clearing
7ad3e7b
-
Attention refactor, better categorization and explanation
7fa8fb4
-
ablation experiment fixes, better UI and full sequence comparison
a938eeb
-
feat(output): Add token scrubber with per-position top-5 next-token probabilities
Co-authored-by: Cursor <cursoragent@cursor.com>d60cfe2
-
chore: remove unused code, imports, and deprecated functions
- Delete components/tokenization_panel.py (superseded by pipeline.py) - Remove 6 unused imports from app.py - Remove deprecated _get_top_attended_tokens() and references - Remove unused create_stage_summary() from pipeline.py - Remove 7 unused utility functions from model_patterns.py and beam_search.py - Update utils/__init__.py exports and README.md Total: ~1,087 lines removed. All 81 tests pass. Co-authored-by: Cursor <cursoragent@cursor.com>2965a7d -
conductor setup
aabd66e
-
conductor(checkpoint): Checkpoint end of Phase 3: Visualization & Feedback Loop
72f82a4 -
conductor(checkpoint): Checkpoint end of Phase 2: Frontend Control Panel
24bd049 -
feat(ablation): Unify ablation execution into execute_forward_pass
2f4e4f3 -
Fix multi-layer ablation to ablate all heads simultaneously
ae08976
-
Switch attention viz to head_view and add categorization (Agent D)
ef749ae
-
heatmap implementation
ac745db
-
Ablation updated for full sequence, needs refactor for front-end and workflow
2ad1c2e
-
Fixed errors for beam search refactor
c19d5a8
-
Fix meta tensor error in safe_to_serializable
- Wrap device.type check in try-except to handle RuntimeError - Prevents 'Tensor on device meta is not on the expected device cpu!' error - Returns None for problematic meta tensors instead of crashing1f5efac -
Update layer highlighting to 100% threshold for actual output token only
- Changed detect_significant_probability_increases to only check actual output token instead of all top 5 tokens - Updated threshold from 50% to 100% (doubled probability) for highlighting layers - Modified compute_layer_wise_summaries to accept activation_data and extract actual output token - Updated all calls to compute_layer_wise_summaries in app.py to pass activation_data - Added _create_actual_output_display helper function to show actual model output - Display actual output token below final output graphs (normal mode, ablation mode, comparison mode) - Added tooltip explaining why actual output may differ from highest probability token in final layer due to residual connections - Updated graph tooltip text to reflect 100% threshold change9d22c3c
-
Clean up: fix significant layer threshold to 50%, remove unused logit lens parameter, remove certainty calculations
a4e6de8
-
Fix ablation: add attention_modules to session store so ablation can find attention layers
efbe4ad
-
Add comprehensive debugging to ablation data flow
a1ae11e -
Fix ablation: capture ablated attention module output to populate layer data
455f0c2 -
Reorganize Layer-by-Layer Predictions: move diagram to main container, reorder sections, update arrows, increase threshold to 75%
c127d17 -
Fix token predictions not being collected - changed condition to check for block_outputs and norm_parameters instead of logit_lens_parameter
d6f21db
-
Phase 1: Backend infrastructure for token merging, layer-wise tracking, and head ablation
- Added merge_token_probabilities() to sum probabilities of tokens with/without leading space - Added compute_global_top5_tokens() to get top 5 from final model output - Updated logit_lens_transformation() to return merged probabilities - Updated get_check_token_probabilities() to sum token variant probabilities - Added detect_significant_probability_increases() to find layers with >=25%% relative increase - Added _get_token_probabilities_for_layer() helper for tracking specific tokens - Updated extract_layer_data() to track global top 5 across all layers with deltas - Added compute_layer_wise_summaries() to create convenient summary structures - Added execute_forward_pass_with_head_ablation() to zero out specific attention heads - Updated execute_forward_pass() and execute_forward_pass_with_layer_ablation() to include global_top5_tokens - All functions exported and properly integratedac1a7df
-
Fix experiments section visibility and improve ablation logic - Fix experiments section callback to show properly after analysis - Change mean ablation to use mean across ALL layers and tokens (not just selected layer) - Update UI description to clarify meaningless mean activation - Remove prevent_initial_call to ensure proper initialization
1e7c9a1 -
Add Experiments panel with mean ablation feature - Remove Divergent Layers summary from comparison panel (keep badges) - Add collapsible Experiments section after analysis - Implement Ablation Study with layer selection buttons - Add mean ablation function to replace layer activations with mean - Run ablation on both prompts and update results - Gray out ablated layer in accordion with visual indicator - Add CSS styling for experiments panel and ablated layers
67f8e53
-
Fix meta tensor serialization error in safe_to_serializable
0e396c0 -
Add attention head categorization with colored badges to each layer accordion
0b846ef -
Fix attention view display: always show section, remove Analysis Results, add debugging
4cd795f -
Add simplified attention view with top-3 attended tokens and BertViz toggle button
977a3ff -
feat: Add top-5 predictions with deltas, certainty meter, and bar charts in accordion panels
1221d69
-
Fix accordion data flow and remove all legacy Cytoscape code
- Fixed root cause: Added missing fields (block_modules, block_outputs, logit_lens_parameter, norm_parameters) to session-activation-store - Removed all Cytoscape visualization code and components - Removed unused functions: format_data_for_cytoscape, _create_node, _create_edge, _highlight_divergent_layers, token_to_color, and edge tooltip callbacks - Simplified callback signatures and return values - Cleaned up imports (removed dash_cytoscape) - Updated main_panel.py to show only accordion-based layer view - Accordions now populate correctly with layer predictions44b60b5 -
Replace Cytoscape with accordion-based layer view
- Added html.Details/Summary accordion panels for each layer - Display plain-language headers: 'Layer L{N}: likely {token} (p={prob})' - Added token chips showing top-3 predictions between layers - Gated old Cytoscape graph behind USE_LEGACY_CYTOSCAPE feature flag - Added CSS for accordion styling with ellipsis truncation - Created extract_layer_data() utility function - All panels closed by default for compact flow view5c05f37
-
Refactor Check Token: Replace 4th edge with probability line graph
431ab15 -
Implement edge hover tooltips with floating divs for better UX
2588505 -
Replace edge hover info with tooltip bubbles on visualization
78bb537
-
Fix BertViz category visualization tensor stacking error and add head index labels
d0dc16d -
Feature update: Reorganize attention head categorization with BertViz visualizations for each category
8e9f963 -
Feature update: Check token now tries both with/without leading space and uses higher probability variant
7c6af85 -
Feature 4: Replace BertViz head_view with model_view for hierarchical attention visualization
d5dc3e0 -
Feature updates: collapsible sidebar, toggle compare button, check token submit button, fix second graph visibility, improve check token debug output
3bbf674 -
Add check token feature with 4th edge and minimum opacity
08f5ebe -
Using final layer output instead of mlp for simpler computation
f33c95a
-
simplified vocab space projection
1dd1822 -
Added model config for automatic model parameter detection
c6cb681
-
Uses pyvene instead of just pytorch hooks, setting up for activation patching
7fd64d2
-
Full visualization reorganization, handles model selection, parameter selection, visualizes graphs w/ bertviz onclick
1a93ca4