Skip to main content

Steering vectors for transformer language models in Pytorch / Huggingface

Project description

Steering Vectors

ci PyPI

Steering vectors / representation engineering for transformer language models in Pytorch / Huggingface

Check out our example notebook. Open In Colab

Full docs: https://steering-vectors.github.io/steering-vectors

About

This library provides utilies for training and applying steering vectors to language models (LMs) from Huggingface, like GPT, LLaMa, Gemma, Mistral, Pythia, and many more!

For more info on steering vectors and representation engineering, check out the following work:

Installation

pip install steering-vectors

Check out the full documentation for more usage info.

Contributing

Any contributions to improve this project are welcome! Please open an issue or pull request in this repo with any bugfixes / changes / improvements you have.

This project uses Ruff for code formatting and linting, MyPy for type checking, and Pytest for tests. Make sure any changes you submit pass these code checks in your PR. If you have trouble getting these to run feel free to open a pull-request regardless and we can discuss further in the PR.

License

This code is released under a MIT license.

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

steering_vectors-0.10.1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

steering_vectors-0.10.1-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file steering_vectors-0.10.1.tar.gz.

File metadata

  • Download URL: steering_vectors-0.10.1.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for steering_vectors-0.10.1.tar.gz
Algorithm Hash digest
SHA256 4059ec85018c54f7358b3685188fa6d704bd305fbd09e4de83eeee3ada863f08
MD5 19331085a94cea14cbbf3eb65633e004
BLAKE2b-256 a014b65d3c54dd1ddedf679e6e901d1656e0199b9c55d9cd066bb796ef56234e

See more details on using hashes here.

File details

Details for the file steering_vectors-0.10.1-py3-none-any.whl.

File metadata

File hashes

Hashes for steering_vectors-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aba4344a0f8188b5e88b69adb6d2619ca04bf813bcba32de5da5f4a0121330a9
MD5 1307b04daa6f83d70781460c6781e2f7
BLAKE2b-256 bed55014a9c66e7df57e765e047c0f91f0abdde47525ca20035f1b02f1aedd84

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