Hi,
Iām trying to run the following :
from transformers import Seq2SeqTrainer
trainer = Seq2SeqTrainer(
args=training_args,
model=model,
train_dataset=common_voice[ātrainā],
eval_dataset=common_voice[ātestā],
data_collator=data_collator,
compute_metrics=compute_metrics,
tokenizer=processor.feature_extractor,
)
but I face this error :
Where this is the torch version Iām using :
AttributeError Traceback (most recent call last)
Cell In[71], line 3
1 from transformers import Seq2SeqTrainer
----> 3 trainer = Seq2SeqTrainer(
4 args=training_args,
5 model=model,
6 train_dataset=common_voice[ātrainā],
7 eval_dataset=common_voice[ātestā],
8 data_collator=data_collator,
9 compute_metrics=compute_metrics,
10 tokenizer=processor.feature_extractor,
11 )
File ~/anaconda3/envs/whisper-training/lib/python3.9/site-packages/transformers/trainer_seq2seq.py:57, in Seq2SeqTrainer.init(self, model, args, data_collator, train_dataset, eval_dataset, tokenizer, model_init, compute_metrics, callbacks, optimizers, preprocess_logits_for_metrics)
43 def init(
44 self,
45 model: Union[āPreTrainedModelā, nn.Module] = None,
(ā¦)
55 preprocess_logits_for_metrics: Optional[Callable[[torch.Tensor, torch.Tensor], torch.Tensor]] = None,
56 ):
ā> 57 super().init(
58 model=model,
59 args=args,
60 data_collator=data_collator,
ā¦
79 }
82 def _calc_scale_factor(tensor):
83 converted = tensor.numpy() if not isinstance(tensor, np.ndarray) else tensor
AttributeError: module ātorchā has no attribute āchalfā
Name: torch
Version: 1.10.0+cu113
Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration
with python 3.9.19
Note: Iām trying to fine-tune whisper-large-v3