Skip to content

Commit e808156

Browse files
[Misc] Collect model support info in a single process per model (#9233)
1 parent cbc2ef5 commit e808156

File tree

4 files changed

+228
-159
lines changed

4 files changed

+228
-159
lines changed

docs/source/models/adding_model.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ This method should load the weights from the HuggingFace's checkpoint file and a
9999
5. Register your model
100100
----------------------
101101

102-
Finally, register your :code:`*ForCausalLM` class to the :code:`_MODELS` in `vllm/model_executor/models/registry.py <https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/models/registry.py>`_.
102+
Finally, register your :code:`*ForCausalLM` class to the :code:`_VLLM_MODELS` in `vllm/model_executor/models/registry.py <https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/models/registry.py>`_.
103103

104104
6. Out-of-Tree Model Integration
105105
--------------------------------------------

vllm/engine/arg_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ class EngineArgs:
183183
def __post_init__(self):
184184
if self.tokenizer is None:
185185
self.tokenizer = self.model
186+
187+
# Setup plugins
186188
from vllm.plugins import load_general_plugins
187189
load_general_plugins()
188190

vllm/engine/multiprocessing/engine.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ def dead_error(self) -> BaseException:
130130
def from_engine_args(cls, engine_args: AsyncEngineArgs,
131131
usage_context: UsageContext, ipc_path: str):
132132
"""Creates an MQLLMEngine from the engine arguments."""
133+
# Setup plugins for each process
134+
from vllm.plugins import load_general_plugins
135+
load_general_plugins()
133136

134137
engine_config = engine_args.create_engine_config()
135138

0 commit comments

Comments
 (0)