Skip to main content

A simple framework for analyzing model representations

Project description

Table of Contents

Overview

Repana was developed based on the repeng library for research purposes. It is intended for doing representation analysis of large language models. Repana allows you to insert a (or more) ControlBlock into a standard torch transformer model creating a ControlModel instance. You can then "read" model representations, use these to derive a ControlVector, which can be applied to the ControlModel during inference.

Features

  • ControlModel
  • ControlVector
    • Reading vector
    • Contrast vector
    • PCA-based contrast vector

Installation

pip install repana

Acknowledgements

This library is based off of the repeng library (MIT License) developed by Theia Vogel. If you want to merely train control vectors fast, we suggest taking a look at that great library!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repana-0.0.3.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repana-0.0.3-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file repana-0.0.3.tar.gz.

File metadata

  • Download URL: repana-0.0.3.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.14

File hashes

Hashes for repana-0.0.3.tar.gz
Algorithm Hash digest
SHA256 3f4772103776a39f1bcdc748a426f1994b47c4a0be1adc4c3269b7d460bba812
MD5 629edfc815c61ca1d41fe45a4162f414
BLAKE2b-256 51163ff2964e4b15d3220889e7d3497de257f47b42e3a07dd139f338498377c9

See more details on using hashes here.

File details

Details for the file repana-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: repana-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.14

File hashes

Hashes for repana-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fc49e1507c0c0f9aef828d47b2ed90842b636bd675706cbc392b1ef4de344d69
MD5 4e8e7e9cd595dbc355d6edc17e3c8e2a
BLAKE2b-256 7e8f68d56583343c0bc6bd3b9982eed8c9363724f45d9f61bfbd7e48267120f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page