Update modeling_quiet.py
Browse files- modeling_quiet.py +0 -2
modeling_quiet.py
CHANGED
@@ -1880,8 +1880,6 @@ class QuietForCausalLM(QuietPreTrainedModel):
|
|
1880 |
attention_mask = attention_mask.expand(batch_size, 1, seq_len, seq_len)
|
1881 |
elif attention_mask.dim() != 4:
|
1882 |
raise ValueError(f"Attention mask should be of shape (batch_size, 1, seq_len, seq_len), but got {attention_mask.shape}")
|
1883 |
-
|
1884 |
-
attention_mask = attention_mask.to(dtype=torch.bool, device=input_ids.device)
|
1885 |
past_key_values = outputs.past_key_values
|
1886 |
position_ids = position_ids + 1
|
1887 |
|
|
|
1880 |
attention_mask = attention_mask.expand(batch_size, 1, seq_len, seq_len)
|
1881 |
elif attention_mask.dim() != 4:
|
1882 |
raise ValueError(f"Attention mask should be of shape (batch_size, 1, seq_len, seq_len), but got {attention_mask.shape}")
|
|
|
|
|
1883 |
past_key_values = outputs.past_key_values
|
1884 |
position_ids = position_ids + 1
|
1885 |
|