vllm.config.reasoning ¶
Classes:
-
ReasoningConfig–Configuration for reasoning models.
ReasoningConfig ¶
Configuration for reasoning models.
Set reasoning_start_str and reasoning_end_str to the strings that delimit the reasoning block (e.g. "<think>" and "</think>"). The corresponding token IDs are derived automatically via initialize_token_ids and are not intended to be set directly.
Methods:
-
initialize_token_ids–Initialize reasoning token IDs from strings using the tokenizer.
Attributes:
-
enabled(bool) –Returns True if reasoning is enabled (i.e. if token IDs have been
-
reasoning_end_str(str) –String that indicates the end of reasoning content.
-
reasoning_end_token_ids(list[int] | None) –Token IDs derived from
reasoning_end_str. Set automatically by -
reasoning_parser(str) –The name of the ReasoningParser to use for this model.
-
reasoning_start_str(str) –String that indicates the start of reasoning.
-
reasoning_start_token_ids(list[int] | None) –Token IDs derived from
reasoning_start_str. Set automatically by
Source code in vllm/config/reasoning.py
_enabled = field(default=False, init=False, repr=False) class-attribute instance-attribute ¶
Private field indicating whether reasoning token IDs have been initialized. Set to True by initialize_token_ids once token IDs are initialized.
_reasoning_end_token_ids = field(default=None, init=False, repr=False) class-attribute instance-attribute ¶
Private backing field for reasoning_end_token_ids. Set by initialize_token_ids. Not intended to be configured directly.
_reasoning_start_token_ids = field(default=None, init=False, repr=False) class-attribute instance-attribute ¶
Private backing field for reasoning_start_token_ids. Set by initialize_token_ids. Not intended to be configured directly.
enabled property ¶
Returns True if reasoning is enabled (i.e. if token IDs have been initialized), False otherwise.
reasoning_end_str = '' class-attribute instance-attribute ¶
String that indicates the end of reasoning content.
reasoning_end_token_ids property ¶
Token IDs derived from reasoning_end_str. Set automatically by initialize_token_ids. Not intended to be configured directly.
reasoning_parser = '' class-attribute instance-attribute ¶
The name of the ReasoningParser to use for this model.
reasoning_start_str = '' class-attribute instance-attribute ¶
String that indicates the start of reasoning.
reasoning_start_token_ids property ¶
Token IDs derived from reasoning_start_str. Set automatically by initialize_token_ids. Not intended to be configured directly.
initialize_token_ids(model_config) ¶
Initialize reasoning token IDs from strings using the tokenizer.