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

Conversation roles must alternate user/assistant/user/assistant/ #102

Open
gangooteli opened this issue May 13, 2024 · 0 comments
Open

Conversation roles must alternate user/assistant/user/assistant/ #102

gangooteli opened this issue May 13, 2024 · 0 comments

Comments

@gangooteli
Copy link

gangooteli commented May 13, 2024

I checked. They are alternate

File "/root/Medusa/medusa/train/train_legacy.py", line 183, in preprocess
prompt = tokenizer.apply_chat_template(conversation, tokenize=False)
File "/root/miniconda3/envs/fschat/lib/python3.9/site-packages/transformers/tokenization_utils_base.py", line 1743, in apply_chat_template
rendered = compiled_template.render(
File "/root/miniconda3/envs/fschat/lib/python3.9/site-packages/jinja2/environment.py", line 1304, in render
self.environment.handle_exception()
File "/root/miniconda3/envs/fschat/lib/python3.9/site-packages/jinja2/environment.py", line 939, in handle_exception
raise rewrite_traceback_stack(source=source)
File "", line 1, in top-level template code
File "/root/miniconda3/envs/fschat/lib/python3.9/site-packages/jinja2/sandbox.py", line 394, in call
return __context.call(__obj, *args, **kwargs)
File "/root/miniconda3/envs/fschat/lib/python3.9/site-packages/transformers/tokenization_utils_base.py", line 1771, in raise_exception
raise TemplateError(message)
jinja2.exceptions.TemplateError: Conversation roles must alternate user/assistant/user/assistant/...

Please help me with the resolution

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

No branches or pull requests

1 participant