Skip to content

muse_glimmer: add TOKENIZER_DEFAULTS for channel header parsing - #2108

Open
MichelangeloConserva wants to merge 1 commit into
ml-explore:mainfrom
MichelangeloConserva:muse-glimmer-tokenizer-defaults
Open

MichelangeloConserva wants to merge 1 commit into
ml-explore:mainfrom
MichelangeloConserva:muse-glimmer-tokenizer-defaults

Conversation

@MichelangeloConserva

Copy link
Copy Markdown

Problem

The muse glimmer model from Meta leaks raw token to=self<|message|>, <|eom|>, and <|start|>assistant to=user<|message|> into content instead of reasoning because mlx_lm.models.muse_glimmer does not defined TOKENIZER_DEFAULTS, meaning that chat_templates.muse_spark.RESPONSE_FORMAT is never properly attached. This instead is not the case for muse_spark.

Fix

We propose to define TOKENIZER_DEFAULTS in mlx_lm/models/muse_glimmer/config.py and __init__.py and use getattr(module, "apply_chat_template", None) in mlx_lm/tokenizer_utils.py. We added two tests in tests/test_tokenizers.py

Disclosures

  • I understand it is strictly prohibited to use AI to write PR description
  • AI usage disclosure: AI was used to generate the code, which I manually reviewed.

This branch has not been deployed

No deployments
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.

1 participant