Skip to content

Model config_format and tokenizer_mode conditional defaults fix#1027

Merged
joerunde merged 8 commits into
torch-spyre:mainfrom
Daniel-Schenker:model_config_format_fix
Jul 15, 2026
Merged

Model config_format and tokenizer_mode conditional defaults fix#1027
joerunde merged 8 commits into
torch-spyre:mainfrom
Daniel-Schenker:model_config_format_fix

Conversation

@Daniel-Schenker

Copy link
Copy Markdown
Collaborator

Description

This PR updates the logic used to apply conditional defaults for config_format and tokenizer_mode.

The previous implementation was incorrectly assigning mistral formatting to Llama models from HF as it was recursively searching the model files for a params.json file which was present in a subdirectory of some Llama models.

The new implementation uses is_mistral_model_repo which checks for consolidated*.safetensors file which is a more accurate check for mistral models.

Related Issues

Test Plan

Tested with various supported models and it correctly detects mistral for supported mistral family models while defaulting to auto for non-mistral models.

Checklist

  • I have read the contributing guidelines
  • My code follows the project's code style (run bash format.sh)
  • I have added tests for my changes (if applicable)
  • I have updated the documentation (if applicable)
  • My commits include a Signed-off-by: line (DCO compliance)

Signed-off-by: Daniel Schenker <daniel.schenker@ibm.com>
Signed-off-by: Daniel Schenker <daniel.schenker@ibm.com>
Signed-off-by: Daniel Schenker <daniel.schenker@ibm.com>
Signed-off-by: Daniel Schenker <daniel.schenker@ibm.com>
Signed-off-by: Daniel Schenker <daniel.schenker@ibm.com>
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

👋 Hi! Thank you for contributing.
Just a reminder: Make sure that your code passes all the linting checks, otherwise your PR won't be able to be merged. To do so, run ./format.sh.
Now you are good to go 🚀.

We also recommend installing prek and configuring it to check your code before every local commit.

@Daniel-Schenker Daniel-Schenker force-pushed the model_config_format_fix branch from 68ebed5 to 7424b64 Compare July 7, 2026 19:59
Daniel-Schenker and others added 3 commits July 13, 2026 14:21
Signed-off-by: Daniel Schenker <daniel.schenker@ibm.com>
Signed-off-by: Daniel Schenker <daniel.schenker@ibm.com>

@joerunde joerunde left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lpgtm

@joerunde joerunde merged commit 82bb227 into torch-spyre:main Jul 15, 2026
15 checks passed
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.

2 participants