forked from mesolitica/vllm-whisper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Bugfix][Model] Add base class for vision-language models (vllm-proje…
- Loading branch information
1 parent
dda7985
commit bcb49a9
Showing
4 changed files
with
53 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import pytest | ||
|
||
from vllm.model_executor.models import _MODELS, ModelRegistry | ||
|
||
|
||
@pytest.mark.parametrize("model_cls", _MODELS) | ||
def test_registry_imports(model_cls): | ||
# Ensure all model classes can be imported successfully | ||
ModelRegistry.load_model_cls(model_cls) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from torch import nn | ||
|
||
from vllm.config import VisionLanguageConfig | ||
|
||
|
||
class VisionLanguageModelBase(nn.Module): | ||
"""Base class for all vision language models (VLMs).""" | ||
|
||
def __init__(self, vision_language_config: VisionLanguageConfig) -> None: | ||
super().__init__() | ||
|
||
self.vision_language_config = vision_language_config |