vllm.parser.beam
¶
Parser for Beam checkpoints.
Classes:
-
BeamParser–Parse Beam output with the checkpoint's
response_templatemetadata, -
BeamReasoningParser–Selects
BeamParseras the reasoning parser. -
BeamToolParser–Selects
BeamParseras the tool parser.
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
¶
BeamToolParser
¶
_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.