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.5.1 Chat template syntax for MaziyarPanahi_Qwen2-1.5B-Instruct-GGUF #3263

Open
ThiloteE opened this issue Dec 11, 2024 · 0 comments
Labels
bug-unconfirmed chat gpt4all-chat issues

Comments

@ThiloteE
Copy link
Collaborator

ThiloteE commented Dec 11, 2024

Bug Report

I experience Jinja syntax errors.

Steps to Reproduce

Use the model with new default jinja template, introduced in GPT4All-Chat 3.5.1

Default (reset) template:

{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system
You are a helpful assistant.<|im_end|>
' }}{% endif %}{{'<|im_start|>' + message['role'] + '
' + message['content'] + '<|im_end|>' + '
'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
' }}{% endif %}

Image

Better template:

{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system
You are a helpful assistant.<|im_end|>
' }}{% endif %}{{'<|im_start|>' + message['role'] + '
' + message['content'] + '<|im_end|>' + '
' }}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
' }}{% endif %}

Image
Image

Expected Behavior

No problems

Your Environment

@ThiloteE ThiloteE added bug-unconfirmed chat gpt4all-chat issues labels Dec 11, 2024
@ThiloteE ThiloteE changed the title [Jinja] GPT4All-Chat 3.5.1 Chat template syntax for Qwen2-1.5B-Instruct.Q6_K.gguf [Jinja] GPT4All-Chat 3.5.1 Chat template syntax for MaziyarPanahi_Qwen2-1.5B-Instruct-GGUF Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-unconfirmed chat gpt4all-chat issues
Projects
None yet
Development

No branches or pull requests

1 participant