Yep I think the potion was removed, in favour of bidir training. but feel free to add it.
it was URLs.WT103_1
It is really good to understand every step of your pipeline (i’ve learned it hard way), but weights are often published without exact steps to reproduce them. Think, do you know how pytorch resnet weights are reproduced?
Why not, I’d like to have a way to retrain them if necessary.
I haven’t try it but it should work. Try it. Comparing it with training on a merged Mexican-Spanish and Spanish wikipedia is quite interesting.
Hello guys) First of all, I woud like to thank you for all the hard work you are doing to make it easier for us following behind.
I’m working on training russian language model and I have a couple of questions.
My lm training steps are: exp = LMHyperParams(dataset_path='data/wiki/ru-100/', qrnn=False, tokenizer='v', lang='ru', name='russian') learn = exp.create_lm_learner(data_lm=data_lm) learn.unfreeze() learn.fit_one_cycle(20, 1e-3, moms=(0.8,0.7))
I would like to test a model on the upstream task (text classification) and use functionality of ulmfit.train_clas. Speaking of questions:
How could I use trained lm in classification task? My suggestion is something like this: exp = CLSHyperParams('data/my_class_task_data') exp.pretrained_fnames = path.to_my_best_model
Is my suggestion right or do i miss something?
If I use other than imdb task for classification and wish to apply CLSHyperParams, do I need to recreate my_task data directory structure the same way as imdb data structure?
What is a good choice of vocabulary size to train LM from wiki from scratch?
Is the text within a document in your dataset multi-language or is each document in only one of multiple languages? If the latter is the case, you can use something like the langdetect Python library. Run detect_language() to find the probabilities for each language and remove the document if the probability for your language is below a given threshold.
In my case I have a dataset of book reviews that are mostly in Dutch. Some reviewers have translated the Dutch review into other languages, so I use langdetect to remove these multi-language documents from the dataset.
Hi, thanks for the response.
I tried langdetect but as my dataset consists from descriptions which are not very long, it found ‘wrong’ languages with very high probability.
So having the fact that I cant detect language, I am thinking of training a new model from scratch based on French and English wiki and would like to get an advise.
Thank you @piotr.czapla. As for now i’m working on the level of fastai abstraction to make it more simple (for me) to understand all the logic. I’m trying to work on upstream classification tasks and get near the best results (in comparison with current benchmark - http://text-machine.cs.uml.edu/projects/rusentiment/).
Next I’ll try to increase the amount of domainspecific (twiter) data for LM finetuning to see if it helps on upstream classification task.
Later I’ll experiment with different tokenizers and try to addapt train_clas.py to my data.
I’m very happy to share the Dutch dataset and the weights of the trained language model!
However, for the former, I’m not sure whether I can publish it, since the contents are scraped. I’ve read the website’s disclaimer and there’s nothing in it that forbids it, but I’m still not quite sure about legal issues
For language model weights, do you have pointers how I can best package and describe it? I’ve never shared network weights before.
I still wanted to give credits to the owners of the website and its reviewers, so I’ve sent them an email to see if they’re open for this kind of publication. I’ve already tidied up my code and the dataset itself, so it’s ready for publication. I’m just waiting for a response from them now… Fingers crossed!
@piotr.czapla: considering recent developments in the FastAI library, what’s the status of ulmfit-multilingual? I’ve used slightly edited versions of those scripts to generate a language model for Dutch. Is this still the way to go?