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

[Feature] Enable the setting of chat templates by an administrator for all users #3525

Open
dlippold opened this issue Mar 3, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@dlippold
Copy link

dlippold commented Mar 3, 2025

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 1b84182).

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.ini is 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.json also for thoses models which have a chat template in the GGUF file? When is the chat template from models3.json used?
  • Q3: Why there is also a promptTemplate entry in the file models3.json for some models (e.g. for "Phi-3 Mini Instruct")? When is that information used? Why is the text from the promptTemplate not 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.json and 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.json is replaced by the current (downloaded) file each time GPT4All is started (workaround: make models3.json only 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.

@dlippold dlippold added the enhancement New feature or request label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant