Add LFM3-1.7B vLLM XPU plugin
Out-of-tree vLLM 0.32 plugin for LiquidAI LFM3 on Intel XPU: model, width-7 short-conv Triton kernels, Dockerfile, reference/API/bench tests, working notes and benchmark results. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
4e7a7ce903
26 files changed
+21423
No files matched your search
@@ -0,0 +1,29 @@
|
||||
# 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)
|
||||
Reference in new issue
Block a user