Skip to content

Support passing additional params to MLXModel load and tokenizer.apply_chat_template #1406

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

Merged
merged 2 commits into from
Jun 6, 2025

Conversation

albertvillanova
Copy link
Member

Support passing additional params to MLXModel load and tokenizer.apply_chat_template.

Fix #1307.

For example, with this PR we can pass enable_thinking=True to Qwen3 tokenizer:

model = MLXModel(model_id="Qwen/Qwen3-30B-A3B", apply_chat_template_kwargs={"enable_thinking": True})

@albertvillanova albertvillanova merged commit 7574b39 into huggingface:main Jun 6, 2025
3 checks passed
@albertvillanova albertvillanova deleted the fix-1307 branch June 6, 2025 06:29
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

Successfully merging this pull request may close these issues.

Passing Additional Parameters to Tokenizer through MLXModel Interface
2 participants