Update modeling_minicpmv.py
Browse files307 unmodified lines308309310311311312313314315315316317318307 unmodified lines batch[place] = tensor attention_mask.append(to_add) # attention_mask = torch.tensor(attention_mask) attention_mask = torch.tensor(attention_mask) print(attention_mask.shape) print(attention_mask, "ATTENTION") attention_mask = attention_mask.to(self.device) # attention_mask = attention_mask.to(self.device) # padded_tensors = [torch.nn.functional.pad(tensor, (0, 0, 0, max_x - tensor.shape[1])) for tensor in batch] # Step 3: Stack the padded tensors into a single batchmodeling_minicpmv.py+2-2