Skip to content
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

Training with custom dataset #3

Closed
vivekam101 opened this issue Oct 24, 2019 · 4 comments
Closed

Training with custom dataset #3

vivekam101 opened this issue Oct 24, 2019 · 4 comments

Comments

@vivekam101
Copy link

Hi Kamal,
Can you please share how to do finetuning with custom dataset

@kamalkraj
Copy link
Owner

The pre-trained model comes from https://github.com/huggingface/transformers.
You can refer to there documentation for fine-tuning on a custom dataset.
After finetuning you can use this repo for inference. Point the code to new model

@gurvesh
Copy link

gurvesh commented Nov 7, 2019

Thanks for for providing this Kamal!

For anyone else interested, I was able to get better performance with the following model which is provided by the transformer library directly (need to edit bert.py):

tokenizer = BertTokenizer.from_pretrained('bert-large-uncased-whole-word-masking-finetuned-squad')
model = BertForQuestionAnswering.from_pretrained('bert-large-uncased-whole-word-masking-finetuned-squad', config=config)

@kamalkraj
Copy link
Owner

Hi @gurvesh,
I think the new model is recently released by transformers. Thanks for posting here.
I will add this information to README

What are EM and F1 Score of bert-large-uncased-whole-word-masking-finetuned-squad ?

@gurvesh
Copy link

gurvesh commented Nov 8, 2019

I think the scores are about the same. But in actual usage, I found the answers given by the finetuned-squad model on random articles I put through the models were much better. YMMV

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants