Skip to content

Commit

Permalink
Updating the shared settings object when loading a model (oobabooga#4425
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ziadloo authored Nov 1, 2023
1 parent 9bd0724 commit aaf726d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/ui_model_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ def load_model_wrapper(selected_model, loader, autoload=False):
if 'instruction_template' in settings:
output += '\n\nIt seems to be an instruction-following model with template "{}". In the chat tab, instruct or chat-instruct modes should be used.'.format(settings['instruction_template'])

# Applying the changes to the global shared settings (in-memory)
shared.settings.update({k: v for k, v in settings.items() if k in shared.settings})

yield output
else:
yield f"Failed to load `{selected_model}`."
Expand Down

0 comments on commit aaf726d

Please sign in to comment.