-
Notifications
You must be signed in to change notification settings - Fork 75
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
BERT pretrain example not working #99
Comments
Out of curiosity, you want to pre-train your own Bert model? |
No, I simply want to fine tune an existing Bert model for use in categorization task. I would appreciate guidance in how to do that as I have not been able to figure it out with this package. |
Should mostly look like this one https://github.com/chengchingwen/Transformers.jl/blob/master/example/BERT/cola/train.jl |
Or you want to do token level classification? |
Thank you, I will take a look at that link! My current project is classifying sentences into a few given categories. I am not quite sure what you mean by token level classifications? If you mean classifying parts of sentences as tokens, for example finding nouns, verbs, etc., then I am not trying to implement token level classification. |
Yes, that's what I means.
Then you can just follow the link. CoLA is also a sentence classification dataset. |
I got the following error when trying to run the cola example as you recommended. It seems like it may be an issue with the example.
|
@jackn11 Holy! That is a bug for downloading the datasets. I was using the local files all the time so didn't notice it. For a quick workaround:
|
Thank you for letting me know! Will do. Also, comments in the example code would be a huge plus to make it easier to understand. |
Did you ever resolve this issue? I'm having the same. Using the training example Peter linked |
The main issue for the pretrain example is that the code is really really old and I haven't find time to update that. But I didn't make it a high priority because people seldom need/want to do pretrain themselves |
If i recall correctly, I was able to get the CoLA example working, but it took me going through the code line by line, one piece at a time to figure out where the errors were coming from. I may have some time in the coming days to update the example @chengchingwen. Would that be helpful? |
Yea pretrain is old but I'm having the issue with the fine-tune example Fine-tuning is a bit more common than pre-training. The dataset API is pretty gucci but it needs some comments. Maybe I'll contribute. Got the 1.8M tweet dataset working with your training script in a few lines. But again, getting the thing running on gpu is a bit of a pain. |
Feel free to open issues/PRs! Sometimes it's hard to make stuff clear from my side because I wrote those code and they all look straightforward to me. Let me know if you need help or explanations. |
That sounds great! I should have a PR up soon for the COLA example! |
I tried running the BERT example found here https://github.com/chengchingwen/Transformers.jl/blob/master/example/BERT/_pretrain/pretrain.jl but I got the following error on the train!() line at the bottom of the code.
The text was updated successfully, but these errors were encountered: