Adding chat format to Models ? - What wind.surf will do ?
Browse files
app.py
CHANGED
|
@@ -6,11 +6,13 @@ import requests
|
|
| 6 |
MODELS = {
|
| 7 |
"Llama-3.2-3B": {
|
| 8 |
"repo_id": "lmstudio-community/Llama-3.2-3B-Instruct-GGUF",
|
| 9 |
-
"filename": "*Q4_K_M.gguf"
|
|
|
|
| 10 |
},
|
| 11 |
-
"Llama-3.2-
|
| 12 |
"repo_id": "lmstudio-community/Llama-3.2-1B-Instruct-GGUF",
|
| 13 |
-
"filename": "*Q4_K_M.gguf"
|
|
|
|
| 14 |
}
|
| 15 |
}
|
| 16 |
|
|
@@ -26,7 +28,7 @@ def load_model(model_name):
|
|
| 26 |
verbose=True,
|
| 27 |
n_ctx=32768,
|
| 28 |
n_threads=2,
|
| 29 |
-
chat_format="
|
| 30 |
)
|
| 31 |
return current_model
|
| 32 |
|
|
@@ -74,7 +76,7 @@ def respond(
|
|
| 74 |
yield message_repl
|
| 75 |
|
| 76 |
def get_chat_title(model_name):
|
| 77 |
-
return f"{model_name} -
|
| 78 |
|
| 79 |
demo = gr.ChatInterface(
|
| 80 |
respond,
|
|
|
|
| 6 |
MODELS = {
|
| 7 |
"Llama-3.2-3B": {
|
| 8 |
"repo_id": "lmstudio-community/Llama-3.2-3B-Instruct-GGUF",
|
| 9 |
+
"filename": "*Q4_K_M.gguf",
|
| 10 |
+
"chat_format": "chatml"
|
| 11 |
},
|
| 12 |
+
"Llama-3.2-5B": {
|
| 13 |
"repo_id": "lmstudio-community/Llama-3.2-1B-Instruct-GGUF",
|
| 14 |
+
"filename": "*Q4_K_M.gguf",
|
| 15 |
+
"chat_format": "chatml"
|
| 16 |
}
|
| 17 |
}
|
| 18 |
|
|
|
|
| 28 |
verbose=True,
|
| 29 |
n_ctx=32768,
|
| 30 |
n_threads=2,
|
| 31 |
+
chat_format=model_info["chat_format"]
|
| 32 |
)
|
| 33 |
return current_model
|
| 34 |
|
|
|
|
| 76 |
yield message_repl
|
| 77 |
|
| 78 |
def get_chat_title(model_name):
|
| 79 |
+
return f"{model_name} < - Load different model in Additional Inputs"
|
| 80 |
|
| 81 |
demo = gr.ChatInterface(
|
| 82 |
respond,
|