[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-openai--automated-interpretability":3,"tool-openai--automated-interpretability":65},[4,17,27,35,48,57],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",151918,2,"2026-04-12T11:33:05",[13,14,15],"开发框架","Agent","语言模型","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,3,"2026-04-06T11:19:32",[15,26,14,13],"图像",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":10,"last_commit_at":33,"category_tags":34,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":10,"last_commit_at":41,"category_tags":42,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",85092,"2026-04-10T11:13:16",[26,43,44,45,14,46,15,13,47],"数据工具","视频","插件","其他","音频",{"id":49,"name":50,"github_repo":51,"description_zh":52,"stars":53,"difficulty_score":54,"last_commit_at":55,"category_tags":56,"status":16},5784,"funNLP","fighting41love\u002FfunNLP","funNLP 是一个专为中文自然语言处理（NLP）打造的超级资源库，被誉为\"NLP 民工的乐园”。它并非单一的软件工具，而是一个汇集了海量开源项目、数据集、预训练模型和实用代码的综合性平台。\n\n面对中文 NLP 领域资源分散、入门门槛高以及特定场景数据匮乏的痛点，funNLP 提供了“一站式”解决方案。这里不仅涵盖了分词、命名实体识别、情感分析、文本摘要等基础任务的标准工具，还独特地收录了丰富的垂直领域资源，如法律、医疗、金融行业的专用词库与数据集，甚至包含古诗词生成、歌词创作等趣味应用。其核心亮点在于极高的全面性与实用性，从基础的字典词典到前沿的 BERT、GPT-2 模型代码，再到高质量的标注数据和竞赛方案，应有尽有。\n\n无论是刚刚踏入 NLP 领域的学生、需要快速验证想法的算法工程师，还是从事人工智能研究的学者，都能在这里找到急需的“武器弹药”。对于开发者而言，它能大幅减少寻找数据和复现模型的时间；对于研究者，它提供了丰富的基准测试资源和前沿技术参考。funNLP 以开放共享的精神，极大地降低了中文自然语言处理的开发与研究成本，是中文 AI 社区不可或缺的宝藏仓库。",79857,1,"2026-04-08T20:11:31",[15,43,46],{"id":58,"name":59,"github_repo":60,"description_zh":61,"stars":62,"difficulty_score":54,"last_commit_at":63,"category_tags":64,"status":16},5773,"cs-video-courses","Developer-Y\u002Fcs-video-courses","cs-video-courses 是一个精心整理的计算机科学视频课程清单，旨在为自学者提供系统化的学习路径。它汇集了全球知名高校（如加州大学伯克利分校、新南威尔士大学等）的完整课程录像，涵盖从编程基础、数据结构与算法，到操作系统、分布式系统、数据库等核心领域，并深入延伸至人工智能、机器学习、量子计算及区块链等前沿方向。\n\n面对网络上零散且质量参差不齐的教学资源，cs-video-courses 解决了学习者难以找到成体系、高难度大学级别课程的痛点。该项目严格筛选内容，仅收录真正的大学层级课程，排除了碎片化的简短教程或商业广告，确保用户能接触到严谨的学术内容。\n\n这份清单特别适合希望夯实计算机基础的开发者、需要补充特定领域知识的研究人员，以及渴望像在校生一样系统学习计算机科学的自学者。其独特的技术亮点在于分类极其详尽，不仅包含传统的软件工程与网络安全，还细分了生成式 AI、大语言模型、计算生物学等新兴学科，并直接链接至官方视频播放列表，让用户能一站式获取高质量的教育资源，免费享受世界顶尖大学的课堂体验。",79792,"2026-04-08T22:03:59",[46,26,43,13],{"id":66,"github_repo":67,"name":68,"description_en":69,"description_zh":70,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":69,"owner_location":69,"owner_email":69,"owner_twitter":69,"owner_website":80,"owner_url":81,"languages":82,"stars":105,"forks":106,"last_commit_at":107,"license":69,"difficulty_score":98,"env_os":79,"env_gpu":108,"env_ram":108,"env_deps":109,"category_tags":112,"github_topics":69,"view_count":10,"oss_zip_url":69,"oss_zip_packed_at":69,"status":16,"created_at":113,"updated_at":114,"faqs":115,"releases":161},6909,"openai\u002Fautomated-interpretability","automated-interpretability",null,"automated-interpretability 是一套源自 OpenAI 研究论文“语言模型可以解释语言模型中的神经元”的开源代码与工具集。它旨在解决大型语言模型内部运作机制不透明的难题，通过自动化手段生成、模拟并评分对模型中单个神经元行为的自然语言解释，让原本黑盒般的神经网络变得可被人类理解。\n\n这套工具特别适合 AI 研究人员、开发者以及对模型可解释性感兴趣的技术人员使用。借助 automated-interpretability，用户不仅能运行算法自动分析神经元激活模式，还能利用配套的在线查看器直观浏览神经元的激活情况及其对应的解释文本。此外，项目还公开了针对 GPT-2 XL 和 GPT-2 Small 模型的大规模数据集，包含详细的神经元激活记录、生成的解释结果、相关神经元连接以及关键令牌（token）的权重分析等丰富信息。\n\n其独特亮点在于将复杂的神经元行为转化为可读的文字描述，并结合量化评分验证解释的准确性，为深入探究语言模型内部逻辑提供了系统化方法。无论是希望调试模型行为的研究者，还是试图提升模型透明度的工程师，都能从中获得宝贵支持。","# Automated interpretability\n\n## Code and tools\n\nThis repository contains code and tools associated with the [Language models can explain neurons in\nlanguage models](https:\u002F\u002Fopenaipublic.blob.core.windows.net\u002Fneuron-explainer\u002Fpaper\u002Findex.html) paper, specifically:\n\n* Code for automatically generating, simulating, and scoring explanations of neuron behavior using\nthe methodology described in the paper. See the\n[neuron-explainer README](neuron-explainer\u002FREADME.md) for more information.\n\nNote: if you run into errors of the form \"Error: Could not find any credentials that grant access to storage account: 'openaipublic' and container: 'neuron-explainer'\".\" you might be able to fix this by signing up for an azure account and specifying the credentials as described in the error message. \n\n* A tool for viewing neuron activations and explanations, accessible\n[here](https:\u002F\u002Fopenaipublic.blob.core.windows.net\u002Fneuron-explainer\u002Fneuron-viewer\u002Findex.html). See\nthe [neuron-viewer README](neuron-viewer\u002FREADME.md) for more information.\n\n## Public datasets\n\nTogether with this code, we're also releasing public datasets of GPT-2 XL neurons and explanations.\nHere's an overview of those datasets.  \n\n* Neuron activations: `az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fdata\u002Fcollated-activations\u002F{layer_index}\u002F{neuron_index}.json`\n    - Tokenized text sequences and their activations for the neuron. We\n    provide multiple sets of tokens and activations: top-activating ones, random\n    samples from several quantiles; and a completely random sample. We also provide\n    some basic statistics for the activations.\n    - Each file contains a JSON-formatted\n    [`NeuronRecord`](neuron-explainer\u002Fneuron_explainer\u002Factivations\u002Factivations.py#L89) dataclass.\n* Neuron explanations: `az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fdata\u002Fexplanations\u002F{layer_index}\u002F{neuron_index}.jsonl`\n    - Scored model-generated explanations of the behavior of the neuron, including simulation results.\n    - Each file contains a JSON-formatted\n    [`NeuronSimulationResults`](neuron-explainer\u002Fneuron_explainer\u002Fexplanations\u002Fexplanations.py#L146)\n    dataclass.\n* Related neurons: `az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fdata\u002Frelated-neurons\u002Fweight-based\u002F{layer_index}\u002F{neuron_index}.json`\n    - Lists of the upstream and downstream neurons with the most positive and negative connections (see below for definition).\n    - Each file contains a JSON-formatted dataclass whose definition is not included in this repo.\n* Tokens with high average activations:\n`az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fdata\u002Frelated-tokens\u002Factivation-based\u002F{layer_index}\u002F{neuron_index}.json`\n    - Lists of tokens with the highest average activations for individual neurons, and their average activations.\n    - Each file contains a JSON-formatted [`TokenLookupTableSummaryOfNeuron`](neuron-explainer\u002Fneuron_explainer\u002Factivations\u002Ftoken_connections.py#L36)\n    dataclass.\n* Tokens with large inbound and outbound weights:\n`az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fdata\u002Frelated-tokens\u002Fweight-based\u002F{layer_index}\u002F{neuron_index}.json`\n    - List of the most-positive and most-negative input and output tokens for individual neurons,\n    as well as the associated weight (see below for definition). \n    - Each file contains a JSON-formatted [`WeightBasedSummaryOfNeuron`](neuron-explainer\u002Fneuron_explainer\u002Factivations\u002Ftoken_connections.py#L17)\n    dataclass.\n\nUpdate (July 5, 2023):\nWe also released a set of explanations for GPT-2 Small. The methodology is slightly different from the methodology used for GPT-2 XL so the results aren't directly comparable.\n* Neuron activations: `az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fgpt2_small_data\u002Fcollated-activations\u002F{layer_index}\u002F{neuron_index}.json`\n* Neuron explanations: `az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fgpt2_small_data\u002Fexplanations\u002F{layer_index}\u002F{neuron_index}.jsonl`\n\nUpdate (August 30, 2023): We recently discovered a bug in how we performed inference on the GPT-2 series models used for the paper and for these datasets. Specifically, we used an optimized GELU implementation rather than the original GELU implementation associated with GPT-2. While the model’s behavior is very similar across these two configurations, the post-MLP activation values we used to generate and simulate explanations differ from the correct values by the following amounts for GPT-2 small:\n\n- Median: 0.0090\n- 90th percentile: 0.0252\n- 99th percentile: 0.0839\n- 99.9th percentile: 0.1736\n\n### Definition of connection weights\n\nRefer to [GPT-2 model code](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fgpt-2\u002Fblob\u002Fmaster\u002Fsrc\u002Fmodel.py) for\nunderstanding of model weight conventions.\n\n*Neuron-neuron*: For two neurons `(l1, n1)` and `(l2, n2)` with `l1 \u003C l2`, the connection strength is defined as\n`h{l1}.mlp.c_proj.w[:, n1, :] @ diag(h{l2}.ln_2.g) @ h{l2}.mlp.c_fc.w[:, :, n2]`.\n\n*Neuron-token*: For token `t` and neuron `(l, n)`, the input weight is computed as\n`wte[t, :] @ diag(h{l}.ln_2.g) @ h{l}.mlp.c_fc.w[:, :, n]`\nand the output weight is computed as\n`h{l}.mlp.c_proj.w[:, n, :] @ diag(ln_f.g) @ wte[t, :]`.\n\n### Misc Lists of Interesting Neurons\nLists of neurons we thought were interesting according to different criteria, with some preliminary descriptions.\n* [Interesting Neurons (external)](https:\u002F\u002Fdocs.google.com\u002Fspreadsheets\u002Fd\u002F1p7fYs31NU8sJoeKyUx4Mn2laGx8xXfHg_KcIvYiKPpg\u002Fedit#gid=0)\n* [Neurons that score high on random, possibly monosemantic? (external)](https:\u002F\u002Fdocs.google.com\u002Fspreadsheets\u002Fd\u002F1TqKFcz-84jyIHLU7VRoTc8BoFBMpbgac-iNBnxVurQ8\u002Fedit?usp=sharing)\n* [Clusters of neurons well explained by activation explanation but not by tokens](https:\u002F\u002Fdocs.google.com\u002Fdocument\u002Fd\u002F1lWhKowpKDdwTMALD_K541cdwgGoQx8DFUSuEe1U2AGE\u002Fedit?usp=sharing)\n* [Neurons sensitive to truncation](https:\u002F\u002Fdocs.google.com\u002Fdocument\u002Fd\u002F1x89TWBvuHcyC2t01EDbJZJ5LQYHozlcS-VUmr5shf_A\u002Fedit?usp=sharing)\n","# 自动化可解释性\n\n## 代码与工具\n\n本仓库包含与论文《语言模型可以解释语言模型中的神经元》（[Language models can explain neurons in language models](https:\u002F\u002Fopenaipublic.blob.core.windows.net\u002Fneuron-explainer\u002Fpaper\u002Findex.html)）相关的代码和工具，具体包括：\n\n* 用于按照论文中描述的方法自动生成、模拟并评分神经元行为解释的代码。更多信息请参阅 [neuron-explainer 的 README](neuron-explainer\u002FREADME.md)。\n\n注意：如果您遇到类似“错误：无法找到任何有权访问存储账户 'openaipublic' 和容器 'neuron-explainer' 的凭据”的错误，可以通过注册一个 Azure 账户，并按照错误信息中的说明提供凭据来解决。\n\n* 一个用于查看神经元激活和解释的工具，可通过[这里](https:\u002F\u002Fopenaipublic.blob.core.windows.net\u002Fneuron-explainer\u002Fneuron-viewer\u002Findex.html)访问。更多信息请参阅 [neuron-viewer 的 README](neuron-viewer\u002FREADME.md)。\n\n## 公开数据集\n\n除了这些代码之外，我们还发布了 GPT-2 XL 神经元及其解释的公开数据集。以下是这些数据集的概述。\n\n* 神经元激活：`az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fdata\u002Fcollated-activations\u002F{layer_index}\u002F{neuron_index}.json`\n    - 包含该神经元所对应的分词文本序列及其激活值。我们提供了多组不同的标记和激活数据：激活最高的样本、来自不同分位数的随机样本，以及完全随机的样本。此外，还提供了一些关于激活的基本统计信息。\n    - 每个文件都包含一个 JSON 格式的 [`NeuronRecord`](neuron-explainer\u002Fneuron_explainer\u002Factivations\u002Factivations.py#L89) 数据类。\n\n* 神经元解释：`az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fdata\u002Fexplanations\u002F{layer_index}\u002F{neuron_index}.jsonl`\n    - 包含对该神经元行为的模型生成解释及其评分结果，还包括模拟结果。\n    - 每个文件都包含一个 JSON 格式的 [`NeuronSimulationResults`](neuron-explainer\u002Fneuron_explainer\u002Fexplanations\u002Fexplanations.py#L146) 数据类。\n\n* 相关神经元：`az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fdata\u002Frelated-neurons\u002Fweight-based\u002F{layer_index}\u002F{neuron_index}.json`\n    - 列出了与当前神经元有最正向和最负向连接的上游及下游神经元（定义见下文）。\n    - 每个文件都包含一个 JSON 格式的数据类，其具体定义未在此仓库中提供。\n\n* 平均激活值较高的标记：`az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fdata\u002Frelated-tokens\u002Factivation-based\u002F{layer_index}\u002F{neuron_index}.json`\n    - 列出了单个神经元中平均激活值最高的标记及其平均激活值。\n    - 每个文件都包含一个 JSON 格式的 [`TokenLookupTableSummaryOfNeuron`](neuron-explainer\u002Fneuron_explainer\u002Factivations\u002Ftoken_connections.py#L36) 数据类。\n\n* 入出权重较大的标记：`az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fdata\u002Frelated-tokens\u002Fweight-based\u002F{layer_index}\u002F{neuron_index}.json`\n    - 列出了单个神经元输入和输出端权重最大和最小的标记，以及相应的权重值（定义见下文）。\n    - 每个文件都包含一个 JSON 格式的 [`WeightBasedSummaryOfNeuron`](neuron-explainer\u002Fneuron_explainer\u002Factivations\u002Ftoken_connections.py#L17) 数据类。\n\n更新（2023年7月5日）：\n我们还发布了一组针对 GPT-2 Small 的解释数据。由于其方法论与 GPT-2 XL 的略有不同，因此结果不可直接比较。\n* 神经元激活：`az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fgpt2_small_data\u002Fcollated-activations\u002F{layer_index}\u002F{neuron_index}.json`\n* 神经元解释：`az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fgpt2_small_data\u002Fexplanations\u002F{layer_index}\u002F{neuron_index}.jsonl`\n\n更新（2023年8月30日）：\n我们最近发现了一个在对用于论文及这些数据集的 GPT-2 系列模型进行推理时存在的错误。具体来说，我们使用的是优化版的 GELU 实现，而非 GPT-2 原始版本中使用的 GELU 实现。尽管在这两种配置下模型的行为非常相似，但我们用来生成和模拟解释的 MLP 后激活值与正确值存在以下差异，以 GPT-2 small 为例：\n\n- 中位数：0.0090\n- 第90百分位数：0.0252\n- 第99百分位数：0.0839\n- 第99.9百分位数：0.1736\n\n### 连接权重的定义\n\n有关模型权重约定的详细信息，请参考 [GPT-2 模型代码](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fgpt-2\u002Fblob\u002Fmaster\u002Fsrc\u002Fmodel.py)。\n\n* 神经元-神经元：对于两个神经元 `(l1, n1)` 和 `(l2, n2)`，其中 `l1 \u003C l2`，其连接强度定义为\n`h{l1}.mlp.c_proj.w[:, n1, :] @ diag(h{l2}.ln_2.g) @ h{l2}.mlp.c_fc.w[:, :, n2]`。\n\n* 神经元-标记：对于标记 `t` 和神经元 `(l, n)`，其输入权重计算为\n`wte[t, :] @ diag(h{l}.ln_2.g) @ h{l}.mlp.c_fc.w[:, :, n]`\n而输出权重则计算为\n`h{l}.mlp.c_proj.w[:, n, :] @ diag(ln_f.g) @ wte[t, :]`。\n\n### 其他有趣的神经元列表\n根据不同的标准整理的一些我们认为有趣的神经元列表，并附有初步说明。\n* [有趣的神经元（外部链接）](https:\u002F\u002Fdocs.google.com\u002Fspreadsheets\u002Fd\u002F1p7fYs31NU8sJoeKyUx4Mn2laGx8xXfHg_KcIvYiKPpg\u002Fedit#gid=0)\n* [在随机样本中得分较高、可能具有单一语义的神经元（外部链接）](https:\u002F\u002Fdocs.google.com\u002Fspreadsheets\u002Fd\u002F1TqKFcz-84jyIHLU7VRoTc8BoFBMpbgac-iNBnxVurQ8\u002Fedit?usp=sharing)\n* [那些能被激活解释很好地说明，但无法用标记解释的神经元簇（外部链接）](https:\u002F\u002Fdocs.google.com\u002Fdocument\u002Fd\u002F1lWhKowpKDdwTMALD_K541cdwgGoQx8DFUSuEe1U2AGE\u002Fedit?usp=sharing)\n* [对截断敏感的神经元（外部链接）](https:\u002F\u002Fdocs.google.com\u002Fdocument\u002Fd\u002F1x89TWBvuHcyC2t01EDbJZJ5LQYHozlcS-VUmr5shf_A\u002Fedit?usp=sharing)","# Automated Interpretability 快速上手指南\n\n本指南基于 OpenAI 的“自动化可解释性”项目，帮助开发者快速生成、模拟和评分语言模型中神经元行为的解释。\n\n## 环境准备\n\n在开始之前，请确保满足以下系统要求和依赖：\n\n*   **操作系统**: Linux, macOS 或 Windows (推荐 Linux\u002FmacOS)\n*   **Python 版本**: Python 3.8+\n*   **Azure 存储访问权限**: \n    *   本项目数据托管在 Azure Blob Storage (`openaipublic` 账户)。\n    *   **注意**: 如果运行代码时遇到 `Error: Could not find any credentials...` 错误，您需要注册一个 Azure 账号，并按照错误提示配置凭证以访问公共存储桶。\n*   **前置依赖库**:\n    *   `torch`\n    *   `transformers`\n    *   `tiktoken`\n    *   其他标准科学计算库 (`numpy`, `pandas` 等)\n\n> **提示**: 国内用户若下载 PyTorch 或 HuggingFace 模型受阻，建议配置国内镜像源（如清华源、阿里源）加速安装。\n\n## 安装步骤\n\n1.  **克隆仓库**\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002Fopenai\u002Fautomated-interpretability.git\n    cd automated-interpretability\n    ```\n\n2.  **安装核心依赖**\n    进入 `neuron-explainer` 目录并安装所需包：\n    ```bash\n    cd neuron-explainer\n    pip install -e .\n    ```\n    *(注：如果根目录有 `requirements.txt`，也可先执行 `pip install -r requirements.txt`)*\n\n3.  **配置 Azure 凭证 (如需访问数据集)**\n    若需直接通过代码拉取远程数据集，请根据报错信息设置环境变量或配置文件。通常涉及设置 `AZURE_STORAGE_ACCOUNT` 和相关密钥。\n    ```bash\n    export AZURE_STORAGE_ACCOUNT=\"openaipublic\"\n    # 具体密钥配置请参考运行时错误提示或 Azure 文档\n    ```\n\n## 基本使用\n\n本工具的核心功能位于 `neuron-explainer` 模块中，主要用于生成神经元激活的解释并进行模拟评分。\n\n### 1. 加载神经元激活数据\n您可以从公开的 Azure 数据集中加载特定神经元的激活记录。以下示例展示了如何定位数据路径（以 GPT-2 XL 第 0 层第 0 个神经元为例）：\n\n```python\nfrom neuron_explainer.activations.activations import NeuronRecord\nimport json\n\n# 数据路径示例 (需先配置好 Azure 访问或下载后本地读取)\n# az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fdata\u002Fcollated-activations\u002F0\u002F0.json\n# 假设已下载为本地文件\nwith open(\"0_0_activations.json\", \"r\") as f:\n    data = json.load(f)\n    \nneuron_record = NeuronRecord(**data)\nprint(f\"Neuron activations stats: {neuron_record.activation_statistics}\")\n```\n\n### 2. 生成并评分解释\n使用 `neuron-explainer` 提供的方法论自动生成解释。核心逻辑通常涉及调用 LLM 对高激活序列进行归纳。\n\n```python\nfrom neuron_explainer.explanations.explainer import TokenActivationPairExplainer\nfrom neuron_explainer.explanations.simulator import ExplanationSimulator\n\n# 初始化解释器 (需要配置有效的 LLM API Key，如 OpenAI API)\nexplainer = TokenActivationPairExplainer(model_name=\"gpt-4\")\n\n# 生成解释\nexplanation = explainer.generate_explanation(neuron_record)\nprint(f\"Generated Explanation: {explanation}\")\n\n# 初始模拟器并评分\nsimulator = ExplanationSimulator(model_name=\"gpt-4\")\nscore = simulator.simulate(explanation, neuron_record)\nprint(f\"Explanation Score: {score}\")\n```\n\n### 3. 查看可视化结果\n项目提供了一个独立的 Web 查看器，用于直观浏览神经元激活和解释。\n\n*   **在线访问**: [Neuron Viewer](https:\u002F\u002Fopenaipublic.blob.core.windows.net\u002Fneuron-explainer\u002Fneuron-viewer\u002Findex.html)\n*   **本地部署**: 参考 `neuron-viewer\u002FREADME.md` 获取本地运行指令。\n\n### 4. 访问公开数据集\n所有数据集均存储在 Azure Blob Storage 中，路径格式如下：\n\n*   **神经元激活**: `az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fdata\u002Fcollated-activations\u002F{layer_index}\u002F{neuron_index}.json`\n*   **神经元解释**: `az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fdata\u002Fexplanations\u002F{layer_index}\u002F{neuron_index}.jsonl`\n*   **GPT-2 Small 数据**: `az:\u002F\u002Fopenaipublic\u002Fneuron-explainer\u002Fgpt2_small_data\u002F...`\n\n> **重要更新说明**: 2023 年 8 月 30 日发现 GPT-2 系列推理存在微小偏差（源于 GELU 实现差异），虽不影响整体行为，但在复现高精度激活值时请注意该差异（99.9% 分位数误差约为 0.1736）。","某 AI 安全团队正在对微调后的 GPT-2 模型进行“毒性过滤”审计，试图定位并理解导致模型输出歧视性言论的具体内部机制。\n\n### 没有 automated-interpretability 时\n- **人工猜测效率极低**：研究人员只能手动检查神经元的激活热力图，面对数万个神经元，靠肉眼猜测某个神经元是否代表“仇恨言论”如同大海捞针。\n- **解释缺乏量化验证**：即使凭经验推测出某个神经元的功能，也无法通过自动化模拟来验证该解释是否能准确复现神经元的行为，结论主观且不可靠。\n- **关联分析难以开展**：想要理清该神经元与上下游哪些词元（Token）或其他神经元强相关，需要编写复杂的脚本来提取权重和激活统计，耗时数天才能完成初步链路分析。\n\n### 使用 automated-interpretability 后\n- **自动生成可解释描述**：工具能自动为高激活神经元生成自然语言解释（如“该神经元在检测到种族歧视词汇时强烈激活”，并直接给出置信度评分。\n- **模拟验证闭环**：内置的模拟功能可立即测试生成的解释是否成立，通过对比模拟激活值与真实激活值，快速筛选出真正控制毒性输出的关键神经元。\n- **一键获取关联图谱**：直接调用预计算的数据集，瞬间列出与该神经元连接权重最高或平均激活最强的输入\u002F输出词元列表，清晰展示其上下游影响路径。\n\nautomated-interpretability 将原本需要数周的人工逆向工程工作，压缩为几分钟的自动化流程，让黑盒模型的内部逻辑变得透明且可验证。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopenai_automated-interpretability_2b6821bf.png","openai","OpenAI","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fopenai_1960bbf4.png","","https:\u002F\u002Fopenai.com\u002F","https:\u002F\u002Fgithub.com\u002Fopenai",[83,87,91,95,99,102],{"name":84,"color":85,"percentage":86},"Python","#3572A5",72.5,{"name":88,"color":89,"percentage":90},"TypeScript","#3178c6",10.2,{"name":92,"color":93,"percentage":94},"JavaScript","#f1e05a",9.3,{"name":96,"color":97,"percentage":98},"Jupyter Notebook","#DA5B0B",4,{"name":100,"color":101,"percentage":23},"CSS","#663399",{"name":103,"color":104,"percentage":54},"HTML","#e34c26",1073,126,"2026-04-09T08:34:51","未说明",{"notes":110,"python":108,"dependencies":111},"README 中未明确列出具体的运行环境配置（如操作系统、GPU、内存、Python 版本及依赖库）。该项目主要包含用于生成和评分神经元解释的代码工具，以及查看激活和解释的可视化工具。数据存储在 Azure Blob Storage 上，运行代码可能需要配置 Azure 凭据以访问公开数据集（如 GPT-2 XL 和 GPT-2 Small 的神经元激活及解释数据）。此外，项目提到曾发现 GPT-2 系列模型推理中的 GELU 实现 bug，导致激活值存在细微差异。",[],[15,46],"2026-03-27T02:49:30.150509","2026-04-13T00:22:09.399068",[116,121,126,131,136,141,146,151,156],{"id":117,"question_zh":118,"answer_zh":119,"source_url":120},31134,"运行代码时遇到 Python 版本类型错误（TypeError: 'type' object is not subscriptable）怎么办？","该错误是因为代码使用了 Python 3.9+ 的类型提示语法（如 dict[str, slice]），而您使用的 Python 版本过低（如 3.7 或 3.8）。请将您的 Python 环境升级到 3.9 或更高版本。维护者已确认需要 Python >= 3.9。","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fautomated-interpretability\u002Fissues\u002F11",{"id":122,"question_zh":123,"answer_zh":124,"source_url":125},31135,"加载数据时遇到 Azure 凭证错误或资源找不到（ResourceNotFound）如何解决？","如果无法通过官方库加载数据，可以使用标准的 HTTP 请求直接访问公开的数据文件。以下是一个无需 Azure 凭证的替代加载脚本：\n\nimport json\nimport urllib.request\n\ndef load_az_json(url):\n    with urllib.request.urlopen(url) as f:\n        neuron_record = f.read()\n    return json.loads(neuron_record)\n\ndef load_neuron(layer_index, neuron_index):\n    url = f\"https:\u002F\u002Fopenaipublic.blob.core.windows.net\u002Fneuron-explainer\u002Fdata\u002Fexplanations\u002F{layer_index}\u002F{neuron_index}.jsonl\"\n    return load_az_json(url)\n\n# 使用示例\n# neuron = load_neuron(层索引，神经元索引)\n# explanation = neuron[\"scored_explanations\"][0][\"explanation\"]","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fautomated-interpretability\u002Fissues\u002F8",{"id":127,"question_zh":128,"answer_zh":129,"source_url":130},31136,"是否有计划发布统一的单体数据集文件以便检索？","维护者明确表示目前没有计划发布统一的单体数据集文件。不过，社区成员可以自由尝试自行构建此类数据库或工具来进行研究。","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fautomated-interpretability\u002Fissues\u002F4",{"id":132,"question_zh":133,"answer_zh":134,"source_url":135},31137,"代码库中是否包含用于“修正解释”（revising explanations）的代码？","目前代码库中没有提供用于修正解释的演示代码（demo code）。","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fautomated-interpretability\u002Fissues\u002F23",{"id":137,"question_zh":138,"answer_zh":139,"source_url":140},31138,"如何获取用于计算激活值的所有随机样本数据？","官方没有提供单独的样本文件下载，但您可以编写一个 Python 脚本来批量下载所有相关的 JSON 文件以获取这些数据。","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fautomated-interpretability\u002Fissues\u002F19",{"id":142,"question_zh":143,"answer_zh":144,"source_url":145},31139,"使用 pip 安装 neuron-explainer 后文件缺失或不完整怎么办？","这通常是由于 setup.py 配置问题导致的。维护者已经修复了该问题，请尝试重新运行安装命令：pip install \"git+https:\u002F\u002Fgithub.com\u002Fopenai\u002Fautomated-interpretability.git#subdirectory=neuron-explainer\"。如果仍然失败，建议清除缓存后重试。","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fautomated-interpretability\u002Fissues\u002F13",{"id":147,"question_zh":148,"answer_zh":149,"source_url":150},31140,"是否会开源“寻找可解释方向”（Finding explainable directions）部分的代码？","维护者明确表示没有计划开源“寻找可解释方向”这一部分的代码。","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fautomated-interpretability\u002Fissues\u002F12",{"id":152,"question_zh":153,"answer_zh":154,"source_url":155},31141,"有没有展示该项目功能的在线演示或相关项目？","您可以访问 [neuronpedia.org](https:\u002F\u002Fneuronpedia.org)。这是一个使用该自动化可解释性项目进行评分的演示平台，支持查看 GPT-2 Small 神经元的解释，并允许用户贡献自己的解释。","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fautomated-interpretability\u002Fissues\u002F35",{"id":157,"question_zh":158,"answer_zh":159,"source_url":160},31142,"在 Windows 系统上安装失败（uvloop 不支持 Windows）如何解决？","由于 uvloop 库原生不支持 Windows，且官方不会修复此兼容性问题，建议在 Windows 上使用 Docker 容器来运行该项目。社区成员已分享过适用于 Windows 的 Dockerfile 作为解决方案。","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fautomated-interpretability\u002Fissues\u002F27",[]]