Table of Contents
Transformer Debugger Introduction
Installation Settings
Home Technology peripherals AI OpenAI is open source: Transformer automatic debug tool is online on GitHub

OpenAI is open source: Transformer automatic debug tool is online on GitHub

Mar 12, 2024 pm 08:22 PM
ai data

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.

OpenAI is open source: Transformer automatic debug tool is online on GitHub

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.

OpenAI is open source: Transformer automatic debug tool is online on GitHub

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
Copy after login

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 ..
Copy after login

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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to solve SQL parsing problem? Use greenlion/php-sql-parser! How to solve SQL parsing problem? Use greenlion/php-sql-parser! Apr 17, 2025 pm 09:15 PM

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.

How to solve the complexity of WordPress installation and update using Composer How to solve the complexity of WordPress installation and update using Composer Apr 17, 2025 pm 10:54 PM

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.

How to solve complex BelongsToThrough relationship problem in Laravel? Use Composer! How to solve complex BelongsToThrough relationship problem in Laravel? Use Composer! Apr 17, 2025 pm 09:54 PM

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.

How to solve the complex problem of PHP geodata processing? Use Composer and GeoPHP! How to solve the complex problem of PHP geodata processing? Use Composer and GeoPHP! Apr 17, 2025 pm 08:30 PM

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.

How to solve the problem of PHP project code coverage reporting? Using php-coveralls is OK! How to solve the problem of PHP project code coverage reporting? Using php-coveralls is OK! Apr 17, 2025 pm 08:03 PM

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 tutorial git software installation tutorial Apr 17, 2025 pm 12:06 PM

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.

How to solve the problem of virtual columns in Laravel model? Use stancl/virtualcolumn! How to solve the problem of virtual columns in Laravel model? Use stancl/virtualcolumn! Apr 17, 2025 pm 09:48 PM

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.

Solve CSS prefix problem using Composer: Practice of padaliyajay/php-autoprefixer library Solve CSS prefix problem using Composer: Practice of padaliyajay/php-autoprefixer library Apr 17, 2025 pm 11:27 PM

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.

See all articles