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:
parent
b8700fbbc3
commit
cc2516790d
1 changed files with 4 additions and 0 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue