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

[Jinja] GPT4All-Chat 3.6.1 bartowski/Phi-3.5-mini-instruct #3345

Open
ThiloteE opened this issue Dec 22, 2024 · 0 comments
Open

[Jinja] GPT4All-Chat 3.6.1 bartowski/Phi-3.5-mini-instruct #3345

ThiloteE opened this issue Dec 22, 2024 · 0 comments
Labels

Comments

@ThiloteE
Copy link
Collaborator

ThiloteE commented Dec 22, 2024

Meta-issue: #3340

Bug Report

Model does not work out of the box.

Steps to Reproduce

  1. Download the gguf
  2. sideload it in GPT4All-Chat
  3. start chatting

Expected Behavior

Model works out of the box.

Your Environment

Original Jinja chat template in tokenizer_config.json of https://huggingface.co/microsoft/Phi-3.5-mini-instruct

{% for message in messages %}{% if message['role'] == 'system' and message['content'] %}{{'<|system|>\n' + message['content'] + '<|end|>\n'}}{% elif message['role'] == 'user' %}{{'<|user|>\n' + message['content'] + '<|end|>\n'}}{% elif message['role'] == 'assistant' %}{{'<|assistant|>\n' + message['content'] + '<|end|>\n'}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>\n' }}{% else %}{{ eos_token }}{% endif %}

Jinja chat template out of the box in GPT4All-Chat 3.6.1, but still has EOS issues:

{%- for message in messages %}
    {%- if message['role'] == 'system' and message['content'] %}
        {{- '<|system|>\n' + message['content'] + '<|end|>\n' }}
    {%- elif message['role'] == 'user' %}
        {{- '<|user|>\n' + message['content'] + '<|end|>\n' }}
    {%- elif message['role'] == 'assistant' %}
        {{- '<|assistant|>\n' + message['content'] + '<|end|>\n' }}
    {%- endif %}
{%- endfor %}
{%- if add_generation_prompt %}
    {{- '<|assistant|>\n' }}
{%- else %}
    {{- eos_token }}
{%- endif %}

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant