Update compute_perplexity.py

This commit is contained in:
Yifan Yang 2023-05-31 10:46:35 +08:00 committed by GitHub
parent fab0258df5
commit 584a956bf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -330,7 +330,7 @@ def main():
ppl = math.exp(tot_loss / num_tokens)
logging.info(
f"total nll: {tot_loss}, num tokens: {num_tokens}, "
f"num sentences: {num_sentences}, ppl: {ppl:.3f}, "
f"num sentences: {num_sentences}, ppl: {ppl:.3f}"
)