技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
residual_logit_lens【数据与研究】Apply logit-lens unembedding and additive residual contribution checks for mechanistic transformer circuit analysis.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when you need to inspect how a transformer's residual stream or named additive residual components affect output logits. It is appropriate for attention-only or simplified transformer-circuit analysis where the residual stream is treated as a linear communication channel. Do not use it as a standalone causal proof when component activations are not defined.
positions x features.features x vocabulary.logits = residual @ unembedding.component @ unembedding.Run python tests/test_logit_lens.py or validate the full tree with:
python /share/project/yuyang/workspace/Paper2Skills/Distiller/skills/module-to-skill/scripts/validate_skill_tree.py <skill_dir> --run-tests
This skill uses standard-library Python lists for tiny or moderate matrices. For large models, use the same contracts with a tensor library and avoid materializing unnecessary dense intermediates.