-
Usecase: Problem: Assumption:
Is this possible or the right approach? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@popconst Whenever there's no reference to an instance of For example, if you have a global variable that holds a |
Beta Was this translation helpful? Give feedback.
@popconst Whenever there's no reference to an instance of
LlamaContext
orLlamaModel
the garbage collector will prune the memory used by these objects on thellama.cpp
side, so try to get rid of all the references you don't need anymore before you create a new instance ofLlamaContext
orLlamaModel
.For example, if you have a global variable that holds a
LlamaModel
instance, it still counts as a reference, so try to set it tonull
.