Skip to content

Commit c478057

Browse files
speediedantchatonpre-commit-ci[bot]rohitgr7
authored
Finetuning scheduler (#115)
* notebook-based fts tutorial and example * additional tuning literature references and several additional recommended improvements for finetuning_scheduler tutorial * numerous expository enhancements and switch to DeBERTav3 * enhance linkcheck configuration and switch two images to be base64 encoded * enabled setting base learning rates on a per-phase basis, updating current finetuning_scheduler_module release SHA * clarify finetuning schedule definition configuration options and update fts module requirement ref * updated tutorial with initial version of finetuning-scheduler dependency * update finetuning-scheduler commit sha, simplify notebook dependency with finetuning-scheduler[examples] extra, accommodate acceleratorconnector refactor * sync finetuning_scheduler tutorial for pl 1.6.0rc1 * update commit sha to point to fts with official pl 1.6.0 release * require only finetuning-scheduler dependency now that it is available on pypi * update fts documentation to point to stable version (0.1.1) * implement workaround for cuda toolkit build difference of torch and torchvision in CI that was resulting in a segfault triggered by sentencepiece upon pytorch_lightning import * isort skip directive required to implement sentencepiece workaround * metadata and aesthetic image improvements * make notebook accelerator agnostic * reset lr_scheduler interval to epoch * Apply suggestions from code review Co-authored-by: thomas chaton <thomas@grid.ai> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
1 parent 3ab42a0 commit c478057

11 files changed

+753
-0
lines changed

docs/source/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@
181181
# (source start file, name, description, authors, manual section).
182182
man_pages = [(master_doc, project, project + " Documentation", [author], 1)]
183183

184+
# -- Options for linkcheck builder ----------------------------------------------
185+
# regex pattern 0: allow linking to a specific selection state in
186+
# tensorboard.dev links while continuing to validate the base experiment link
187+
linkcheck_anchors_ignore = ["scalars.*&runSelectionState.*"]
188+
184189
# -- Options for Texinfo output ----------------------------------------------
185190

186191
# Grouping the document tree into Texinfo files. List of tuples
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
title: Finetuning Scheduler
2+
author: "[Dan Dale](https://github.com/speediedan)"
3+
created: 2021-11-29
4+
updated: 2022-05-10
5+
license: CC BY-SA
6+
build: 3
7+
tags:
8+
- finetuning
9+
description: |
10+
This notebook introduces the [Finetuning Scheduler](https://finetuning-scheduler.readthedocs.io/en/stable/index.html) extension
11+
and demonstrates the use of it to finetune a small foundational model on the
12+
[RTE](https://huggingface.co/datasets/viewer/?dataset=super_glue&config=rte) task of
13+
[SuperGLUE](https://super.gluebenchmark.com/) with iterative early-stopping defined according to a user-specified
14+
schedule. It uses Hugging Face's ``datasets`` and ``transformers`` libraries to retrieve the relevant benchmark data
15+
and foundational model weights. The required dependencies are installed via the finetuning-scheduler ``[examples]`` extra.
16+
requirements:
17+
- finetuning-scheduler[examples]
18+
accelerator:
19+
- GPU
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
0:
3+
params:
4+
- model.classifier.bias
5+
- model.classifier.weight
6+
- model.pooler.dense.bias
7+
- model.pooler.dense.weight
8+
- model.deberta.encoder.LayerNorm.bias
9+
- model.deberta.encoder.LayerNorm.weight
10+
- model.deberta.encoder.rel_embeddings.weight
11+
- model.deberta.encoder.layer.{0,11}.(output|attention|intermediate).*
12+
1:
13+
params:
14+
- model.deberta.embeddings.LayerNorm.bias
15+
- model.deberta.embeddings.LayerNorm.weight
16+
2:
17+
params:
18+
- model.deberta.embeddings.word_embeddings.weight
Loading

lightning_examples/finetuning-scheduler/finetuning-scheduler.py

Lines changed: 711 additions & 0 deletions
Large diffs are not rendered by default.
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)