1 Star 4 Fork 0

Gitee 极速下载/transformer-debugger

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/openai/transformer-debugger
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Neuron viewer

A React app that hosts TDB as well as pages with information about individual model components (MLP neurons, attention heads and autoencoder latents for both).

Running the server locally

First, install the app:

npm install

Then run the frontend:

npm start
  • To open a Neuron Viewer page, navigate to http://localhost:1234.
  • To open TDB, navigate to http://localhost:1234/gpt2-small/tdb_alpha.
  • To open TDB with autoencoders, navigate to http://localhost:1234/gpt2-small_ae-resid-delta-mlp-v4_ae-resid-delta-attn-v4/tdb_alpha (where ae-resid-delta-mlp-v4 and ae-resid-delta-attn-v4 must match the autoencoder names that are used in the activation server).

Formatting code

To check whether the code is correctly formatted:

npm run check-code-format

To format the code:

npm run format-code

Code organization

  • src/client: Auto-generated code for interacting with the activation server (the neuron viewer's backend). Do not edit this code! Follow the instructions in the activation server README to regenerate this code if you make changes to the activation server. Use src/requests when calling the activation server.
  • src/panes: UI elements that can be used as panes on a page: tokens+activations, similar neurons, etc.
  • src/requests: Client libraries for making network requests to the activation server.
  • src/TransformerDebugger: Code related to the Transformer Debugger.
  • src: Other code.

Using a remote activation server

If you decide to run your activation server on a different host or port than the default, you can point neuron viewer at it by setting the NEURON_VIEWER_ACTIVATION_SERVER_URL environment variable:

NEURON_VIEWER_ACTIVATION_SERVER_URL=https://some.url:port npm start

Making changes

Be sure to run the following to validate any changes you make:

npm run check-type-warnings && npm run check-code-format && npm run build
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/mirrors/transformer-debugger.git
git@gitee.com:mirrors/transformer-debugger.git
mirrors
transformer-debugger
transformer-debugger
main

搜索帮助