From 363d8067ad1398fb834e617272f1c83807dc0b12 Mon Sep 17 00:00:00 2001 From: James Chua Date: Sat, 6 May 2023 15:40:18 +0800 Subject: [PATCH] print when caching --- elk/extraction/extraction.py | 1 + 1 file changed, 1 insertion(+) diff --git a/elk/extraction/extraction.py b/elk/extraction/extraction.py index 53d02ee6..59646e79 100644 --- a/elk/extraction/extraction.py +++ b/elk/extraction/extraction.py @@ -307,6 +307,7 @@ def extract_hiddens( if is_enc_dec: inputs["labels"] = answer if cached_question_kv is not None: + print("Using cached question key-values") # If we cached the question, all we need to pass is the answer inputs["past_key_values"] = cached_question_kv inputs["input_ids"] = answer