Skip to content

vllm.parser.beam

Parser for Beam checkpoints.

Classes:

BeamParser

Bases: ResponseTemplateParser

Parse Beam output with the checkpoint's response_template metadata, and constrain it with a grammar derived from that template.

_template_tag(request, *, message_start)

The template grammar for request, or None to leave its output to the request's own constraint, if any.

BeamReasoningParser

Bases: ResponseTemplateReasoningParser

Selects BeamParser as the reasoning parser.

BeamToolParser

Bases: ResponseTemplateToolParser

Selects BeamParser as the tool parser.

_open_field(template, prefix)

The field that prefix leaves open with its explicit opener, if any.

_starts_message(template, prefix)

Whether output after prefix starts the assistant message.