Crystalcareai commited on
Commit
23c0feb
·
verified ·
1 Parent(s): d33b844

Update modeling_quiet.py

Browse files
Files changed (1) hide show
  1. 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