Add Chat Template

Add or audit an XTuner chat-template implementation and its loss mask from an official Hugging Face model repository or local model directory. Use when supporting a new model under xtuner/v1/data_proto/messages, checking an existing implementation against tokenizer or processor apply_chat_template, deciding which assistant output and stop/EOS tokens receive loss, adding regression tests, or validating that exported training behavior matches vLLM and SGLang inference.

InternLM 0a8a3ec 3 files · 21.4 KB Updated

File contents

internlm/xtuner/tree/main/.claude/skills/add-chat-template commit 0a8a3ecb42

Frequently asked questions

npx skillmds@latest add internlm/add-chat-template