Skip to content

add transfer modules#40

Merged
davek44 merged 17 commits into
mainfrom
transfer
Apr 10, 2025
Merged

add transfer modules#40
davek44 merged 17 commits into
mainfrom
transfer

Conversation

@hy395
Copy link
Copy Markdown
Contributor

@hy395 hy395 commented Sep 4, 2024

Description of your changes

  • add hound_transfer.py:

    • main script for running transfer;
  • add transfer_helper.py:

    • helper functions to insert adapter layers to existing architecture.
    • helper functions to merge adapters.
  • layers.py:

    • added IA3, IA3_ff, Lora, Locon, AdapterHoulsby class definitions;
    • add seqlen_train argument to allow model to take any input seq length;
    • add additional arguments to SqueezeExcite class;
  • blocks.py:

    • add options to specify adapter in json file,
    • add additional arguments to SqueezeExcite.
  • seqnn.py:

    • add methods to insert adapter;
  • hound_eval.py:

    • optionally use fl16;
  • hound_eval_spec.py:

    • optionally use fl16;
  • trainer.py:

    • add option to do loss scaling;
    • add function to print GPU memory usage when training;

evaluation code:

  • add borzoi_test_genes.py
  • add pygene.py to support borzoi_test_genes.py

test:

  • code to test inserting ia3; see if added trainable variables match expectation.

Issue ticket number and link

Type of change

  • Bug fix
  • New feature
    • Backwards Incompatible?
  • Refactoring / code clean-up
  • Documentation add / update
  • Automated Test
  • Other (please specify)

(If applicable) How has this been tested?

see if trainable variables match expectation.

Comment thread src/baskerville/blocks.py Outdated
Comment thread src/baskerville/helpers/transfer_helper.py
Comment thread src/baskerville/layers.py Outdated
Comment thread src/baskerville/pygene.py Outdated
Comment thread src/baskerville/scripts/borzoi_test_genes.py
"-c",
dest="class_min",
default=80,
default=5,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

for big borzoi, this is too low; I want to exclude all of the ChIP groups.

Comment thread src/baskerville/scripts/hound_transfer.py Outdated
Comment thread src/baskerville/trainer.py Outdated
Comment thread src/baskerville/trainer.py Outdated
@davek44 davek44 mentioned this pull request Oct 15, 2024
Comment thread src/baskerville/trainer.py
Comment thread docs/transfer/transfer.md Outdated
"transfer": {
"mode": "adapter",
"adapter": "locon",
"adapter_latent": 8,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It doesn't look like the code parses this for locon.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

you are correct. i removed the option to change adapter_latent in locon4, leaving it to default.

@davek44 davek44 merged commit 1f4a072 into main Apr 10, 2025
3 checks passed
@davek44 davek44 deleted the transfer branch April 10, 2025 22:57
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