Logit processor that uses formatters to mask batch logits.
More...
Logit processor that uses formatters to mask batch logits.
Definition at line 18 of file vllm.py.
◆ __init__()
formatron.integrations.vllm.FormattersLogitsProcessor.__init__ |
( |
| self, |
|
|
typing.Sequence[FormatterBase | None] | formatters, |
|
|
int | eos_token_id, |
|
|
typing.Sequence[EngineGenerationConfig] | None | configs = None ) |
◆ __call__()
formatron.integrations.vllm.FormattersLogitsProcessor.__call__ |
( |
| self, |
|
|
| prompt, |
|
|
| generated_tokens, |
|
|
| logits ) |
◆ _to_next_batch_step()
formatron.integrations.vllm.FormattersLogitsProcessor._to_next_batch_step |
( |
| self | ) |
|
|
protected |
◆ formatters_captures()
list[dict[str, typing.Any] | None] formatron.integrations.vllm.FormattersLogitsProcessor.formatters_captures |
( |
| self | ) |
|
◆ is_completed()
list[bool | None] formatron.integrations.vllm.FormattersLogitsProcessor.is_completed |
( |
| self | ) |
|
Check if the formatters are completed.
Each boolean in the list corresponds to the completion status of the formatter at the same index.
Definition at line 50 of file vllm.py.
◆ reset()
None formatron.integrations.vllm.FormattersLogitsProcessor.reset |
( |
| self | ) |
|
◆ _configs
formatron.integrations.vllm.FormattersLogitsProcessor._configs |
|
protected |
◆ _debug_counter
formatron.integrations.vllm.FormattersLogitsProcessor._debug_counter |
|
protected |
◆ _eos_token_id
formatron.integrations.vllm.FormattersLogitsProcessor._eos_token_id |
|
protected |
◆ _formatters
formatron.integrations.vllm.FormattersLogitsProcessor._formatters |
|
protected |
◆ _iter
formatron.integrations.vllm.FormattersLogitsProcessor._iter |
|
protected |
◆ _last_input_id_length
formatron.integrations.vllm.FormattersLogitsProcessor._last_input_id_length |
|
protected |
The documentation for this class was generated from the following file: