Skip to content

Conversation

przepeck
Copy link
Collaborator

@przepeck przepeck commented Aug 8, 2025

🛠 Summary

CVS-171239
Phi4-reasoning-int4-ov model hasn't been loading correctly because of custom tag {% generation %} in chat_template. I copied jinja2 extension class from HuggingFace transformers package (https://github.com/huggingface/transformers/blob/7188e2e28c6d663284634732564143b820a03f8b/src/transformers/utils/chat_template_utils.py#L398) to enable loading of this model.

🧪 Checklist

  • Unit tests added.
  • The documentation updated.
  • Change follows security best practices.
    ``

@przepeck przepeck requested review from dtrawins and mzegla August 8, 2025 12:51
@przepeck przepeck merged commit 0be12de into main Aug 14, 2025
@przepeck przepeck deleted the przepeck/phi4-reasoning-invalid-tag branch August 14, 2025 06:59
przepeck added a commit that referenced this pull request Aug 21, 2025
* added jinja2 extension class to enable Phi4-reasoning loading

* Added comment about the source of the new class
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.

3 participants