From 67d11b3a33f37a394f43e30b230e658c1398edee Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Tue, 23 Mar 2021 17:42:31 +0100 Subject: [PATCH] Update. --- gpt-test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gpt-test.py b/gpt-test.py index 557f734..0967043 100755 --- a/gpt-test.py +++ b/gpt-test.py @@ -53,6 +53,8 @@ tokenizer = GPT2Tokenizer.from_pretrained(model_name) model = GPT2LMHeadModel.from_pretrained(model_name) model.eval() +print(f'Using {model_name} ({int(sum(p.numel() for p in model.parameters())/(1e6))}M parameters)') + print( complete(model, tokenizer, 'The object was blue all over, but also green all over, it was a', -- 2.39.5