Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core][VLM] Test registration for OOT multimodal models #8717

Merged
merged 42 commits into from
Oct 4, 2024
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
cbb9dfb
fix
ywang96 Sep 22, 2024
7ae3e07
update doc
ywang96 Sep 22, 2024
b67ed86
iterate
ywang96 Sep 22, 2024
a9f3d3f
typo
ywang96 Sep 22, 2024
1d174d5
update
ywang96 Sep 22, 2024
4ec5b75
add test
ywang96 Sep 22, 2024
0ce8165
update conftest
ywang96 Sep 23, 2024
84094a4
add plugin loading to model config
ywang96 Sep 23, 2024
0c36bb1
fix and add test
ywang96 Sep 23, 2024
d203593
move plugin loading
ywang96 Sep 23, 2024
a020de6
infer multimodality
ywang96 Sep 23, 2024
51c961a
update doc
ywang96 Sep 23, 2024
81629f8
format
ywang96 Sep 23, 2024
ec204df
more robust check
ywang96 Sep 23, 2024
adbb063
add back the TODO for woosuk
ywang96 Sep 23, 2024
273ce7e
update
ywang96 Sep 23, 2024
19c31d9
try better config
ywang96 Sep 23, 2024
dbd198d
Fix CUDA re-initialization error
DarkLight1337 Sep 23, 2024
263a4e7
Revert "Fix CUDA re-initialization error"
DarkLight1337 Sep 23, 2024
b8e6e8d
try llava
ywang96 Sep 23, 2024
85cedeb
Add debug script
DarkLight1337 Sep 24, 2024
8952494
format
DarkLight1337 Sep 24, 2024
989fb16
format
DarkLight1337 Sep 24, 2024
732d462
Avoid CUDA reinitialization error
DarkLight1337 Sep 24, 2024
bf369e5
Improve debug script
DarkLight1337 Sep 24, 2024
571eda9
patch
ywang96 Sep 24, 2024
af7e746
Merge branch 'main' into fix-oot-multi-modal
ywang96 Sep 25, 2024
52b600b
switch
ywang96 Sep 25, 2024
45fb02b
Try instead reducing model memory
DarkLight1337 Sep 25, 2024
7c987e9
Reorder the tests
DarkLight1337 Sep 25, 2024
45a6fa8
Iterate
DarkLight1337 Sep 25, 2024
2732bc3
Merge branch 'main' into fix-oot-multi-modal
DarkLight1337 Sep 25, 2024
1774fd5
Merge branch 'main' into fix-oot-multi-modal
DarkLight1337 Sep 25, 2024
36f33f8
Merge branch 'main' into fix-oot-multi-modal
DarkLight1337 Sep 29, 2024
83e86e4
Try limit `max_num_seqs`
DarkLight1337 Sep 29, 2024
8f9f7b5
No need to set this anymore
DarkLight1337 Sep 29, 2024
113d3f0
Remove the need for deferred imports
DarkLight1337 Sep 29, 2024
2066ff3
Try separating out `test_accuracy.py` and `test_audio.py`
DarkLight1337 Sep 29, 2024
3e1461e
Merge branch 'main' into fix-oot-multi-modal
DarkLight1337 Oct 4, 2024
e399079
Enable lazy import
DarkLight1337 Oct 4, 2024
cf980b4
Revert test pipeline
DarkLight1337 Oct 4, 2024
dada11d
Update docs
DarkLight1337 Oct 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions vllm/model_executor/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
# Architecture -> type.
# out of tree models
_OOT_MODELS: Dict[str, Type[nn.Module]] = {}
_OOT_MULTIMODAL_MODELS: Dict[str, Type[nn.Module]] = {}

# Models not supported by ROCm.
_ROCM_UNSUPPORTED_MODELS: List[str] = []
Expand Down Expand Up @@ -189,12 +190,21 @@ def get_supported_archs() -> List[str]:
return list(_MODELS.keys()) + list(_OOT_MODELS.keys())

@staticmethod
def register_model(model_arch: str, model_cls: Type[nn.Module]):
def register_model(model_arch: str,
model_cls: Type[nn.Module],
is_multimodal: bool = False):
if model_arch in _MODELS:
logger.warning(
"Model architecture %s is already registered, and will be "
"overwritten by the new model class %s.", model_arch,
model_cls.__name__)

DarkLight1337 marked this conversation as resolved.
Show resolved Hide resolved
# NOTE: This is needed to store the information if the OOT model is
# an multimodal model.
if is_multimodal:
global _OOT_MULTIMODAL_MODELS
_OOT_MULTIMODAL_MODELS[model_arch] = model_cls

global _OOT_MODELS
youkaichao marked this conversation as resolved.
Show resolved Hide resolved
_OOT_MODELS[model_arch] = model_cls

Expand All @@ -209,7 +219,8 @@ def is_multimodal_model(model_arch: str) -> bool:
# use `supports_multimodal` to determine if a model is multimodal
# model_cls = ModelRegistry._try_load_model_cls(model_arch)
# from vllm.model_executor.models.interfaces import supports_multimodal
return model_arch in _MULTIMODAL_MODELS
return (model_arch in _MULTIMODAL_MODELS
or model_arch in _OOT_MULTIMODAL_MODELS)


__all__ = [
Expand Down
Loading