Open mirfan899 opened 2 years ago
Thanks for reporting this issue. What system or platform are you running text2text on? I ran the following in the colab notebook without issues. Each prediction took maybe 30 seconds at most.
import text2text as t2t
t2t.Transformer.PRETRAINED_TRANSLATOR = "facebook/m2m100_418M" #Remove this line for the larger model
h = t2t.Handler(["حکومت اور کالعدم تحریک طالبان پاکستان کی جانب سے مذاکرات میں کسی بھی پیش رفت کے بارے میں آگاہ نہیں کیا جا رہا اور استفسار کے باوجود متعلقہ وزرا خاموشی اختیار کیے ہوئے ہیں۔"], src_lang="ur")
h.question()
h.question()
h.question()
Note that it is not necessary to tokenize
prior.
We are also researching ways to reduce the memory consumption and improve speed. If you are interested in learning more and possibly contributing, take a look at https://github.com/artitw/text2text/issues/27
I'm running the colab example.
What is your use-case application? Perhaps there is a way to deal with the memory issues and achieve what you are trying to do.
I want to generate questions for different languages. Then I will train the QA model for those languages.
Then perhaps a short-term solution would be to keep appending results to a file and re-run the script everytime it crashes. You could also try clearing the memory after every iteration using Python's del
to avoid the OOM crashes.
For the long term, let me know if you are interested in contributing to improvements to address this issue.
Okay sure.
For the latter, please comment on https://github.com/artitw/text2text/issues/27 and ask @johnanisere about helping out
@mirfan899 can you try updating to the latest release to see if it is any faster. There was a GPU fix recently: https://github.com/artitw/text2text/pull/31
@mirfan899 can you try updating to the latest release to see if it is any faster. There was a GPU fix recently: https://github.com/artitw/text2text/pull/31
Okay sure.
Hi, I tried to generate question for Arabic and Urdu language and it seems small model cannot fit into memory to generate question. It runs for a long time and then runtime crashes most of the time but few time worked.
Here is the log of crash
QG almost take 1 minute to generate question if not crashed.