Upload folder using huggingface_hub
Browse files- modeling_GOT.py +2 -2
modeling_GOT.py
CHANGED
|
@@ -271,8 +271,8 @@ class GOTQwenModel(Qwen2Model):
|
|
| 271 |
|
| 272 |
if use_im_start_end:
|
| 273 |
if (cur_input_ids == im_start_token).sum() != (cur_input_ids == im_end_token).sum():
|
| 274 |
-
|
| 275 |
-
|
| 276 |
image_start_tokens = torch.where(cur_input_ids == im_start_token)[0]
|
| 277 |
for image_start_token_pos, per_cur_image_features in zip(image_start_tokens, cur_image_features):
|
| 278 |
per_cur_image_features = per_cur_image_features.to(device=cur_input_embeds.device)
|
|
|
|
| 271 |
|
| 272 |
if use_im_start_end:
|
| 273 |
if (cur_input_ids == im_start_token).sum() != (cur_input_ids == im_end_token).sum():
|
| 274 |
+
print("Warning Please start, end image token not align")
|
| 275 |
+
|
| 276 |
image_start_tokens = torch.where(cur_input_ids == im_start_token)[0]
|
| 277 |
for image_start_token_pos, per_cur_image_features in zip(image_start_tokens, cur_image_features):
|
| 278 |
per_cur_image_features = per_cur_image_features.to(device=cur_input_embeds.device)
|