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: