What problem does it solve? Controlling specific behaviors of large language models like sycophancy or hallucination typically requires expensive fine-tuning. This Skill implements Contrastive Activation Addition (CAA) to generate steering vectors from contrastive examples and apply them at inference time to shift model behavior without retraining. ## Core Features & Use Cases - Steering Vector Generation: Collect activations from contrastive positive/negative behavioral examples and compute difference vectors at chosen layers of Llama 2 models. - Inference-Time Steering: Apply pre-computed vectors via forward hooks with configurable multipliers to amplify or suppress behaviors during text generation. - Vector Analysis & Visualization: Compute cosine similarities, PCA projections, norm distributions, and heatmaps across behaviors and layers. - Use Case: A researcher studying sycophancy generates a steering vector at layer 13 of Llama-2-7b-chat, then sweeps multipliers from -2.0 to 2.0 to measure how model agreement behavior changes on evaluation questions. ## Quick Start Generate steering vectors for the sycophancy behavior on Llama-2-7b-chat and compare steered responses across multipliers on a test prompt.