Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,10 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from llm_rs import AutoModel, SessionConfig, GenerationConfig, Precision, KnownModels
|
| 3 |
|
| 4 |
-
repo_name = "TheBloke/WizardCoder-15B-1.0-GGML"
|
| 5 |
-
file_name = "WizardCoder-15B-1.0.ggmlv3.q5_1.bin"
|
|
|
|
|
|
|
| 6 |
|
| 7 |
examples = [
|
| 8 |
"Write a travel blog about a 3-day trip to Thailand.",
|
|
@@ -14,7 +16,7 @@ examples = [
|
|
| 14 |
]
|
| 15 |
|
| 16 |
session_config = SessionConfig(threads=2,batch_size=2)
|
| 17 |
-
model = AutoModel.from_pretrained(repo_name, model_file=file_name, model_type=KnownModels.
|
| 18 |
|
| 19 |
def process_stream(instruction, temperature, top_p, top_k, max_new_tokens, seed):
|
| 20 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from llm_rs import AutoModel, SessionConfig, GenerationConfig, Precision, KnownModels
|
| 3 |
|
| 4 |
+
# repo_name = "TheBloke/WizardCoder-15B-1.0-GGML"
|
| 5 |
+
# file_name = "WizardCoder-15B-1.0.ggmlv3.q5_1.bin"
|
| 6 |
+
repo_name = "rustformers/mpt-7b-ggml"
|
| 7 |
+
file_name = "mpt-7b-instruct-q5_1-ggjt.bin"
|
| 8 |
|
| 9 |
examples = [
|
| 10 |
"Write a travel blog about a 3-day trip to Thailand.",
|
|
|
|
| 16 |
]
|
| 17 |
|
| 18 |
session_config = SessionConfig(threads=2,batch_size=2)
|
| 19 |
+
model = AutoModel.from_pretrained(repo_name, model_file=file_name, model_type=KnownModels.Mpt, session_config=session_config,verbose=True)
|
| 20 |
|
| 21 |
def process_stream(instruction, temperature, top_p, top_k, max_new_tokens, seed):
|
| 22 |
|