pymllm.orchestrator.detokenizer_process¶
DetokenizerProcess – subprocess that converts token IDs back to text.
Receives BatchTokenIDOut-style dicts from the SchedulerProcess,
detokenizes them, and forwards the decoded strings to the
RequestResponseProcess.
Attributes¶
Classes¶
Runs inside a subprocess. Detokenizes finished outputs. |
Functions¶
|
Entry point for |
Module Contents¶
- pymllm.orchestrator.detokenizer_process.logger¶
- class pymllm.orchestrator.detokenizer_process.DetokenizerProcess(recv_from_scheduler_addr, send_to_rr_addr, tokenizer_cfg=None)¶
Runs inside a subprocess. Detokenizes finished outputs.
- Parameters:
recv_from_scheduler_addr (str)
send_to_rr_addr (str)
tokenizer_cfg (Optional[Dict[str, Any]])
- init_sockets()¶
- Return type:
None
- init_tokenizer()¶
Load the tokenizer from the configured path.
- Return type:
None
- event_loop()¶
Infinite loop: recv token IDs -> detokenize -> send text to RR.
- Return type:
None
- shutdown()¶
- Return type:
None
- pymllm.orchestrator.detokenizer_process.run_detokenizer_process(recv_from_scheduler_addr, send_to_rr_addr, pipe_writer, tokenizer_cfg=None)¶
Entry point for
torch.multiprocessing.Process(target=...).- Parameters:
recv_from_scheduler_addr (str)
send_to_rr_addr (str)
pipe_writer (multiprocessing.connection.Connection)
tokenizer_cfg (Optional[Dict[str, Any]])
- Return type:
None