nemo_rl.models.generation.vllm.captured_chat_logprobs#
Avoid constructing OpenAI logprob objects discarded by terminal capture.
Module Contents#
Classes#
Scope a formatting-only bypass to one serving instance and request task. |
Data#
API#
- nemo_rl.models.generation.vllm.captured_chat_logprobs._G_BYPASS_OWNER: contextvars.ContextVar[tuple[object, asyncio.Task[Any] | None, int] | None]#
‘ContextVar(…)’
- class nemo_rl.models.generation.vllm.captured_chat_logprobs._ChatLogprobsBuilder#
Bases:
typing.Protocol- _create_chat_logprobs(
- *args: Any,
- **kwargs: Any,
- class nemo_rl.models.generation.vllm.captured_chat_logprobs.CapturedChatLogprobsMixin#
Scope a formatting-only bypass to one serving instance and request task.
Place before vLLM’s OpenAIServingChat in the MRO. Engine sampling parameters and the raw-array attachment/validation path remain unchanged.
- _bypass_chat_logprobs(
- *,
- enabled: bool,
Enable only around full-response formatting for admitted raw capture.
- _create_chat_logprobs(
- *args: Any,
- **kwargs: Any,
Delegate normally, or omit objects that capture will strip after PUT.