trl
trl copied to clipboard
Add VAS to TRL
This PR introduces the implementation of Value Augmented Sampling (VAS), based on the paper Value Augmented Sampling for Language Model Alignment and Personalization. VAS enhances language model generation by incorporating a value function that guides the decoding process.
Key Components:
- VASTrainer: Implements the training algorithm for the Value function.
- VASSampler: Implements the generation process according to the VAS decoding scheme. Uses the trained Value function to adjust the sampling probabilities during inference.