jonathanjordan21 commited on
Commit
a10e5a2
1 Parent(s): 84163fa

Update modeling_qwen2_nomic_vision.py

Browse files
Files changed (1) hide show
  1. modeling_qwen2_nomic_vision.py +3 -3
modeling_qwen2_nomic_vision.py CHANGED
@@ -1207,9 +1207,9 @@ class Qwen2NomicVisionForCausalLM(Qwen2NomicVisionPreTrainedModel, GenerationMix
1207
 
1208
  loss = None
1209
  if labels is not None:
1210
- label_image = self.lm_head(outputs[-1][:, -num_logits_to_keep:, :])
1211
- print(label_image.shape, labels.shape)
1212
- labels = torch.concat([label_image, labels], dim=1)
1213
  loss = self.loss_function(logits, labels, self.vocab_size, **loss_kwargs)
1214
 
1215
  if not return_dict:
 
1207
 
1208
  loss = None
1209
  if labels is not None:
1210
+ # label_image = self.lm_head(outputs[-1][:, -num_logits_to_keep:, :])
1211
+ # print(label_image.shape, labels.shape)
1212
+ # labels = torch.concat([label_image, labels], dim=1)
1213
  loss = self.loss_function(logits, labels, self.vocab_size, **loss_kwargs)
1214
 
1215
  if not return_dict: