From 0b3731f8d9f36cd9b488236fd834da3829b9311d Mon Sep 17 00:00:00 2001 From: DarkLight1337 Date: Sun, 6 Oct 2024 15:30:25 +0000 Subject: [PATCH] Update docs --- .../vllm_add_dummy_model/my_gemma_embedding.py | 1 + vllm/model_executor/models/interfaces_base.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_gemma_embedding.py b/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_gemma_embedding.py index 71c824c6a91c..0a7bbfdc23cf 100644 --- a/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_gemma_embedding.py +++ b/tests/plugins/vllm_add_dummy_model/vllm_add_dummy_model/my_gemma_embedding.py @@ -11,4 +11,5 @@ def forward(self, *args, **kwargs) -> torch.Tensor: # We assume PP isn't used in the test assert isinstance(hidden_states, torch.Tensor) + # Return all-zero embeddings return torch.zeros_like(hidden_states) diff --git a/vllm/model_executor/models/interfaces_base.py b/vllm/model_executor/models/interfaces_base.py index aeafb25928f4..6577488f1235 100644 --- a/vllm/model_executor/models/interfaces_base.py +++ b/vllm/model_executor/models/interfaces_base.py @@ -15,7 +15,8 @@ from vllm.model_executor.sampling_metadata import SamplingMetadata # NOTE: Unlike those in `interfaces.py`, we don't define `ClassVar` tags -# for the base interfaces to avoid breaking OOT registration +# for the base interfaces to avoid breaking OOT registration for existing models +# that don't inherit from the base interface classes # The type of hidden states # Currently, T = torch.Tensor for all models except for Medusa