|
Formatron v0.4.2
Formatron empowers everyone to control the output format of language models with minimal overhead.
|
This module integrates the vllm library by providing convenience utilities. More...
Classes | |
| class | FormattersLogitsProcessor |
| Logit processor that uses formatters to mask batch logits. More... | |
Functions | |
| kbnf.Vocabulary | create_engine_vocabulary (LLM llm) |
| Create a vocabulary for the KBNF engine. | |
| FormattersLogitsProcessor | create_formatters_logits_processor (LLM llm, typing.Sequence[FormatterBuilder|None]|FormatterBuilder formatter_builders, typing.Sequence[EngineGenerationConfig] configs=None) |
| Create a formatter logits processor. | |
This module integrates the vllm library by providing convenience utilities.
| kbnf.Vocabulary formatron.integrations.vllm.create_engine_vocabulary | ( | LLM | llm | ) |
| FormattersLogitsProcessor formatron.integrations.vllm.create_formatters_logits_processor | ( | LLM | llm, |
| typing.Sequence[FormatterBuilder | None] | FormatterBuilder | formatter_builders, | ||
| typing.Sequence[EngineGenerationConfig] | configs = None ) |