Skip to content
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

modellist: fix cloning of chat template and system message #3262

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cebtenzzre
Copy link
Member

When you change a model's system message and chat template from the defaults, and then clone it, one would expect the "Reset" and/or "Clear" options on these settings to still be available (and reset to the official defaults).

Additionally, one would expect the overrides for these settings to be preserved after a restart of GPT4All if they came from overrides on the base model.

Neither of these things was working properly, because of a mistake in the clone() call - instead of copying the defaults to the defaults and the overrides to the overrides, we copied the overrides to the defaults and didn't set the overrides. So the Reset/Clear buttons were not available. And defaults are intentionally not serialized, so after a restart the clone would act like you had clicked Reset on both settings.

Most settings don't typically come from defaults in models3.json, so none of this applies to them in practice (even though ideally they would also work this way).

This is a regression in #3147, although the way the defaults of these settings are handled was entirely new in that PR, so one could argue that until this PR this never worked quite right.

Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
@cebtenzzre cebtenzzre marked this pull request as ready for review December 11, 2024 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants