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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file repana-0.0.1.tar.gz.
File metadata
- Download URL: repana-0.0.1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
380157259b7c94b819f7893a58aac1cabb27083823997a71d87845dc5f41cefe
|
|
| MD5 |
824539a8f508b1d32b4289b7f783ad94
|
|
| BLAKE2b-256 |
a2e1b52c92793feef13aa2afb2df7a855481a8f97f93303c2708aca500fb0092
|
File details
Details for the file repana-0.0.1-py3-none-any.whl.
File metadata
- Download URL: repana-0.0.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b48cfd2b41e23a1a78e495fa75cf954d3ee3f996c7e6750b1b25dfdc4823b2e
|
|
| MD5 |
52fdb581d1ea04af686379c955c0cc32
|
|
| BLAKE2b-256 |
4f80a9bd86152cd7a99f69372039f23a08a98d6c6f542f3cd6ed16126e614453
|