AlignmentResearch / tuned-lens

Tools for understanding how transformer predictions are built layer-by-layer
https://tuned-lens.readthedocs.io/en/latest/
MIT License
432 stars 47 forks source link

Implementation of checkpoint resume. #95

Closed levmckinney closed 1 year ago

levmckinney commented 1 year ago

Implements, checkpoint resume adding two new flags --checkpoint_dir and --checkpoint_freq. To allow for saving the state of the data loaders this PR also switches to using torchdata and DataLoader2.

codecov[bot] commented 1 year ago

Codecov Report

Merging #95 (2adbdce) into main (2050703) will decrease coverage by 0.26%. The diff coverage is 73.01%.

:exclamation: Current head 2adbdce differs from pull request most recent head d8484d3. Consider uploading reports for the commit d8484d3 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
- Coverage   78.78%   78.52%   -0.26%     
==========================================
  Files          32       32              
  Lines        1772     1821      +49     
==========================================
+ Hits         1396     1430      +34     
- Misses        376      391      +15     
Impacted Files Coverage Δ
tests/scripts/test_integration.py 100.00% <ø> (ø)
tuned_lens/scripts/train_loop.py 70.76% <68.86%> (-1.64%) :arrow_down:
tuned_lens/scripts/ingredients.py 85.46% <93.33%> (+0.99%) :arrow_up:
tuned_lens/scripts/eval_loop.py 88.69% <100.00%> (+0.26%) :arrow_up: