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

Fix get_chat_template call for trainer builder #2003

Merged

Conversation

chiragjn
Copy link
Contributor

Description

Code crashes when choosing chat_template: tokenizer_default
We missed a few places in previous PRs

Social Handles (Optional)

@NanoCode012

@@ -272,7 +272,7 @@ def do_inference_gradio(
importlib.import_module("axolotl.prompters"), prompter
)
elif cfg.chat_template:
chat_template_str = get_chat_template(cfg.chat_template)
chat_template_str = get_chat_template(cfg.chat_template, tokenizer=tokenizer)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch. While testing this, I got this error but figured it was due to my tokenizer chosen not having a template in its config.

@winglian winglian merged commit 74db2a1 into axolotl-ai-cloud:main Oct 30, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants