We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a55c950 commit 2f6e6b3Copy full SHA for 2f6e6b3
vllm/entrypoints/openai/serving_engine.py
@@ -957,9 +957,11 @@ def _load_prompt_embeds(
957
def _load_and_validate_embed(embed: bytes) -> EmbedsPrompt:
958
tensor = torch.load(io.BytesIO(base64.b64decode(embed)),
959
weights_only=True)
960
- assert isinstance(
961
- tensor,
962
- (torch.FloatTensor, torch.BFloat16Tensor, torch.HalfTensor))
+ assert isinstance(tensor, torch.Tensor) and tensor.dtype in (
+ torch.float32,
+ torch.bfloat16,
963
+ torch.float16,
964
+ )
965
if tensor.dim() > 2:
966
tensor = tensor.squeeze(0)
967
assert tensor.dim() == 2
0 commit comments