From 62e495fc1384d990a1eb93f72f439a531f7b6767 Mon Sep 17 00:00:00 2001 From: kingbri Date: Mon, 8 Jul 2024 15:10:15 -0400 Subject: [PATCH] Model: Grammar: Fix lru_cache clear function It's cache_clear not clear_cache. Signed-off-by: kingbri --- backends/exllamav2/grammar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/exllamav2/grammar.py b/backends/exllamav2/grammar.py index 2fac9f4d..adff61fc 100644 --- a/backends/exllamav2/grammar.py +++ b/backends/exllamav2/grammar.py @@ -64,7 +64,7 @@ def clear_grammar_func_cache(): """Flush tokenizer_data cache to avoid holding references to tokenizers after unloading a model""" - _get_lmfe_tokenizer_data.clear_cache() + _get_lmfe_tokenizer_data.cache_clear() class ExLlamaV2Grammar: