I am running few experiments in GCP Vertex AI using foundation models (mainly Llama 2).
I was able to successfully deploy the Llama 2 7B mode and test it. Now I am trying to fine-tune the Llama 2 foundation model for a custom data. Has anybody succeeded in fine-tuning the Llama 2 model in Vertex AI?
I have the below queries:
How do I select the model version 7B, 13B, 70B (mainly I am trying to fine-tune 7B) ?
What is the format of the input file to fine-tune ?
Is there a documentation available on how to fine-tune foundation models ?
Any leads would be really helpful for me to get started.
Hi @timbosssds ,
I am still working on fine-tuning the model with the custom data.
I was able to fine-tune the model (llama2-7b) with the custom data given in the example, however I was not able to fine-tune with my own data.
I am using the notebook model_garden_pytorch_llama2_peft_finetuning.ipynb.
Thank you for following up. I started trying to use the Gemma model, but was having issues. Moved to Llama and more issues. I can’t share the error details as I had to delete those models/endpoints as I have moved on to trying Mistral - which is working . Going to try to build end-to-end (data ingestion to UI) now. Will hopefully be able to come back to Llama and re-use these learnings. Best of luck on your journey.
I had the same problem, but I spent a whole day trying different combination with my own dataset with the example data set and found the reason: the example data is multi-turn conversation between human and assistant, so # Humman or # Assistant appear at least twice. If your own custom data only has single turn conversation, it might end up with the same error. What you can do is repeat your single turn conversation twice in your training data (keep the key ‘text’ the same) and maybe it works. I guess the reason is the specific way processing the data requires and counts multi-turn only (single turn will be discarded so it ends up with no training data), but since I am using Google Vertex AI, I don’t have direct access to the underlying code so that was just my guess.