Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 597 Bytes

File metadata and controls

21 lines (14 loc) · 597 Bytes

Stealing the Decoding Algorithms of Language Models

Installation

pip install -r requirements.txt

Usage

Our algorithm offers multiple arguments to run experiments for each stage. Below is an example of how to execute the code:

python main.py --stage 3 --targeted_model 'gpt2' --temperature 0.8 --algorithm 'temperature'

Furthermore, an example of how to assess a particular estimation using the metrics proposed in the paper can be found below:

python evaluation.py --targeted_model 'gpt2' --original_temperature 0.8 --estimated_temperature 0.801