From 95b9be1079f85a6a0d2d2fc5dbe2b6c1bfbe9954 Mon Sep 17 00:00:00 2001 From: Baize Date: Wed, 5 Apr 2023 01:43:02 +0000 Subject: [PATCH] Update app.py --- app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app.py b/app.py index e4d3df9..742d965 100644 --- a/app.py +++ b/app.py @@ -47,6 +47,8 @@ def predict(text, global total_count total_count += 1 print(total_count) + if total_count % 50 == 0 : + os.system("nvidia-smi") with torch.no_grad(): for x in greedy_search(input_ids,model,tokenizer,stop_words=["[|Human|]", "[|AI|]"],max_length=max_length_tokens,temperature=temperature,top_p=top_p): if is_stop_word_or_prefix(x,["[|Human|]", "[|AI|]"]) is False: