I want to fine-tune the model which is already fine-tuned using code generation model “code-bison”.
The existing tuned model is saved into Vertex AI model registry. But I want to fine-tune the model again with my new dataset. I want to know about the efficient way of that process.
Also I looked at the versioning but it’s not working for my problem.
Here’s my code to fine tune the model first time:
from vertexai.language_models import CodeGenerationModel
training_data = "gs://training/sample_data.jsonl"
model = CodeGenerationModel.from_pretrained("code-bison@002")
model = model.tune_model(
training_data=training_data,
train_steps=100,
tuning_job_location="<LOCATION>",
tuned_model_location="<LOCATION>",
model_display_name="custom-code-gen-model",
accelerator_type="GPU",
)
Then the model exists in the vertex AI model registry. I want to fetch the saved model from there to fine-tune the custom model “custom-code-gen-model” again using the same process of fine-tuning. Instead of using “code-bison@002”, I want to use my fine-tuned model “custom-code-gen-model” for tuning 2nd time.