mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-14 15:57:27 +00:00
Model: Add support for chat_template.json
HuggingFace separated the chat template in the newest transformers versions. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -389,6 +389,10 @@ class ExllamaV2Container:
|
||||
logger.info("Attempting to load a prompt template if present.")
|
||||
|
||||
find_template_functions = [
|
||||
lambda: PromptTemplate.from_model_json(
|
||||
pathlib.Path(self.config.model_dir) / "chat_template.json",
|
||||
key="chat_template",
|
||||
),
|
||||
lambda: PromptTemplate.from_model_json(
|
||||
pathlib.Path(self.config.model_dir) / "tokenizer_config.json",
|
||||
key="chat_template",
|
||||
|
||||
Reference in New Issue
Block a user