不用敲程式碼,就可以快速探索模型結構。




Neuron viewer:一個 React 應用程式,用於託管 TDB 以及包含有關各個模型元件(MLP 神經元、注意力頭和兩者的自動編碼器 latents)資訊的頁面。 Activation server:對主題模型進行推理,為 TDB 提供資料的後端伺服器。它還從公共 Azure 儲存桶讀取和提供資料。 Models:GPT-2 模型及其自動編碼器的簡單推理庫,帶有捕獲啟用的 hook。 整理好的啟用資料集:包含 MLP 神經元、注意力頭和自動編碼器 latents 的頂級啟用資料集示例。
# If you're already in a venv, deactivate it.
deactivate# Create a new venv.
python -m venv ~/.virtualenvs/transformer-debugger# Activate the new venv.
source ~/.virtualenvs/transformer-debugger/bin/activate
git clone git@github.com:openai/transformer-debugger.gitcd transformer-debugger
# Install neuron_explainer
pip install -e .
# Set up the pre-commit hooks.
pre-commit install
# Install neuron_viewer.
cd neuron_viewer
npm installcd ..
執行 pytest; 執行 mypy —config=mypy.ini; 執行啟用伺服器和神經元檢視器,並確認 TDB 和神經元檢視器頁面等基本功能仍然有效。