GithubHelp home page GithubHelp logo

clas's Introduction

Circuit-Level Activation Steering

We identify circuits in LLMs based on Edge Attribution Patching, and Automatic Circuit Discovery. We are currently supporting TransformerLens models only. In the future, we may apply Activation Steering to the identified circuits.

Current state

See demo notebook. Oscar implemented EAP by having a very big tensor of activation differences between clean and corrupted activations that we write and read from. We calculate the EAP scores during the backward pass to save memory and only store the difference between positive and negative activations instead of storing both.

TODOs

  • Positional EAP: Compute edge attribution scores across different positions (Answering questions like: "Does the token bomb at some middle position in the prompt have a high impact on the final position?")
  • Graph plotting (use ACDC functionality or web-based approach?)
  • Generalize Metric: Compute general metric from logits or intermediate activations (
  • Activation steering: Abstract away the localization of hooks and positions to enable forward passes with
    1. Activation Steering (at arbitrary layers and sequence positions)
    2. Ablation (zero / mean)
    3. Custom Steering vector
  • Write unit tests
  • check poetry build requirements

clas's People

Contributors

canrager avatar obalcells avatar

Stargazers

Daanish  avatar David Udell avatar Caden avatar

Watchers

 avatar  avatar

Forkers

obalcells

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.