Skip to content

vllm.v1.engine.llm_engine

Classes:

  • LLMEngine –

    Legacy LLMEngine for backwards compatibility.

LLMEngine

Legacy LLMEngine for backwards compatibility.

Methods:

_cleanup_instance_caches(model_ref) staticmethod

Remove the bytecode hooks that pin the compiled model.

_register_lora(lora_request)

Rejects a lora_int_id already used by a different adapter, since the workers would serve it with the other adapter's weights. load_inplace replaces the adapter behind the id. The online server assigns ids itself, so only offline callers can collide.

abort_request(request_ids, internal=False)

Remove request_ids from EngineCore and Detokenizer.

add_lora(lora_request)

Load a new LoRA adapter into the engine for future requests.

do_log_stats()

Log stats if logging is enabled.

do_log_stats_with_interval()

Log stats when the time interval has passed.

from_engine_args(engine_args, usage_context=UsageContext.ENGINE_CONTEXT, stat_loggers=None, enable_multiprocessing=False) classmethod

Creates an LLM engine from the engine arguments.

get_weight_version()

Return the latest committed weight version.

list_loras()

List all registered adapters.

pin_lora(lora_id)

Prevent an adapter from being evicted.

remove_lora(lora_id)

Remove an already loaded LoRA adapter.

reset_encoder_cache()

Reset the encoder cache to invalidate all cached encoder outputs.

This should be called when model weights are updated to ensure stale vision embeddings computed with old weights are not reused.