pymllm.orchestrator.detokenizer_process ======================================= .. py:module:: pymllm.orchestrator.detokenizer_process .. autoapi-nested-parse:: 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 ---------- .. autoapisummary:: pymllm.orchestrator.detokenizer_process.logger Classes ------- .. autoapisummary:: pymllm.orchestrator.detokenizer_process.DetokenizerProcess Functions --------- .. autoapisummary:: pymllm.orchestrator.detokenizer_process.run_detokenizer_process Module Contents --------------- .. py:data:: logger .. py:class:: DetokenizerProcess(recv_from_scheduler_addr, send_to_rr_addr, tokenizer_cfg = None) Runs inside a subprocess. Detokenizes finished outputs. .. py:method:: init_sockets() .. py:method:: init_tokenizer() Load the tokenizer from the configured path. .. py:method:: event_loop() Infinite loop: recv token IDs -> detokenize -> send text to RR. .. py:method:: shutdown() .. py:function:: run_detokenizer_process(recv_from_scheduler_addr, send_to_rr_addr, pipe_writer, tokenizer_cfg = None) Entry point for ``torch.multiprocessing.Process(target=...)``.