You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to sample the output of the same query multiple times independently. My (limited) understanding is that the history of these queries change subsequent outputs. So, I guess I could do:
outputs = []
for _ in range(30):
llm = Llama(model_path="model.gguf")
outputs.append(llm('my query goes here'))
but re-instantiating the model seems a bit heavy, and I was wondering if there were a way to simply reset the model. I see that there is a reset method of the llm object, but as far as i can tell it simply sets n_tokens attribute to 0. Is that really enough to set the model back to its initial state?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to sample the output of the same query multiple times independently. My (limited) understanding is that the history of these queries change subsequent outputs. So, I guess I could do:
but re-instantiating the model seems a bit heavy, and I was wondering if there were a way to simply reset the model. I see that there is a
reset
method of the llm object, but as far as i can tell it simply setsn_tokens
attribute to 0. Is that really enough to set the model back to its initial state?Beta Was this translation helpful? Give feedback.
All reactions