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

8 fine tuning #14

Merged
merged 101 commits into from
May 28, 2024
Merged

8 fine tuning #14

merged 101 commits into from
May 28, 2024

Conversation

philswatton
Copy link
Collaborator

@philswatton philswatton commented Apr 18, 2024

UPDATED: A PR to resolve #8, now open for review.

Big picture:

  • Implements model fine-tuning
  • Implements a partial config structure for the project, with a view towards minimal changes being required to cover the full project pipeline
  • Implements Baskerville array jobs\
  • Implements wandb usage

The code here:

  • Adds functions for loading model, tokenizer, and trainer
  • Adds a base config class, along with experiment, data, and model config classes
  • The idea is to use a modular setup for configs, with one config per experiment component (data, model, forgetting techniques) to allow us to easily change different components of the code without needing to change all components
    • I anticipate being able to add forget-specific fine-tuning details to model hyperparam configs
  • A function that given a fairly simple top level experiment config, spawns several single experiment configs (and, optionally, an associated baskerville array script)
  • Example experiment (both normal and top-level), data, model, and hyperparam configs
  • scripts/README containing instructions for fine-tuning
  • Some additional dependencies
  • Unit tests

Copy link
Contributor

@jack89roberts jack89roberts left a comment

Choose a reason for hiding this comment

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

Few initial thoughts/comments

src/arcsf/config/config_class.py Outdated Show resolved Hide resolved
src/arcsf/config/config_class.py Outdated Show resolved Hide resolved
src/arcsf/models/config_class.py Outdated Show resolved Hide resolved
src/arcsf/config/experiment_config.py Outdated Show resolved Hide resolved
src/arcsf/config/experiment_config.py Outdated Show resolved Hide resolved
src/arcsf/models/model.py Outdated Show resolved Hide resolved
src/arcsf/models/model.py Outdated Show resolved Hide resolved
src/arcsf/models/trainer.py Outdated Show resolved Hide resolved
src/arcsf/__init__.py Outdated Show resolved Hide resolved
@philswatton philswatton marked this pull request as ready for review May 23, 2024 08:22
scripts/gpt2_longer_all.sh Show resolved Hide resolved
src/arcsf/config/experiment.py Outdated Show resolved Hide resolved
scripts/train.py Outdated Show resolved Hide resolved
scripts/train.py Show resolved Hide resolved
src/arcsf/config/experiment.py Outdated Show resolved Hide resolved
src/arcsf/config/experiment.py Outdated Show resolved Hide resolved
src/arcsf/config/experiment.py Outdated Show resolved Hide resolved
src/arcsf/config/experiment.py Show resolved Hide resolved
src/arcsf/models/model.py Outdated Show resolved Hide resolved
src/arcsf/config/experiment.py Outdated Show resolved Hide resolved
@jack89roberts
Copy link
Contributor

^ mostly some small refactoring/docs comments. I haven't tried running it but looks good to me. Probably some upcoming headaches thinking about adding in forgetting nicely.

philswatton and others added 16 commits May 28, 2024 13:49
Co-authored-by: Jack Roberts <jroberts@turing.ac.uk>
Co-authored-by: Jack Roberts <jroberts@turing.ac.uk>
Co-authored-by: Jack Roberts <jroberts@turing.ac.uk>
Co-authored-by: Jack Roberts <jroberts@turing.ac.uk>
Co-authored-by: Jack Roberts <jroberts@turing.ac.uk>
Co-authored-by: Jack Roberts <jroberts@turing.ac.uk>
Co-authored-by: Jack Roberts <jroberts@turing.ac.uk>
Co-authored-by: Jack Roberts <jroberts@turing.ac.uk>
@philswatton philswatton merged commit a9d3899 into develop May 28, 2024
1 check passed
@philswatton philswatton deleted the 8-fine-tuning branch May 28, 2024 15:01
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.

Add fine-tuning to pipeline
2 participants