Skip to content

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

Description

@nguptaHQ

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions