This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from transformers import AutoModelForMaskedLM, set_seed | |
from bart_token_level_perplexity import BartPerplexityTester | |
# Use seq_len=256 as a standard for testing. | |
if __name__ == '__main__': | |
device = 'cuda:0' | |
model_name ='facebook/bart-base' |