Change code tags to xml by aymeric-roucher · Pull Request #1442 · huggingface/smolagents (original) (raw)
Change code tags to XML to align with the widespread usage of XML tags within chat template for most LLMs.
For instance gemma-3 chat template uses XML formatting: check it out here. Many other models also use XML: Qwen for instance.
Testing XML tags on models like GPT-4o, Claude-4-Sonnet, Llama-3.1 8B & 70B, or Mistral 7B, didn't show any performance degradation.