4 ms·
An individual snapshot of the model’s output isn’t very useful. What I’ve found enormously helpful is watching how the structure of the output changes over time
by valine 3y ago
An individual snapshot of the model’s output isn’t very useful. What I’ve found enormously helpful is watching how the structure of the output changes over time as I fine-tune Mistral.
There will typically be visual artifacts in the heat-map that appear right around the time the model starts to go off the rails. Due to the nature of residual layers, problems at lower layers cascade and light up when visualized this way.
- Difwif 3y agoFascinating. Makes me think there's still room for new architecture/training ideas like dropout or weight decay to improve model performance.
- valine 3y agoI’m confident that there are better methods for fine tuning yet to be discovered. I used this visualization method along with some other unpublished research to train a series of models with less data than is typically required for fine tuning. More details in this r/locallama thread if you’re interested. https://www.reddit.com/r/LocalLLaMA/comments/198x01d/openpirate_mistral_7b_finetuned_to_talk_like_a/ https://www.reddit.com/r/LocalLLaMA/comments/198x01d/openpir...
- davidy123 3y agoYou don't seem willing to share how you did anything, you only draw attention to your works. In the reddit thread, several people asked about your 'talk like a pirate' training, and you never responded. In this thread, you imply you'll talk about how you used this visualization in your training, yet you never do.
- valine 3y agoI’ve gone into pretty great detail on the visualization in the README of my repo. The main utility is detecting individual layers being overfit. There are some specifics about OpenPirate that I’m not at liberty to share at the moment, but those are unrelated to this visualization. I’ve published the model weights under a permissive license, and I hope to publish more of the training code in the future. If you have any questions about how to use the code in my neural flow repo just ask.
- davidy123 3y agoOK, sorry if I missed that then, but perhaps a direct link here or there would help since a number of people asked the same thing. I followed a link to your huggingface page on reddit, and there the obvious README doesn't talk about specifics[1]. 1. https://huggingface.co/valine/OpenPirate/blob/main/README.md https://huggingface.co/valine/OpenPirate/blob/main/README.md
- valine 3y agoYeah I apologize, a lot of the information is scattered across threads right now. I should have spent more time compiling everything in one place. This comment chain in particular might have some of what you’re looking for: https://www.reddit.com/r/LocalLLaMA/comments/1ap8mxh/comment/kq6wljv/ https://www.reddit.com/r/LocalLLaMA/comments/1ap8mxh/comment... Other relevant threads to put it all in one place: https://www.reddit.com/r/LocalLLaMA/comments/198x01d/openpirate_mistral_7b_finetuned_to_talk_like_a/ https://www.reddit.com/r/LocalLLaMA/comments/198x01d/openpir... https://www.reddit.com/r/LocalLLaMA/comments/19a5hdx/morehuman_mistral_7b_fine_tuned_to_sound_more/ https://www.reddit.com/r/LocalLLaMA/comments/19a5hdx/morehum... https://www.reddit.com/r/LocalLLaMA/comments/1apz94o/neuralflow_visualize_the_intermediate_output_of/ https://www.reddit.com/r/LocalLLaMA/comments/1apz94o/neuralf... https://github.com/valine/NeuralFlow/blob/master/README.md https://github.com/valine/NeuralFlow/blob/master/README.md The one thing I don’t talk about is the specifics of the instruction generalization which unfortunately I’m not able to share, even though I very much want to.
- luke-stanley 3y agoI don't think you should be apologising, there is always room for improvement. Nice work!
- aantix 3y agoHow do you determine “ right around the time the model starts to go off the rails”?
- valine 3y agoAs part of the training loop I will periodically ask the model a question. At first the model will respond normally, and then get progressively more repetitive until it starts repeating tokens from the training data. The point in time where the model starts repeating itself aligns with the sudden change in the visualization.
- iandanforth 3y agoIf you do this for gradient updates you should get a leading indicator.
- valine 3y agoHuh hadn’t thought of that. Thank you