Grammar: Fix syntax, lint

This commit is contained in:
DocShotgun
2024-11-24 11:35:45 -08:00
parent 8f209efb99
commit 6f2dc2ea99
2 changed files with 2 additions and 4 deletions

View File

@@ -93,9 +93,8 @@ class ExLlamaV2Grammar:
# Validate KBNF and create formatter # Validate KBNF and create formatter
f = FormatterBuilder() f = FormatterBuilder()
f.append_line( f.append_line(
f"{f.extractor( f"""{f.extractor(lambda nonterminal:
lambda nonterminal: CFGExtractor(nonterminal, kbnf_string) CFGExtractor(nonterminal, kbnf_string))}"""
)}"
) )
except Exception: except Exception:
logger.error( logger.error(

View File

@@ -39,7 +39,6 @@ from common.health import HealthManager
from backends.exllamav2.grammar import ( from backends.exllamav2.grammar import (
ExLlamaV2Grammar, ExLlamaV2Grammar,
clear_grammar_func_cache,
) )
from backends.exllamav2.utils import ( from backends.exllamav2.utils import (
exllama_disabled_flash_attn, exllama_disabled_flash_attn,