Update notebook_sft_peft.ipynb
Update original notebook with eos token and save model functionality to create working end to end example
Verified with Jiewen and Google team
I just noticed this notebook was updated in the last two hours. I tried rerunning the new version but I'm getting an exception. That being said i feel we should keep the original formatting function, which I've split into its own cell in my PR. This shows the SFT example plainly making it easier for new users to correlate the intent, with the formatting function, with the final output. The new logic, even if working, obscures this.
One another last note, I can't figure out how to use the git cli tool to contribute, instead having to use the web upload tool to make this PR. Unfortunately I also can't see the diff online so I think I got most everything right but if things look way off that's why.
I made one mistake I believe where the formatting function is written in two places but I can fix in a follow up PR.
Here are the corresponding changes on the github blog
Opened https://huggingface.co/google/gemma-7b/discussions/94 with fixes