-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash, when setting top_k, top_p, or repeat_penalty #59
Comments
And where do I set |
Or do I have to set these parameters now when defining the model
|
@woheller69 You have to remove the You set the But there still is a problem with the generation at llama-cpp-python, it will insert strange symbols into text. Will look into this. |
Thanks, stupid error on my side :-) So I moved the repeat_penalty to Llama(...) and removed the commas.
|
@woheller69 The Agent now uses an chat history class that implements the handling of the messages. The BasicChatHistory class has a message store that handles the storing of messages. You can acces it by calling agent.chat_history.message_store.save_to_json and giving it a filename. You load it with load_from_json. I have to add that to documentation. Thank you for pointing that out! |
@woheller69 I think llama-cpp-python is broken, the following code will generate garbage at the beginning of generation or crash the script: llama_model = Llama(r"C:\AI\Agents\gguf-models\mistral-7b-instruct-v0.2.Q6_K.gguf", n_batch=1024, n_threads=10, n_ctx=8192)
for t in llama_model.create_completion("[INST] Hello! [/INST]", stream=True):
print(t["choices"][0]["text"], end="") |
Can you close this if you have no further questions? |
I have tried several models and do not get garbage. llama-cpp-python 0.2.74, updated yesterday. |
Trying to save messages using
gives
|
Sorry, I will update the package later today. Will inform you here! |
@woheller69 Thank you for the information on llama-cpp-python. |
@woheller69 Fixed everything and published new version, let me know if it works for you. Also added function to get message store of chat history. You can save and load like that: agent.chat_history.get_message_store().load_from_json("test.json")
agent.chat_history.get_message_store().save_to_json("test.json") |
saving messages now works but using it I find that adding a message does not work anymore.
This worked with the "old" version. Now it does not have an effect. When saving the messages after add_message the added message is not there. |
I found I can add it with
But will it be used in follow-up conversation then? |
Another thing: The E.g. using "Sure thing!" as prompt_suffix will eliminate refusals from Llama 3 :-) |
I updated my GUI to your new 0.2.2 version. It now works as long as I do not set top_p, top_k, or repeat_penalty.
these give e.g.:
The text was updated successfully, but these errors were encountered: