From a7f15cada78edb567e14a08599487851eab129ec Mon Sep 17 00:00:00 2001
From: TwinFin <57421631+TwinFinz@users.noreply.github.com>
Date: Tue, 24 Sep 2024 23:12:32 -0400
Subject: [PATCH] Added Hermes Pro 7B
Added Hermes Pro 7B GPU configuration to example configurations
Signed-off-by: TwinFin <57421631+TwinFinz@users.noreply.github.com>
---
.../hermes-pro-7b/chat-message.tmpl | 10 +++++++
.../configurations/hermes-pro-7b/chat.tmpl | 2 ++
.../hermes-pro-7b/completion.tmpl | 1 +
.../hermes-pro-7b/function.tmpl | 17 +++++++++++
.../hermes-pro-7b/hermes-pro-7b.yaml | 29 +++++++++++++++++++
5 files changed, 59 insertions(+)
create mode 100644 examples/configurations/hermes-pro-7b/chat-message.tmpl
create mode 100644 examples/configurations/hermes-pro-7b/chat.tmpl
create mode 100644 examples/configurations/hermes-pro-7b/completion.tmpl
create mode 100644 examples/configurations/hermes-pro-7b/function.tmpl
create mode 100644 examples/configurations/hermes-pro-7b/hermes-pro-7b.yaml
diff --git a/examples/configurations/hermes-pro-7b/chat-message.tmpl b/examples/configurations/hermes-pro-7b/chat-message.tmpl
new file mode 100644
index 00000000..75d6ab6e
--- /dev/null
+++ b/examples/configurations/hermes-pro-7b/chat-message.tmpl
@@ -0,0 +1,10 @@
+<|im_start|>{{if eq .RoleName "assistant"}}assistant{{else if eq .RoleName "system"}}system{{else if eq .RoleName "tool"}}tool{{else if eq .RoleName "user"}}user{{end}}
+{{- if .FunctionCall }}{{end}}
+{{- if eq .RoleName "tool" }}{{end }}
+{{- if .Content}}
+{{.Content}}
+{{- end }}
+{{- if .FunctionCall}}{{toJson .FunctionCall}}{{end }}
+{{- if .FunctionCall }}{{end }}
+{{- if eq .RoleName "tool" }}{{end }}
+<|im_end|>
\ No newline at end of file
diff --git a/examples/configurations/hermes-pro-7b/chat.tmpl b/examples/configurations/hermes-pro-7b/chat.tmpl
new file mode 100644
index 00000000..c872ea5f
--- /dev/null
+++ b/examples/configurations/hermes-pro-7b/chat.tmpl
@@ -0,0 +1,2 @@
+{{.Input -}}
+<|im_start|>assistant\n
\ No newline at end of file
diff --git a/examples/configurations/hermes-pro-7b/completion.tmpl b/examples/configurations/hermes-pro-7b/completion.tmpl
new file mode 100644
index 00000000..9867cfcd
--- /dev/null
+++ b/examples/configurations/hermes-pro-7b/completion.tmpl
@@ -0,0 +1 @@
+{{.Input}}
\ No newline at end of file
diff --git a/examples/configurations/hermes-pro-7b/function.tmpl b/examples/configurations/hermes-pro-7b/function.tmpl
new file mode 100644
index 00000000..82081a40
--- /dev/null
+++ b/examples/configurations/hermes-pro-7b/function.tmpl
@@ -0,0 +1,17 @@
+<|im_start|>system
+You are a function calling AI model. You are provided with function signatures within XML tags. You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into functions. Here are the available tools:
+
+{{range .Functions}}
+{'type': 'function', 'function': {'name': '{{.Name}}', 'description': '{{.Description}}', 'parameters': {{toJson .Parameters}} }}
+{{end}}
+
+Use the following pydantic model json schema for each tool call you will make:
+{'title': 'FunctionCall', 'type': 'object', 'properties': {'arguments': {'title': 'Arguments', 'type': 'object'}, 'name': {'title': 'Name', 'type': 'string'}}, 'required': ['arguments', 'name']}
+For each function call return a json object with function name and arguments within XML tags as follows:
+
+{'arguments': , 'name': }
+
+<|im_end|>
+{{.Input -}}
+<|im_start|>assistant
+
\ No newline at end of file
diff --git a/examples/configurations/hermes-pro-7b/hermes-pro-7b.yaml b/examples/configurations/hermes-pro-7b/hermes-pro-7b.yaml
new file mode 100644
index 00000000..33566245
--- /dev/null
+++ b/examples/configurations/hermes-pro-7b/hermes-pro-7b.yaml
@@ -0,0 +1,29 @@
+backend: llama
+name: hermes-Pro-7b
+context_size: 512
+gpu_layers: 33
+f16: true
+mmap: false
+mmlock: false
+no_mulmatq: true
+low_vram: false
+threads: 11
+stopwords:
+- <|im_end|>
+- <|im_start|>
+-
+- "\n"
+- "\n\n\n"
+parameters:
+ model: Hermes-2-Pro-Mistral-7B.Q6_K.gguf
+ temperature: 0.2
+ top_k: 40
+ top_p: 0.6
+ seed: -1
+feature_flags:
+ usage: false
+template:
+ chat_message: chat-message
+ function: function
+ chat: chat
+ completion: completion
\ No newline at end of file