# SPDX-License-Identifier: Apache-2.0 """Out-of-tree vLLM plugin for LiquidAI LFM3 (Lfm3ForCausalLM). Loaded through the ``vllm.general_plugins`` entry point in every vLLM process (API server, EngineCore, workers). """ import logging logger = logging.getLogger(__name__) def register() -> None: from vllm import ModelRegistry if "Lfm3ForCausalLM" not in ModelRegistry.get_supported_archs(): # lazy "module:class" form: the model module is only imported when used ModelRegistry.register_model("Lfm3ForCausalLM", "vllm_lfm3.model:Lfm3ForCausalLM") # Lets transformers (and therefore vLLM) parse config.json with model_type "lfm3" # without --trust-remote-code. from transformers import AutoConfig from .configuration_lfm3 import Lfm3Config try: AutoConfig.register("lfm3", Lfm3Config) except ValueError: pass # already registered (e.g. a future transformers ships lfm3)