microsoft / IRNet

An algorithm for cross-domain NL2SQL
MIT License
264 stars 81 forks source link

taking very much time to run BERT embedding model #23

Closed shubhamk16 closed 4 years ago

shubhamk16 commented 4 years ago

Hello, I implement pytorch bert embedding instead of glove embedding but it takes too long to complete even single epoch.

I implement bert 768 dimension model for this, but for very small dataset like 120 examples it takes 166 sec to complete one epoch while glove takes only 3 sec.

can anyone tell me why is it so and how to fixed it. Thanks in advance!

shubhamk16 commented 4 years ago

Also, the current model can not generate ON statement from join. which combines 2 tables.

original spider query: SELECT T2.Name , COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID

IRNET generated query: SELECT T1.Name, count(*) FROM musical AS T1 JOIN actor AS T2 GROUP BY T1.Name

how to fix this issue??

jaydeepb-inexture commented 4 years ago

@shubhamk16 i am also trying to implement bert in IRNet but, as i have just started learning this it bit difficult for me to implement .can you help me in implementation part?

shubhamk16 commented 4 years ago

@jaydeepb-ddit sure, but the model in which I have applied BERT taking too much time, I think there is some mistake in my code.

jaydeepb-inexture commented 4 years ago

@shubhamk16
I just wanted to see the approach you have taken to implement the BERT. I will also check what is taking too much time if you can provide the code :my email > jaydeep7405047637@gmail.com

DevanshChoubey commented 4 years ago

Hi @jaydeepb-ddit @shubhamk16 I m also trying the same things from a month with no luck, if you were able to plug in BERT can you please help us. Plus editsql is giving better result, because a BERT implementation is available for the same.

JasperGuo commented 4 years ago

Sorrt for the late replay. We have uploaded the BERT code. Please pull the latest version of the code and checkout the BERT branch.

JasperGuo commented 4 years ago

We have uploaded a trained BERT model. https://drive.google.com/open?id=1o9cWUPcgFuEN6EHVWeyzN3JXEunUwcLM

jaydeepb-inexture commented 4 years ago

@devanshc13 can you share your email with me . we can have a better discussion and we can have each other . i am already connected with shubham.

jaydeepb-inexture commented 4 years ago

@JasperGuo
how much amount of cuda memory do we need to execute the irnet+bert code? i am attaching the ss below. error message

which pytorch and cuda version will be suitable for this model to train.