Hugging Face adds chat_template support to preserve chat input formatting across models
AI Impact Summary
Hugging Face is introducing a chat_template feature that stores the per-model input format as a Jinja template within the tokenizer. This enables consistent conversion of a list of chat messages (roles and content) into the exact string the model was trained on, reducing distribution shift and silent performance degradation. The change provides concrete templates for common formats and recommends aligning with ChatML for compatibility. Teams should migrate by leveraging tokenizer.chat_template for their target checkpoints and validating input-output formatting across training and inference pipelines.
Affected Systems
- Date
- Date not specified
- Change type
- capability
- Severity
- info