-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding topic steering on layers #5119
Comments
Fyi there was draft PR experimenting with steering vectors #1472. |
I took a look at #1472 , but the structure of llama.cpp changed in the meantime too much. In #1472 the steering was done in this function https://github.com/ggerganov/llama.cpp/blob/95dc4d7270e04bef3792a61be9bb045cb74a9fc4/llama.cpp#L1132 , but the whole function doesn't exist in this form any more. |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Feature Description
Add the ability to set/apply
steers
on a layer by layer basis in order to ensure alignment with specific concepts, tokens or words.Motivation
Based on recent papers and research on LLM steerability through applying
steer
s on specific layers, I believe that llama.cpp would greatly benefit from incorporating a feature like this.The colab in the section below should provide a very interesting application which results in far higher reasoning abilities, for example from a 3B.
Possible Implementation
Links to known implementations:
https://github.com/Mihaiii/llm_steer
https://colab.research.google.com/github/Mihaiii/llm_steer/blob/main/demo/llm_steer_demo.ipynb
And
https://github.com/nrimsky/LM-exp/tree/main/steering
The text was updated successfully, but these errors were encountered: