PDPrefillServer#
- class ray.serve.llm.deployment.PDPrefillServer(llm_config: LLMConfig, *, engine_cls: Type[LLMEngine] | None = None, model_downloader: Type[LoraModelLoader] | None = None)[source]#
Bases:
PDPrefillServerPrefill-side LLM server for prefill-decode disaggregation.
A standard LLMServer with an additional
prewarm_prefillmethod used during the optional pre-warm handshake.Methods
Asynchronous constructor that returns a fully started instance.
Runs a chat request to the LLM engine and returns the response.
Check the health of the replica.
Execute a collective RPC call on all workers.
Runs a completion request to the LLM engine and returns the response.
Detokenize the input token IDs.
Runs an embeddings request to the engine and returns the response.
Check whether the engine is currently paused.
Check whether the engine is currently sleeping.
Pause generation on the engine.
Run one prefill pass and return kv_transfer_params as a dict.
Publish this prefill replica's connector coordination metadata.
Serve request-router hook, polled by the controller.
Reset the KV prefix cache on the engine.
Resume generation on the engine after pause.
Runs a score request to the engine and returns the response.
Put the engine to sleep.
Start the underlying engine.
Start profiling
Stop profiling
Synchronous constructor that returns an unstarted instance.
Tokenize the input text.
Runs an transcriptions request to the engine and returns the response.
Wake up the engine from sleep mode.