SIGN IN SIGN UP

fix: Circular dependancy preventing early Llama object free (#1176)

commit 901827013b732d74f1f67033062d13a6204a62bd introduced a cyclic dependency
within Llama objects. That change causes old models to linger in memory longer
than necessary, thereby creating memory bloat in most applications attempting
to switch between models at runtime. This patch simply removes the problematic
line, allowing models to deallocate without relying on GC. One might also
consider combining `weakref.ref` with a `@property` if the `llama` attribute is
absolutely necessary to expose in the tokenizer class.
C
Connor committed
a05d90446fea83426fe8dc0d6c78afe6c3dd0894
Parent: 918ff27
Committed by GitHub <noreply@github.com> on 2/11/2024, 6:57:57 PM