Archived
DeepSeek's release carries no chat_template.jinja and its tokenizer_config.json names none, so an HF-direct container answers /v1/chat/completions with 501 unless the serve passes --override-chat-template. The converter now takes the template itself and bakes it into the vocab section, overriding whatever the checkpoint carried or lacked. Trailing newlines are stripped as for a sibling chat_template.jinja, and an unreadable or empty file is refused rather than skipped. Both paths are covered: text_test reads the file, convert_test converts the tiny checkpoint and reads the template back out of the container. (cherry picked from commit 6381f61794cd61d1f86925fd23ea61e1b1544dfe)