Closed swashiro closed 2 years ago
@sshleifer - think this is the 3rd issue about Bart pre-training -> maybe it would be a good idea to release a small notebook at some point.
@patil-suraj you took a stab at this at some point? this may have been optimistic :(
Yes, I was trying to port fairseq dataset here, same for t5, I'll try to focus more on it when I'm done with current PRs, should strat with a notebook as Patrick said, then try to include it in examples/
@patrickvonplaten Does that mean I can train with Masked-input, input(label) and Decoder-input?
yes, this should be possible
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@patil-suraj any news on the pretraining script for Bart?
If anyone wants to train their MBART model then feel free to use this. https://github.com/prajdabre/yanmtt
Contributions are welcome!
@patil-suraj excuse me, is there any news on the pretraining script for Bart? Thanks.
@thomas-li-sjtu you can try my toolkit if you like. It's based on transformers and allows for Bart/mbart pretraining. https://github.com/prajdabre/yanmtt
@thomas-li-sjtu you can try my toolkit if you like. It's based on transformers and allows for Bart/mbart pretraining. https://github.com/prajdabre/yanmtt
Hi there, here is my problem. I hope to pretrain a bart model based on my own dataset and fine tune it for another task (not nmt). I noticed that your toolkit designs for nmt so maybe it is not the one I need. Anyway, thanks for your reply!
@thomas-li-sjtu ok I understand. It's not just designed for NMT (despite its name). I've used it for summarisation and general NLG without problems. Good luck with your search.
@thomas-li-sjtu ok I understand. It's not just designed for NMT (despite its name). I've used it for summarisation and general NLG without problems. Good luck with your search.
Wow that is awesome. I will try it for my task!
@thomas-li-sjtu cool. Feel free to raise issues as it helps me add new functionality that may be of use to people. If you want to know how to use it for summarisation (or generic nlg) then look here: https://github.com/AI4Bharat/indic-bart
Sorry to only come back to this issue now. If anyone is interested in adding this example script in Transformers
, I would be more than happy to help :)
For BART pre-training we need the text-infilling + sentence-permutation data collator which you could find here https://github.com/morganmcg1/rotobart/blob/main/data_collator.py#L223
With this collator you could then modify and use run_summarization.py
script here https://github.com/huggingface/transformers/tree/master/examples/pytorch/summarization.
Let me know if anyone is interested. :) cc @patrickvonplaten
Sorry to only come back to this issue now. If anyone is interested in adding this example script in
Transformers
, I would be more than happy to help :)For BART pre-training we need the text-infilling + sentence-permutation data collator which you could find here https://github.com/morganmcg1/rotobart/blob/main/data_collator.py#L223
With this collator you could then modify and use
run_summarization.py
script here https://github.com/huggingface/transformers/tree/master/examples/pytorch/summarization.Let me know if anyone is interested. :) cc @patrickvonplaten
I think the BART pre-training script is very useful for my work and many others. It is generous of you to add this example script in 'Transfromers' !!!
Sorry to only come back to this issue now. If anyone is interested in adding this example script in
Transformers
, I would be more than happy to help :)For BART pre-training we need the text-infilling + sentence-permutation data collator which you could find here https://github.com/morganmcg1/rotobart/blob/main/data_collator.py#L223
With this collator you could then modify and use
run_summarization.py
script here https://github.com/huggingface/transformers/tree/master/examples/pytorch/summarization.Let me know if anyone is interested. :) cc @patrickvonplaten
Thanks for your reply and I think your method is absolutely feasible. But when I try it , I faced some errors that I can't fix. And could you please give me some help?
Here is my changes to run_summarization.py
(tag 4.11.0)
DataCollatorForDenoisingTasks
and also let class DataCollatorForDenoisingTasks
inherit class DataCollatorForSeq2Seq
in this way: class DataCollatorForDenoisingTasks(DataCollatorForSeq2Seq):
data_collator = DataCollatorForSeq2Seq(......)
-> data_collator = DataCollatorForDenoisingTasks(.......)
Run the changed script and I get errors below.
Traceback (most recent call last):
File "/home/whq/anaconda3/envs/pytorchenv/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3457, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "
Waiting for your generous reply! @patil-suraj
@Eurus-W make sure you convert the numpy arrays in the batch returned by data_collator()
into tensors.
batch["input_ids"] = torch.LongTensor(batch["input_ids"])
, for example.
❓ Questions & Help
How can I run BART pre-training? I have data to pre-training(Masked LM)