vLLM Engine Initialization
The initialize_llm_engine step creates a vllm.LLM instance and stores it in the experiment context.
Installation
Section titled “Installation”pip install --upgrade --pre crystallize-extras[vllm]from crystallize_extras.vllm_step import initialize_llm_engine
init_engine = initialize_llm_engine(engine_options={"model": "mistral"})pipeline = Pipeline([init_engine, generate_predictions()])- The step runs during pipeline setup, storing a
resource_factoryunder the context key (defaultllm_engine). - Access the cached engine inside later steps:
engine = ctx.get("llm_engine")(ctx). - Pass a different
context_keyif you need multiple engines.
If vllm is not installed, the step raises an informative error suggesting pip install crystallize-extras[vllm].