fix: avoid cleanup errors for partially initialized LlamaModel (#2173)
* Add attribute check for sampler in close method This solves a bug I uncovered, that causes an AttributeError if constantly re-initializing a model in a loop and Python garbage collects it, such as testing the highest GPU layer count you can go before CUDA OOMs. * fix: avoid cleanup errors for partial model init --------- Co-authored-by: abetlen <abetlen@gmail.com>
U
usernames122 committed
fdf38b3e4c41e42146f70dd8971d018339c08606
Parent: 6bdab5d
Committed by GitHub <noreply@github.com>
on 5/31/2026, 11:39:18 AM