Preserve standalone model chat templates

This commit is contained in:
2026-09-30 11:47:29 +08:00
parent 67946deb82
commit f8937cc505
3 changed files with 18 additions and 2 deletions

View File

@@ -16,7 +16,8 @@
- 对明确写成 `TokenizersBackend` 且带 `tokenizer.json` 的仓库,改用
`PreTrainedTokenizerFast`。
- 对 `model_type=qwen2`、`eos_token=<|im_end|>` 且缺少聊天模板的模型,补充
简单的 Qwen ChatML 模板,避免 `/v1/chat/completions` 返回 400。
简单的 Qwen ChatML 模板,避免 `/v1/chat/completions` 返回 400;已有独立
`chat_template.jinja` 或 `chat_template.json` 的模型不补写。
启动时在 `/tmp` 建立新模型视图,只重写 `tokenizer_config.json`。权重、模型代码和
其他文件以符号链接指回只读 `/model`;源模型不变。没有命中上述问题时直接调用原始