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.4.tar.gz (9.5 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.4-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for repana-0.0.4.tar.gz
Algorithm Hash digest
SHA256 ef454230eff9381c90ebca5393fa07b63fdebdf6320a0c52d27cbb722a1bed76
MD5 9beab74e1373a4e0747cfd50afab7d13
BLAKE2b-256 09181299704a5b8d24151b957ea3e12f1759d6163519e7cf696939233f9d332e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: repana-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a445d0dcf40dc94f6aded91f4f1fbdf2f4bfc294f77af3b03be2aa529785dbe1
MD5 913f171640b893650f12c05088546fa9
BLAKE2b-256 89a7a9b884c6ac93ac28726e888e4bc596cc443d083dad8c67fa0c0c821dec71

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