[Bugfix] Fix CFGGuide and use outlines for grammars that can't convert to GBNF (#11389)

Signed-off-by: mgoin <michael@neuralmagic.com>
This commit is contained in:
Michael Goin
2024-12-23 10:06:20 -05:00
committed by GitHub
parent e51719ae72
commit 5bfb30a529
5 changed files with 103 additions and 86 deletions

View File

@@ -174,11 +174,6 @@ def test_guided_choice_completion(sample_guided_choice, llm,
@pytest.mark.parametrize("guided_decoding_backend", GUIDED_DECODING_BACKENDS)
def test_guided_grammar(sample_sql_statements, llm,
guided_decoding_backend: str):
if guided_decoding_backend == "outlines":
pytest.skip("Outlines backend fails in this test case with:\n"
"AttributeError: Error in model execution: 'ParserConf' "
"object has no attribute 'deterministic'")
sampling_params = SamplingParams(temperature=0.8,
top_p=0.95,
max_tokens=1000,