Skip to content

Commit

Permalink
[Misc] Collect model support info in a single process per model (vllm…
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkLight1337 authored Oct 11, 2024
1 parent 03b228f commit 067f208
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 159 deletions.
2 changes: 1 addition & 1 deletion docs/source/models/adding_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ This method should load the weights from the HuggingFace's checkpoint file and a
5. Register your model
----------------------

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>`_.
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>`_.

6. Out-of-Tree Model Integration
--------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions vllm/engine/arg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ class EngineArgs:
def __post_init__(self):
if self.tokenizer is None:
self.tokenizer = self.model

# Setup plugins
from vllm.plugins import load_general_plugins
load_general_plugins()

Expand Down
3 changes: 3 additions & 0 deletions vllm/engine/multiprocessing/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ def dead_error(self) -> BaseException:
def from_engine_args(cls, engine_args: AsyncEngineArgs,
usage_context: UsageContext, ipc_path: str):
"""Creates an MQLLMEngine from the engine arguments."""
# Setup plugins for each process
from vllm.plugins import load_general_plugins
load_general_plugins()

engine_config = engine_args.create_engine_config()

Expand Down
Loading

0 comments on commit 067f208

Please sign in to comment.