Spaces:
Runtime error
Runtime error
kirp
commited on
Commit
·
710ee23
1
Parent(s):
82fe858
app.py
CHANGED
@@ -11,14 +11,13 @@ from huggingface_hub import snapshot_download
|
|
11 |
from llama_cpp import Llama
|
12 |
|
13 |
repo_name = "kirp/TinyLlama-1.1B-Chat-v0.2-gguf"
|
14 |
-
model_name = "ggml-model-
|
15 |
-
|
16 |
|
17 |
snapshot_download(repo_id=repo_name, local_dir=".", allow_patterns=model_name)
|
18 |
|
19 |
model = Llama(
|
20 |
model_path=model_name,
|
21 |
-
n_ctx=
|
22 |
n_parts=1,
|
23 |
)
|
24 |
|
@@ -49,11 +48,11 @@ g = gr.Interface(
|
|
49 |
gr.components.Textbox(
|
50 |
lines=2, label="Prompt", value = "What is huggingface?"
|
51 |
),
|
52 |
-
gr.components.Slider(minimum=0, maximum=1, value=0.
|
53 |
-
gr.components.Slider(minimum=0, maximum=1, value=
|
54 |
gr.components.Slider(minimum=0, maximum=100, step=1, value=50, label="Top k"),
|
55 |
gr.components.Slider(
|
56 |
-
minimum=1, maximum=
|
57 |
),
|
58 |
],
|
59 |
outputs=[
|
|
|
11 |
from llama_cpp import Llama
|
12 |
|
13 |
repo_name = "kirp/TinyLlama-1.1B-Chat-v0.2-gguf"
|
14 |
+
model_name = "ggml-model-q4_k_m.gguf"
|
|
|
15 |
|
16 |
snapshot_download(repo_id=repo_name, local_dir=".", allow_patterns=model_name)
|
17 |
|
18 |
model = Llama(
|
19 |
model_path=model_name,
|
20 |
+
n_ctx=1024,
|
21 |
n_parts=1,
|
22 |
)
|
23 |
|
|
|
48 |
gr.components.Textbox(
|
49 |
lines=2, label="Prompt", value = "What is huggingface?"
|
50 |
),
|
51 |
+
gr.components.Slider(minimum=0, maximum=1, value=0.1, label="Temperature"),
|
52 |
+
gr.components.Slider(minimum=0, maximum=1, value=1, label="Top p"),
|
53 |
gr.components.Slider(minimum=0, maximum=100, step=1, value=50, label="Top k"),
|
54 |
gr.components.Slider(
|
55 |
+
minimum=1, maximum=1024, step=1, value=128, label="Max tokens"
|
56 |
),
|
57 |
],
|
58 |
outputs=[
|