Spaces:
Runtime error
Runtime error
Lev McKinney
commited on
Commit
•
19bac2b
1
Parent(s):
af69869
made lp tolorance in fuzzing slightly looser
Browse files- lens_migration.py +1 -1
lens_migration.py
CHANGED
@@ -378,7 +378,7 @@ if __name__ == "__main__":
|
|
378 |
logits_old = tuned_lens_old(a, i)
|
379 |
log_ps_new = logits_new.log_softmax(-1)
|
380 |
log_ps_old = logits_old.log_softmax(-1)
|
381 |
-
assert (th.allclose(log_ps_new, log_ps_old))
|
382 |
print("js div", js_divergence(log_ps_new, log_ps_old))
|
383 |
print("Saving new lens to", args.output_dir)
|
384 |
tuned_lens.to(th.device("cpu")).save(args.output_dir)
|
|
|
378 |
logits_old = tuned_lens_old(a, i)
|
379 |
log_ps_new = logits_new.log_softmax(-1)
|
380 |
log_ps_old = logits_old.log_softmax(-1)
|
381 |
+
assert (th.allclose(log_ps_new, log_ps_old, atol=1e-7))
|
382 |
print("js div", js_divergence(log_ps_new, log_ps_old))
|
383 |
print("Saving new lens to", args.output_dir)
|
384 |
tuned_lens.to(th.device("cpu")).save(args.output_dir)
|