Contrastive framework for neural text generation research paper
Top 64.4% on SourcePulse
This repository provides SimCTG, a contrastive framework for neural text generation, and its associated decoding method, contrastive search. It addresses the common issue of degenerate text generation (unnaturalness, repetition) in autoregressive models by calibrating the representation space and encouraging diversity while maintaining coherence. The framework is beneficial for researchers and practitioners in NLP seeking improved text generation quality.
How It Works
SimCTG introduces a contrastive training objective to regularize the model's representation space, aiming to make it more isotropic. This is complemented by contrastive search, a decoding strategy that balances local coherence with global diversity. By contrasting token probabilities against a contrastive baseline, it steers generation away from repetitive or nonsensical outputs, leading to more natural and coherent text.
Quick Start & Requirements
pip install simctg --upgrade
Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
1 year ago
Inactive