huggingface / huggingface/alignment-handbook

jinja2.exceptions.TemplateError: Conversation roles must alternate user/assistant/user/assistant/...

Open
#93 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.7k
Forks
490
Avg merge
2m
Merged PRs (30d)
1

Description

When running the DPO script, when calling
```python
#####################
# Apply chat template
#####################
raw_datasets = raw_datasets.map(
apply_chat_template,
fn_kwargs={"tokenizer": tokenizer, "task": "dpo"},
num_proc=data_args.preprocessing_num_workers,
remove_columns=column_names,
desc="Formatting comparisons with prompt template",
)

```
I'm getting the error:
```
jinja2.exceptions.TemplateError: Conversation roles must alternate user/assistant/user/assistant/...
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.