mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-17 01:25:02 +08:00
Revert invalid spellchecker fix on deepseek_vl2 (#20618)
This commit is contained in:
parent
dd382e0fe3
commit
c6c22f16d3
@ -351,11 +351,11 @@ class DeepseekVLV2ForCausalLM(nn.Module, SupportsMultiModal, SupportsPP):
|
|||||||
embed_std = 1 / torch.sqrt(
|
embed_std = 1 / torch.sqrt(
|
||||||
torch.tensor(self.projector_config.n_embed, dtype=torch.float32))
|
torch.tensor(self.projector_config.n_embed, dtype=torch.float32))
|
||||||
if self.tile_tag == "2D":
|
if self.tile_tag == "2D":
|
||||||
# <|view_separator|>, <|\n|>
|
# <|view_seperator|>, <|\n|>
|
||||||
self.image_newline = nn.Parameter(
|
self.image_newline = nn.Parameter(
|
||||||
torch.randn(self.projector_config.n_embed) * embed_std)
|
torch.randn(self.projector_config.n_embed) * embed_std)
|
||||||
# This is a typo in original implementation
|
# This is a typo in original implementation
|
||||||
self.view_separator = nn.Parameter(
|
self.view_seperator = nn.Parameter(
|
||||||
torch.randn(self.projector_config.n_embed) * embed_std)
|
torch.randn(self.projector_config.n_embed) * embed_std)
|
||||||
else:
|
else:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
@ -560,13 +560,13 @@ class DeepseekVLV2ForCausalLM(nn.Module, SupportsMultiModal, SupportsPP):
|
|||||||
if self.global_view_pos == "head":
|
if self.global_view_pos == "head":
|
||||||
global_local_features = torch.cat([
|
global_local_features = torch.cat([
|
||||||
global_features,
|
global_features,
|
||||||
self.view_separator[None, :],
|
self.view_seperator[None, :],
|
||||||
local_features,
|
local_features,
|
||||||
])
|
])
|
||||||
else:
|
else:
|
||||||
global_local_features = torch.cat([
|
global_local_features = torch.cat([
|
||||||
local_features,
|
local_features,
|
||||||
self.view_separator[None, :],
|
self.view_seperator[None, :],
|
||||||
global_features,
|
global_features,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user