Ryan Dick
e391f3c9a8
Skip torch.nn.Embedding.reset_parameters(...) when loading a text encoder model.
2023-11-02 19:41:33 -07:00
Ryan Dick
267e709ba2
(minor) Fix int literal typing error.
2023-11-02 19:20:37 -07:00
Ryan Dick
8ff49109a8
Update get_pretty_snapshot_diff(...) to handle None-snapshots.
2023-11-02 19:20:37 -07:00
Ryan Dick
e92b84955c
Add minimal unit tests for ModelPatcher.apply_lora(...)
2023-11-02 10:03:17 -07:00
psychedelicious
48626c40fd
fix(backend): handle systems with glibc
< 2.33
...
`mallinfo2` is not available on `glibc` < 2.33.
On these systems, we successfully load the library but get an `AttributeError` on attempting to access `mallinfo2`.
I'm not sure if the old `mallinfo` will work, and not sure how to install it safely to test, so for now we just handle the `AttributeError`.
This means the enhanced memory snapshot logic will be skipped for these systems, which isn't a big deal.
2023-10-15 07:56:55 +11:00
Ryan Dick
f3c138a208
(minor) Fix Flake8.
2023-10-10 10:06:53 -04:00
Ryan Dick
61242bf86a
Fix bug in skip_torch_weight_init() where the original behavior of torch.nn.Conv*d modules wasn't being restored correctly.
2023-10-10 10:05:50 -04:00
Ryan Dick
58b56e9b1e
Add a skip_torch_weight_init() context manager to improve model load times (from disk).
2023-10-09 14:12:56 -04:00
Ryan Dick
7d0ac2c36d
(minor) clean up typos.
2023-10-03 15:00:03 -04:00
Ryan Dick
519b892f0c
Add unit test for Struct_mallinfo2.__str__()
2023-10-03 14:25:34 -04:00
Ryan Dick
763dcacfd3
Add unit test for get_pretty_snapshot_diff(...).
2023-10-03 14:25:34 -04:00
Ryan Dick
3599d546e6
Add unit test for LibcUtil().mallinfo2().
2023-10-03 14:25:34 -04:00