EasySteer  by ZJU-REAL

LLM steering framework for enhanced control and performance

Created 10 months ago
258 stars

Top 98.0% on SourcePulse

GitHubView on GitHub
Project Summary

Summary EasySteer is a unified, high-performance framework for extensible LLM steering. It enables precise control over LLM behavior without modifying base model weights, offering significant speedups and flexibility for applications like safety alignment, style transfer, and knowledge enhancement.

How It Works Built on vLLM for high throughput, EasySteer integrates steering vector application directly into inference. Its modular design supports pluggable interfaces for custom algorithms, enabling fine-grained, token-level, and multi-vector control. The framework employs analysis-based steering (extracting vectors from activations) and learning-based steering (ReFT, training parameterized modules on frozen models), providing significant performance gains and adaptability.

Quick Start & Requirements Installation is recommended via pip after cloning and setting a specific vLLM commit hash (95c0f928cdeeaa21c4906e73cee6a156e1b3b995) for compatible pre-compiled wheels. Docker (xuhaolei/easysteer:latest) is also available. Building from source requires Python 3.10 and CUDA, potentially taking hours. A Lite Demo is available on Hugging Face Spaces.

Highlighted Details

  • Achieves 10.8-22.3x higher performance via vLLM integration.
  • Supports token-level, position-specific, and multi-vector steering.
  • Provides pre-computed steering vectors for 8 domains (safety, reasoning, knowledge).
  • Offers an OpenAI-compatible API for deploying steering-enabled models.
  • Includes an interactive web frontend for testing and comparison.

Maintenance & Community Recent activity (early 2026 updates) and ongoing vLLM adaptations indicate active development. Contributions for new algorithms and examples are encouraged. A WeChat user group facilitates community interaction.

Licensing & Compatibility Licensed under Apache License 2.0, it's generally compatible with commercial use. A usage statement mandates responsible deployment, restricting steering to safety/research, requiring disclosure of modifications, and adherence to ethical guidelines.

Limitations & Caveats Users must match specific vLLM versions for pre-compiled wheels; building from source is time-consuming. Hidden state extraction may not support all models and currently lacks prefix caching/chunked prefill support. The dual-use nature of steering requires careful ethical consideration.

Health Check
Last Commit

3 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
18 stars in the last 30 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Stefan van der Walt Stefan van der Walt(Core Contributor to scientific Python ecosystem), and
12 more.

litgpt by Lightning-AI

0.1%
13k
LLM SDK for pretraining, finetuning, and deploying 20+ high-performance LLMs
Created 3 years ago
Updated 3 weeks ago
Feedback? Help us improve.