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

No chat template for processor #845

Open
dtdo90 opened this issue Jan 15, 2025 · 0 comments
Open

No chat template for processor #845

dtdo90 opened this issue Jan 15, 2025 · 0 comments

Comments

@dtdo90
Copy link

dtdo90 commented Jan 15, 2025

Dear author,

Thank you for the amazing work!!!

I am studying finetuning the Llama 3.2 11B Vision model, but I encounter the following error

ValueError: No chat template is set for this processor. Please either set the chat_template attribute, or provide a chat template as an argument. See https://huggingface.co/docs/transformers/main/en/chat_templating for more information.

Based on ocrvqa_dataset.py, apply_chat_template is a step in processing the data (as in the code snippet below). Very much look forward to your reply!

def tokenize_dialogs(dialogs, images, processor):
    text_prompt = processor.apply_chat_template(dialogs)
    text_prompt = [prompt.replace('<|begin_of_text|>','') for prompt in text_prompt]

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