Style Vectors for Steering Generative Large Language Model

Kai Konen, Sophie Jentzsch, Diaoulé Diallo, Peer Schütt, Oliver Bensch +3 more
2/2/2024
cs.CL

No official code found. Best implementation: DLR-SC/style-vectors-for-steering-llms (37 stars, MIT, last commit 2024-09-26).

Abstract

This research explores strategies for steering the output of large language models (LLMs) towards specific styles, such as sentiment, emotion, or writing style, by adding style vectors to the activations of hidden layers during text generation. We show that style vectors can be simply computed from recorded layer activations for input texts in a specific style in contrast to more complex training-based approaches. Through a series of experiments, we demonstrate the effectiveness of activation engineering using such style vectors to influence the style of generated text in a nuanced and parameterisable way, distinguishing it from prompt engineering. The presented research constitutes a significant step towards developing more adaptive and effective AI-empowered interactive systems.

View on arXivView PDF

Code Implementations(1)

MIT

Code release for the paper "Style Vectors for Steering Generative Large Language Models", accepted to the Findings of the EACL 2024.

373Shell, PythonJan 19, 20242 years agoMIT

Similar Papers

Cite this paper

@article{konen2024style,
  title  = {Style Vectors for Steering Generative Large Language Model},
  author = {Kai Konen and Sophie Jentzsch and Diaoulé Diallo and Peer Schütt and Oliver Bensch and Roxanne El Baff and Dominik Opitz and Tobias Hecking},
  year   = {2024},
  eprint = {2402.01618},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.01618v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.01618.svg)](https://codeofpaper.com/paper/2402.01618)

Discussion