Skip to main content

A simple framework for analyzing model representations

Project description

New Project-3

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.2.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.2-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: repana-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 bfa40548dba87a8a0c0826cbad5ee69532c0b460390fcb550ba0909df491f1c3
MD5 04ff45148eafaa209609b1bc1e56dd20
BLAKE2b-256 d9b521caf593ecd062b90c1cffc9796277d5cb28aaaefd0a715dbd1a27c9bfd6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for repana-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 73d0018b79543d3a829bb82568e5e63b1a360e98931f71c4337ff0c870fed7d0
MD5 08f0c0c82c5c82c8872fb3fc2a7a83c1
BLAKE2b-256 96625c3cde636343bacc522f85357ec18f90157a832e81f5cb48ef82dd34e678

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