ray.serve.llm.LLMServer.sync_init#

classmethod LLMServer.sync_init(llm_config: LLMConfig, *, engine_cls: Type[LLMEngine] | None = None, model_downloader: Type[LoraModelLoader] | None = None) LLMServer[source]#

Synchronous constructor that returns an unstarted instance.

This is used for testing the new pattern where initialization and starting are explicitly separated.

Parameters:
  • llm_config – LLMConfig for the model.

  • engine_cls – Dependency injection for the vllm engine class. Defaults to VLLMEngine.

  • model_downloader – Dependency injection for the model downloader. Defaults to LoraModelLoader.

Returns:

An unstarted LLMServer instance. Caller must call await start().