mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-29 10:42:03 +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.")
|
logger.info("Attempting to load a prompt template if present.")
|
||||||
|
|
||||||
find_template_functions = [
|
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(
|
lambda: PromptTemplate.from_model_json(
|
||||||
pathlib.Path(self.config.model_dir) / "tokenizer_config.json",
|
pathlib.Path(self.config.model_dir) / "tokenizer_config.json",
|
||||||
key="chat_template",
|
key="chat_template",
|
||||||
|
|||||||
Reference in New Issue
Block a user