Steering-vectors

Latest version: v0.12.1

Safety actively analyzes 681844 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.10.0

Chore

* chore: Replacing black/flake8/isort with ruff (39)

* Replacing black/flake8/isort with ruff

* fix CI command ([`8d95c31`](https://github.com/steering-vectors/steering-vectors/commit/8d95c31783dc6bf2e71a37de6a6df1268c8baf1d))

* chore: update example notebook, add &39;open in colab&39; button

Nina updated her repo which broke some of the download paths. It should work now. ([`222a851`](https://github.com/steering-vectors/steering-vectors/commit/222a851fac09ac6eba708569accc259b3122d8bd))

* chore: test Gemma and Mistral support (36)

* adding tests for new gemma model layer matching

* adding a steering test for gemma

* adding tests for Mistral too ([`a5e990f`](https://github.com/steering-vectors/steering-vectors/commit/a5e990f54f5760acc541fdc4986b3d6f4f8e69b5))

* chore: simplifying README and removing poor examples (35) ([`6c2d575`](https://github.com/steering-vectors/steering-vectors/commit/6c2d57519df7833a40cf2572956122a15db155f2))

Feature

* feat: decompose train_steering_vector into smaller functions (38)

* feat: decompose train_steering_vector into smaller functions

* fixing linting

* adding docs and tweaking param names

---------

Co-authored-by: Daniel CH Tan <dtch1997users.noreply.github.com>
Co-authored-by: David Chanin <chanindavgmail.com> ([`34bcfa9`](https://github.com/steering-vectors/steering-vectors/commit/34bcfa9135f2a8bbc858e5834c6c753937d4c0fe))

0.9.0

Chore

* chore: replace pre-3.10 types with modern typing, and adding linting (28)

* chore: replace pre-3.10 types with modern typing, and adding linting

* adding isort CI check

* fixing linting ([`729ea82`](https://github.com/steering-vectors/steering-vectors/commit/729ea82cb2c48bbbc7851d5601d19c242beee498))

Feature

* feat: add batch training support (30)

* feat: add batch training support

* ensure indexing tensor is on same device as model ([`625d826`](https://github.com/steering-vectors/steering-vectors/commit/625d8267ce74888ff19c92ae7507a1decceb5927))

* feat: renaming PatchOperator to PatchDeltaOperator (27) ([`f326823`](https://github.com/steering-vectors/steering-vectors/commit/f3268231dab8dfa6d7eae099871312be532c9818))

0.8.0

Chore

* chore: adding info about pytorch hooks to docs site (29) ([`5410ebe`](https://github.com/steering-vectors/steering-vectors/commit/5410ebeb1610f48c14bc98948d822577ed0a819b))

Feature

* feat: renaming prompts to strs in SteeringVectorTrainingSample (32) ([`16118a9`](https://github.com/steering-vectors/steering-vectors/commit/16118a9f704c07849e1ddffff985972d14a4d268))

0.7.0

Feature

* feat: Add aggregators for logistic and linear regression (22)

* add aggregators for logistic and linear regression

* apply pairwise mean-centering before regression and improve regression unit-tests

* proposing CR changes to add-regression-aggregator (26)

* proposing CR changes to add-regression-aggregator

* adding a test for passing sklearn_kwargs

* tweaking tensor.to call

---------

Co-authored-by: David Chanin <chanindavgmail.com> ([`a346c6f`](https://github.com/steering-vectors/steering-vectors/commit/a346c6f15c7934463b86ccce54832ad578cc791b))

0.6.0

Feature

* feat: Support selecting specific token indices when applying and training steering vector (21)

* support steering at specific indices using integer list of indices

* support steering at specific indices using mask

* support passing training indices as part of trianing sample or via callable

* use list instead of List and update docstrings

* parametrize patch activations test to verify that slices and masks work to select indices

* remove handling of impossible case where token_indices is none in _create_additive_hook

* formatting and typing fixing

* make SteeringVectorTrainingSample a DataClass

* extract _get_token_index as a top level function ([`9f2a0c5`](https://github.com/steering-vectors/steering-vectors/commit/9f2a0c5af67556625a70509752b7152ec50ffe1f))

Unknown

* Add example of how to extract and apply CAA-style steering vectors (18)

* Add example dependencies; fix missing torch bug

* Fix data type bug in train_steering_vector

* [WIP] Add CAA example notebook

* Add CAA example

* minor

* fix: update version

I forgot to bump the version previously so here it is.

* Revert &34;Fix data type bug in train_steering_vector&34;

This reverts commit 8c80db5e2c2fd3aae60086b4cf652e276ce032ae.

* Remove PDM

* Add example dependencies in example group

* Delete raw data from examples

* Remove example dependencies from pyproject.toml

* Fix nits in notebook

* Fix more nits

* Restructure examples dir

* Fix minor bugs

* Fix other nits

---------

Co-authored-by: dtch1997 <dtch1997users.noreply.github.com> ([`94443cd`](https://github.com/steering-vectors/steering-vectors/commit/94443cd9d247621c005533fb21d4370182644d67))

0.5.0

Feature

* feat: adding a PCA aggregator (9) ([`77c1b7b`](https://github.com/steering-vectors/steering-vectors/commit/77c1b7b74acb40545d4c2b8a3559a079fe319602))

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.