Open desmo360 opened 5 years ago
Hi, I made a colab notebook to retrain and run the model as you will need a gpu to get fast performance which is free on colab, check it out here and let me know if you need help. https://github.com/ak9250/gpt-2-colab
Hi, I made a colab notebook to retrain and run the model as you will need a gpu to get fast performance which is free on colab, check it out here and let me know if you need help. https://github.com/ak9250/gpt-2-colab
I've started learning Python so I can run this. I know less about Google Colab. How do I run your thing?
it runs top to bottom, you can click on the play button of each cell to run it, save a copy to drive before running
I copied the code into a Python 3 Notebook in Colab and clicked run, but I got an error on line 9: name 'true' is not defined. I'm pretty sure I'm doing something wrong.
did you click copy to drive before running? also this is line 9 correct !PYTHONPATH=src ./train.py --dataset /content/gpt-2/98-0.txt?
I have done this and couldn't get it to work. This is my line 9: "include_colab_link": true. Could you walk me through the steps of what to do after cloning the repository?
you dont need to clone the repo, colab runs in the cloud click on open in colab in the notebook which takes you to this link https://colab.research.google.com/github/ak9250/gpt-2-colab/blob/master/GPT_2.ipynb, then save a copy in drive
Ok. That makes more sense. I have it training now. Can I close the window and will it continue to train?
it will run for 12 hours so you will have to stop it before then and save your trained model. Also from https://stackoverflow.com/questions/49062628/does-google-colab-stay-connected-when-i-close-my-browser "The current cell will continue executing once you close your browser, but the outputs will not end up in the notebook in Drive. (If you were to reconnect before your VM were considered idle and deleted, any values you'd computed would still be available in your kernel.)"
@desmo360 It doesn't seem like train.py replaces the initial language set that gpt-2 was trained with. Does it add additional data to the original set to generate a new model?
I have been training with the Colab that ak9250 set up. In one notebook, I gave it the web serial Token. In my other notebook, I trained it on Token, A Tale of Two Cities, and a few books from the Bible. It struggles with the bible language, but it was successfully rearranging the other two works with mixed results. So yes?
Hey this is really great! Especially the colab, I just had a question if I want to train it off my own model not <!wget https://www.gutenberg.org/files/98/98-0.txt> say I wanted to use my own twitter data or Facebook would I put my own model where the gutenberg.txt was? Fairly novice, so i'd thought i'd live a comment here.
you would need to put your data in something like pastebin and then get the raw text from there
any recommendations for doing so? How would one go about doing that?
@walter-grace you can do something like curl pastebin url here >> paste.txt then put the paste.txt file in place of 98-0.txt
Here's a step-by-step, since this took me longer than it should have to figure out:
getting 0 tokens now on this, is there something wrong?
Forgive me, I'm very new to coding. Here's what I've done so far.
From here, I really don't know what to do to use the model. Is there anyone willing to lend a hand? Much appreciated.