sdadas wwydmanski commited on
Commit
ef4d808
1 Parent(s): 7296f33

fix: invalid variable (#2)

Browse files

- fix: invalid variable (ea297b504c63c3bc2735dbd3f668ab1400452761)


Co-authored-by: Witold Wydmański <wwydmanski@users.noreply.huggingface.co>

Files changed (1) hide show
  1. modeling_roberta.py +1 -1
modeling_roberta.py CHANGED
@@ -408,7 +408,7 @@ class RobertaFlashAttention2(RobertaSelfAttention):
408
  elif hasattr(self.config, "_pre_quantization_dtype"):
409
  target_dtype = self.config._pre_quantization_dtype
410
  else:
411
- target_dtype = self.q_lin.weight.dtype
412
 
413
  logger.warning_once(
414
  f"The input hidden states seems to be silently casted in float32, this might be related to"
 
408
  elif hasattr(self.config, "_pre_quantization_dtype"):
409
  target_dtype = self.config._pre_quantization_dtype
410
  else:
411
+ target_dtype = self.query.weight.dtype
412
 
413
  logger.warning_once(
414
  f"The input hidden states seems to be silently casted in float32, this might be related to"