Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supervised finetuning Gemma-9B on Google Colab #9

Merged
merged 28 commits into from
Dec 11, 2024
Merged

Conversation

chiffonng
Copy link
Owner

@chiffonng chiffonng commented Dec 8, 2024

Closes #6 Supervised finetuning Gemma-9B on Google Colab. The dataset and fine-tuned model are pushed to Hugging Face collection.

This PR has the main following components:

  • Adapted from Unsloth notebook for finetuning Gemma-2-9B
  • Incorporate wandb to track finetuning
  • Brute-force values for LoRA config by referring to Determined AI experiments here and Stephen Diehl tutorial here

Auxilary:

  • A lot of time was spent on setting up an instance of Google Cloud Deep Learning VM to use NVIDIA T4 for training. Deployed here
  • Some time was also spent hooking VSCode with that virtual machine and configuring git + SSH
  • Set up wandb to use with huggingface Trainer

What I tried but failed:

chiffonng and others added 26 commits October 10, 2024 18:26
- Refactor .gitignore to exclude /temp directory and ignore all .parquet and .csv files.
- Format mnemonics more consistently
- Drop mnemonics with only 2 words or less.
- Add more error handling for path
- Convert dataset into datasets.Dataset format
- Train test split the data
- Push data to HF hub
- Load data from HF hub
- Remove redundant functions
- Swap strings with constants
* Update setup script and environment variables
* Add ClearML and unsloth as dependencies in pyproject.toml
* Resolve other packages
* Downgrade to Python version to 3.10
* Use conda as package manager for better integration of CUDA
* Add clearml for tracking experiments
* Update .gitignore
* Modify .env.template to use wandb instead of clearml
* Add error handling with explicit enums
@chiffonng chiffonng marked this pull request as ready for review December 11, 2024 23:07
@chiffonng chiffonng merged commit bee206b into main Dec 11, 2024
1 check passed
@chiffonng chiffonng linked an issue Dec 11, 2024 that may be closed by this pull request
@chiffonng chiffonng changed the title Supervised finetuning (Gemma-9B with generic instructions) Supervised finetuning Gemma-9B on Google Colab Dec 11, 2024
@chiffonng chiffonng added the feature New feature label Dec 12, 2024
@chiffonng chiffonng deleted the chiffonng/sft branch February 21, 2025 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAP-9] Supervised fine-tuning
1 participant