Closed norabelrose closed 1 year ago
Merging #88 (8ceb6ea) into main (9974450) will increase coverage by
0.03%
. The diff coverage is85.71%
.
@@ Coverage Diff @@
## main #88 +/- ##
==========================================
+ Coverage 78.74% 78.77% +0.03%
==========================================
Files 32 32
Lines 1750 1753 +3
==========================================
+ Hits 1378 1381 +3
Misses 372 372
Impacted Files | Coverage Δ | |
---|---|---|
tuned_lens/scripts/eval_loop.py | 88.70% <66.66%> (+0.09%) |
:arrow_up: |
tuned_lens/scripts/train_loop.py | 71.80% <85.71%> (+0.15%) |
:arrow_up: |
tuned_lens/scripts/ingredients.py | 84.96% <100.00%> (+0.09%) |
:arrow_up: |
This adds an
int8
field to theModel
config class which setsload_in_8bit=True
whenAutoModelForCausalLM.from_pretrained
is called.I had to do a little bit of refactoring in order for this to work because
load_in_8bit=True
requires adevice_map
to be set, and inmain
theModel
class doesn't actually know what device it's supposed to be on. Also, FSDP is simply incompatible with thedevice_map
flag, so I have to turn that off whenfsdp
is enabled.