Skip to content

Fine-tuning Gemma 2 model using LoRA and Keras (Learning Index Path)#112

Draft
Foluwa wants to merge 11 commits intomainfrom
lpi-gemma-model
Draft

Fine-tuning Gemma 2 model using LoRA and Keras (Learning Index Path)#112
Foluwa wants to merge 11 commits intomainfrom
lpi-gemma-model

Conversation

@Foluwa
Copy link
Copy Markdown
Collaborator

@Foluwa Foluwa commented Oct 19, 2024

This PR introduces fine-tuning of the Gemma 2 model using Low-Rank Adaptation (LoRA) to improve efficiency in adapting large model parameters. Utilizing the Learning Index Path (LPI) dataset and Keras, the fine-tuning aims to enhance model performance with minimal resource demand. This setup supports more scalable deployment and optimized inference times for downstream applications.

@neomatrix369
Copy link
Copy Markdown
Owner

@Foluwa please add a good title and description to this PR and also link it with one or more issues you are working on

Comment thread app/llm-poc-variant-03/README.md Outdated
@@ -0,0 +1,3 @@
# Gemma Model Learning Index Path

## Fine tune gemma model withcustom data No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gemma ==> Gemma

withcustom ==> with custom

@Foluwa Foluwa changed the title Lpi gemma model Fine-tuning Gemma 2 model using LoRA and Keras (Learning Index Path ) Oct 26, 2024
@Foluwa
Copy link
Copy Markdown
Collaborator Author

Foluwa commented Oct 26, 2024

Finetuning Gemma model on LPI Dataset

The initial approach was implemented in this notebook but some errors were encountered (which are listed below) and I pivoted to this notebook most of the implementation were from "Fine-tuning Gemma 2 model with role-playing dataset" by Gabriel Preda

Issues encountered

1. Resource constraints (ensure you run on a GPU)

Screenshot 2024-10-26 at 5 15 34 PM Screenshot 2024-10-26 at 4 17 20 PM Screenshot 2024-10-26 at 4 17 33 PM

2. Permission Issues

Screenshot 2024-10-26 at 4 19 27 PM Screenshot 2024-10-26 at 4 18 05 PM

3. The evaluation metric does not support "multiclass-multioutput" format

Screenshot 2024-10-26 at 5 00 18 PM

4. Unable to build the model

image1

5. Unable to save the model weights

Screenshot 2024-10-26 at 5 11 14 PM

6. Model performance issue

Screenshot_2024-10-07_at_12 55 15_AM

@neomatrix369 neomatrix369 changed the title Fine-tuning Gemma 2 model using LoRA and Keras (Learning Index Path ) Fine-tuning Gemma 2 model using LoRA and Keras (Learning Index Path) Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants