Shivanandroy / Blog

1 stars 0 forks source link

Fine Tuning T5 Transformer Model with PyTorch - Shivanand Roy, Data Scientist #3

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Fine Tuning T5 Transformer Model with PyTorch - Shivanand Roy, Data Scientist

http://shivanandroy.com/fine-tune-t5-transformer-with-pytorch/

marouaneamz commented 1 year ago

how i can add another metric for training in your architect

tom192180 commented 1 year ago

Could you explain what y_ids and lmlabels means in the train function? for , data in enumerate(loader, 0): y = data["target_ids"].to(device, dtype=torch.long) y_ids = y[:, :-1].contiguous() lm_labels = y[:, 1:].clone().detach() lm_labels[y[:, 1:] == tokenizer.pad_token_id] = -100