Stopped working yesterday
For some reason, the minimum working example doesn't work anymore.
"---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in <cell line: 26>()
25 # Compute token embeddings
26 with torch.no_grad():
---> 27 model_output = model(**encoded_input)
28
29 # Perform pooling. In this case, max pooling.
3 frames
/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py in _wrapped_call_impl(self, *args, **kwargs)
1509 return self._compiled_call_impl(*args, **kwargs) # type: ignore[misc]
1510 else:
-> 1511 return self._call_impl(*args, **kwargs)
1512
1513 def _call_impl(self, *args, **kwargs):
/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py in _call_impl(self, *args, **kwargs)
1518 or _global_backward_pre_hooks or _global_backward_hooks
1519 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1520 return forward_call(*args, **kwargs)
1521
1522 try:
/usr/local/lib/python3.10/dist-packages/transformers/models/bert/modeling_bert.py in forward(self, input_ids, attention_mask, token_type_ids, position_ids, head_mask, inputs_embeds, encoder_hidden_states, encoder_attention_mask, past_key_values, use_cache, output_attentions, output_hidden_states, return_dict)
1083
1084 use_sdpa_attention_masks = (
-> 1085 self.attn_implementation == "sdpa"
1086 and self.position_embedding_type == "absolute"
1087 and head_mask is None
/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py in getattr(self, name)
1686 if name in modules:
1687 return modules[name]
-> 1688 raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")
1689
1690 def setattr(self, name: str, value: Union[Tensor, 'Module']) -> None:
AttributeError: 'LSGBertModel' object has no attribute 'attn_implementation'
"
could be a problem with your python packages, Transformers are evolving fast, I suggest to look into the git repo of LSG in order to get the required package/version supported by the LSG library, build a docker file with those packages to ensure correct dependency usage.
It worked downgrading to 4.40.2, thx