


OpenAI is open source: Transformer automatic debug tool is online on GitHub
OpenAI, which has often been criticized recently for not being open source enough, suddenly opened it up.
Early this morning, OpenAI machine learning researcher Jan Leike announced that OpenAI has opened up its own internal tools that have been used to analyze the internal structure of Transformer.
GitHub link: https://github.com/openai/transformer-debugger
The The project has only been open for a few hours. Although it has not received much publicity, the number of stars has increased very quickly.
Transformer Debugger Introduction
Transformer Debugger (TDB) is developed by OpenAI’s alignment team (Superalignment) A tool developed to help users examine the specific behavior of small language models. It is understood that the tool combines the characteristics of automatic interpretability technology and sparse autoencoders.
Specifically, TDB enables rapid exploration before code needs to be written, and can intervene in the forward pass to help one see how it affects a specific behavior of the model. TDB can be used to answer questions such as "Why does the model output token A instead of token B in this prompt (prompt)?" or "Why does the attention head H pay attention to token T in this prompt?"
The approach involves identifying specific components that contribute to behavior (e.g. neurons, attention heads, autoencoder latent variables) and analyzing what causes the strongest activation of these components by presenting automatically generated explanations , and trace the connections between components to help people discover connections and assist in debugging Transformer.
OpenAI has released several videos outlining the capabilities of TDB and showing how to use it for the paper "Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 small 》Work in:
This time, OpenAI’s open source content includes:
- Neuron viewer: a React application, using for hosting the TDB as well as pages containing information about the individual model components (MLP neurons, attention heads, and autoencoder latents for both).
- Activation server: A backend server that performs inference on the topic model and provides data for TDB. It also reads and serves data from public Azure storage buckets.
- Models: A simple inference library for GPT-2 models and their autoencoders, with hooks to capture activations.
- Cleaned activation datasets: Examples of top activation datasets containing MLP neurons, attention heads, and autoencoder latents.
Installation Settings
Please follow the steps below to install the repository. Please note that before this you need python/pip and node/npm.
Although not necessary, OpenAI recommends using a virtual environment for operations:
# 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
After setting up the environment, please Follow these steps:
git clone git@github.com:openai/transformer-debugger.gitcd transformer-debugger# Install neuron_explainerpip install -e .# Set up the pre-commit hooks.pre-commit install# Install neuron_viewer.cd neuron_viewernpm installcd ..
To run the TDB application, you need to follow the instructions to set up the activation server backend and neuron viewer frontend.
To verify the changes you need to:
- Run pytest;
- Run mypy --cnotallow=mypy.ini;
- Run the activation server and Neuron Viewer and confirm that basic functions such as TDB and Neuron Viewer pages still work.
Jan Leike said that TDB is still a research tool in the early stages. OpenAI hopes to benefit more people through open source and looks forward to the community continuing to build on it. Improve.
The above is the detailed content of OpenAI is open source: Transformer automatic debug tool is online on GitHub. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



When developing a project that requires parsing SQL statements, I encountered a tricky problem: how to efficiently parse MySQL's SQL statements and extract the key information. After trying many methods, I found that the greenlion/php-sql-parser library can perfectly solve my needs.

When managing WordPress websites, you often encounter complex operations such as installation, update, and multi-site conversion. These operations are not only time-consuming, but also prone to errors, causing the website to be paralyzed. Combining the WP-CLI core command with Composer can greatly simplify these tasks, improve efficiency and reliability. This article will introduce how to use Composer to solve these problems and improve the convenience of WordPress management.

In Laravel development, dealing with complex model relationships has always been a challenge, especially when it comes to multi-level BelongsToThrough relationships. Recently, I encountered this problem in a project dealing with a multi-level model relationship, where traditional HasManyThrough relationships fail to meet the needs, resulting in data queries becoming complex and inefficient. After some exploration, I found the library staudenmeir/belongs-to-through, which easily installed and solved my troubles through Composer.

When developing a Geographic Information System (GIS), I encountered a difficult problem: how to efficiently handle various geographic data formats such as WKT, WKB, GeoJSON, etc. in PHP. I've tried multiple methods, but none of them can effectively solve the conversion and operational issues between these formats. Finally, I found the GeoPHP library, which easily integrates through Composer, and it completely solved my troubles.

When developing PHP projects, ensuring code coverage is an important part of ensuring code quality. However, when I was using TravisCI for continuous integration, I encountered a problem: the test coverage report was not uploaded to the Coveralls platform, resulting in the inability to monitor and improve code coverage. After some exploration, I found the tool php-coveralls, which not only solved my problem, but also greatly simplified the configuration process.

Git Software Installation Guide: Visit the official Git website to download the installer for Windows, MacOS, or Linux. Run the installer and follow the prompts. Configure Git: Set username, email, and select a text editor. For Windows users, configure the Git Bash environment.

During Laravel development, it is often necessary to add virtual columns to the model to handle complex data logic. However, adding virtual columns directly into the model can lead to complexity of database migration and maintenance. After I encountered this problem in my project, I successfully solved this problem by using the stancl/virtualcolumn library. This library not only simplifies the management of virtual columns, but also improves the maintainability and efficiency of the code.

I'm having a tricky problem when developing a front-end project: I need to manually add a browser prefix to the CSS properties to ensure compatibility. This is not only time consuming, but also error-prone. After some exploration, I discovered the padaliyajay/php-autoprefixer library, which easily solved my troubles with Composer.
