Spaces:
Sleeping
Sleeping
Commit History
-
Wire QK decomposition weight types into primary pipelineβ
W_Q_gram, W_K_gram, QK_alignment are already computed in head_analyzer.py. This commit exposes weight_types through config.yaml β run_primary.py β process_model() β primary.smk so they can be overridden at runtime. Tests updated to cover all 6 weight types; histogram test restricted to raw weight types since gram entries exceed standard bin range. compute_qk_decomposition.py removed (data now lives in primary dataset). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a07e79a -
Rename src modules for head/pair symmetry; add pair_figures.smk; split eval_metricsβ
src/transformer_analysis/: weight_analysis β head_pipeline attn_head_analysis β head_analyzer metrics β head_metrics correlation_analysis β pair_pipeline head_correlations β pair_analyzer eval_metrics.py (new β implementation extracted from compute_perplexity.py) scripts/: plot_correlations.py β plot_pair_correlations.py plot_corr_figures.py β plot_pair_correlations_batch.py compute_perplexity.py β deleted (impl in eval_metrics; thin wrapper run_eval.py) run_eval.py (new thin wrapper) rules/: correlations.smk β switched to sentinel output (consistent with other rules) pair_figures.smk (new β regenerate pair figures from .npz without re-running correlations) eval.smk β updated to call run_eval.py Snakefile: added correlations_all, pair_figures_all convenience targets Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a81fd74 -
feat: add Snakemake pipeline, MLflow tracking, metrics refactor, testsβ
Pipeline / workflow: - Snakefile + config.yaml orchestrate primary β transform β merge stages - rules/primary.smk, transform.smk, correlations.smk, merge.smk - Sentinel-file pattern (done/*.done) avoids directory-output conflicts - Incremental cross-model merge: appends new models without clobbering; --refresh flag for explicit replacement after re-transform - Per-model checkpoint merge rule for Pythia step-collapse CLI wrappers (scripts/): - run_primary.py β process_model() + MLflow logging - run_transform.py β reprocess_metrics() + MLflow logging (git sha tagged) - run_correlations.py β thin wrapper for run_multi_circuit_analysis() - run_merge.py β cross-model incremental merge + checkpoint merge Metrics refactor: - src/transformer_analysis/metrics.py: canonical home for all stat functions, bin configs, normality_metrics, singular_value_metrics, and adaptive binning helpers (make_weight_bins, make_sv_bins) - histogram_utils.py: backward-compat re-export shim; no logic cβ¦24e1932