fix: Comments to English for better dev experience (#15768)
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
parent
bb103b29bf
commit
70fedd0f79
@ -509,7 +509,7 @@ class DeepseekVLV2ForCausalLM(nn.Module, SupportsMultiModal, SupportsPP):
|
|||||||
_, hw, n_dim = images_embeds.shape
|
_, hw, n_dim = images_embeds.shape
|
||||||
h = w = int(hw**0.5)
|
h = w = int(hw**0.5)
|
||||||
|
|
||||||
# 根据self.tile_tag & self.global_view_pos填充image token sequence
|
# fill image token based on self.tile_tag & self.global_view_pos
|
||||||
tile_index = 0
|
tile_index = 0
|
||||||
vision_embeddings = []
|
vision_embeddings = []
|
||||||
for jdx in range(images_spatial_crop.size(0)):
|
for jdx in range(images_spatial_crop.size(0)):
|
||||||
|
@ -226,7 +226,7 @@ class DeepseekVLV2Processor(ProcessorMixin):
|
|||||||
input_ids[input_ids < 0] = self.pad_id
|
input_ids[input_ids < 0] = self.pad_id
|
||||||
|
|
||||||
if inference_mode:
|
if inference_mode:
|
||||||
# 去掉结尾的eos token
|
# Remove the ending eos token
|
||||||
assert input_ids[-1] == self.eos_id
|
assert input_ids[-1] == self.eos_id
|
||||||
input_ids = input_ids[:-1]
|
input_ids = input_ids[:-1]
|
||||||
target_ids = target_ids[:-1]
|
target_ids = target_ids[:-1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user