From 562339abc321ac5e86cc7b000ef0734839eea49f Mon Sep 17 00:00:00 2001 From: Shanshan Shen <467638484@qq.com> Date: Thu, 5 Mar 2026 06:25:56 +0800 Subject: [PATCH] [Misc] Support OOT linear method registering (#35981) Signed-off-by: shen-shanshan <467638484@qq.com> --- vllm/model_executor/layers/linear.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vllm/model_executor/layers/linear.py b/vllm/model_executor/layers/linear.py index bfcdaa4c0c..dfe1808837 100644 --- a/vllm/model_executor/layers/linear.py +++ b/vllm/model_executor/layers/linear.py @@ -64,6 +64,12 @@ WEIGHT_LOADER_V2_SUPPORTED = [ ] +def register_weight_loader_v2_supported_method(cls): + """Decorator to register a LinearMethod as supporting weight_loader_v2.""" + WEIGHT_LOADER_V2_SUPPORTED.append(cls.__name__) + return cls + + def adjust_marlin_shard( param: Parameter, shard_size: int,