New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how can i generate summary from the given text with provided pretrained model? #1
Comments
For summarization task,
|
Thank you very much for your help and prompt reply.
|
now I am able to summarize the text. |
@qiweizhen How can I use the pre-trained model to generate questions for my own dataset, Just inference, Not training or finetuning on own data. |
@pragnakalpdev6 Actually it's trained as a abstractive summarization model. Perhaps it behaves like a extractive model because of the difference of your input-text corpus with the CNN/DM corpus, and generating a sentence from your given text is easier. You may try the gigaword fine-tuned checkpoint and see does it work better. |
@monk1337 same as discussed above, but use Squad question generation fine-tuned checkpoint instead. |
@qiweizhen the link provided for evaluate question generation is not valid. do you have the code ? Thanks |
@cddpeter You can download it from here : |
@qiweizhen Thank you for the reply, I tried your instructions and it worked. But I want to try pre-trained model on my raw data ( I don't have labels for that ) but in eval file you are proving test pa and test qa for eval. How can I pass a corpus in .txt file with multiple paragraphs and get the questions for each paragraph in output file if I don't have labels ( questions ) for that file . |
@monk1337 Thanks. |
@monk1337 I got an error when I run the evaluation file, ValueError: unsupported hash type md5. Did you have this issue when you run it? |
@cddpeter no I didn't get the error you mentioned above |
@qiweizhen Any suggestion
|
@qiweizhen summarization not working well generates same file as input |
Hi @pragnakalpdev6 As a beginner, it's hard for me understand how to use these codes for Abstractive summarization. Every where it's mention translation. Could you please share some high level steps or upload shareable code to your github. Thanks. |
@sivakumar1604 are you a beginner to python in general, or specifically abstractive summarisation? If just summarisation with a strong NLP foundation, I found it useful to adapt the pytorch tutorial on the transformer to a summarisation tasks (https://pytorch.org/tutorials/beginner/transformer_tutorial.html). You ask for high level steps, what task specifically do you want to solve? |
Hi Thanks for your reply, i'm working Abstractive summarization with ProphetNet. It's not clear for me, from the github documentation. It's seems the examples provided mainy focuses on translation task. Probably because I'm new to fairseq n Pytorch.I've mostly used Tensorflow with Keras till now. I have theoretical understanding of RNN, LSTM, attention, encoder-decoder networks etc. Also implemented abstractive summarization with Transformers package on CNNDM dataset. If there's any notebook/blog post on how to use Prophet Net for abstractive summarization on domain specific dataset, that would be great. |
To evaluate QG results, two parts of code should be downloaded from other repos: This happed because the original evaluation files are not changed to be used, and we recommond users to cite their repos rather than redistributing. |
This happed because it's the way how Fairseq shows its results. S means source, T means golden target and H means generated hypothesis. You can fetch the desired part from it manually, for example, grep ^H $OUTPUT_FILE | cut -c 3- | sort -n | cut -f3- | sed "s/ ##//g" > cnndm/sort_hypo$SUFFIX.txt By the way, your source input sentences seem not to be a paragraph to summarize ... |
Hello: Thanks for the cool repo and models. Have everything working 100% with the above mentioned models and cnndm/processed binary files but encounter a problem when trying to use 'fairseq-generate' or 'fair-interactive' with the default 'prophetnet_large_pretrained_160G_14epoch_model.pt' I would like to generate summaries from this model using input text files without having to fine-tune a checkpoint. When trying to use the above model with cnndm/processed it generates the following error: {"criterion_name": "CrossEntropyCriterion", "best_loss": state["best_loss"]}KeyError: 'best_loss'Are there options that will enable access to this model without having to fine-tune a checkpoint from scratch? Would the use of --raw-text option be helpful here? Cheers. |
Hello @GenTxt @yuyan2do .I am also getting the same error when trying to generate summary using given prophetnet model.Did you find the solution ? Traceback (most recent call last): |
Hi @sivakumar1604 did you find out the way to use the ProphetNet for abstractive summarization? I wanna use this to summarize the Legal Court Data using this library. But new in NLP need help. |
No description provided.
The text was updated successfully, but these errors were encountered: