gpt4all
gpt4all copied to clipboard
[Feature] Enable the setting of chat templates by an administrator for all users
Feature Request
I want to provide additional models from Hugging Face to all of my users so that all users can direktly use these models, without setting chat templates for these model individually.
Regarding that goal I have some questions and some suggestions.
I think GPT4All can use a chat template for a model from three sources:
- The information the user writes in the settings (which is stored in the file
GPT4All.ini). - The information about the model in the file
models3.json. - The metadata from the GGUF file.
As I read in the file src/jinja_replacements.cpp the chat template from a GGUF file can automatically be changed or replaced (e.g. it was done for templates for OLMoE and granite-3.1, see https://github.com/nomic-ai/gpt4all/commit/1b841820307ae52f297c384ddb718934900395bd).
It seems to me that at first the chat template from the settings is used. If there is no chat template in the file GPT4All.ini then the chat template form the GGUF file seems to be used.
Now I have some questions:
- Q1: Is that correct, i.e. if there is no chat template in the file
GPT4All.iniis then the chat template from the GGUF file used? If yes, why is the chat template in a GGUF file not mentioned on the page https://docs.gpt4all.io/gpt4all_desktop/chat_templates.html ? - Q2: Why is a chat template given in the file
models3.jsonalso for thoses models which have a chat template in the GGUF file? When is the chat template frommodels3.jsonused? - Q3: Why there is also a
promptTemplateentry in the filemodels3.jsonfor some models (e.g. for "Phi-3 Mini Instruct")? When is that information used? Why is the text from thepromptTemplatenot shown and cannot be changed in the settings? - Q4: Is it correct that the chat template for a model can currently only be changed by each user individually (in the settings) and not by the administrator for all users?
To make it possible (or easier) to set the chat template by the administrator I have two suggestions.
- S1: To enable the administrator to set a chat template for all users, the chat template in configuration files (in
models3.jsonand in an additionally configuration file, see next suggestion) should have a higher priority for a model than the chat template in the GGUF file. - S2: As the existing file
models3.jsonis replaced by the current (downloaded) file each time GPT4All is started (workaround: makemodels3.jsononly readable and not writeable), an additional file should be available for setting chat templates for additional models (e.g. from Hugging Face).
Additional recommendations for the configuration of additional models for an administrator of GPT4All are welcome.