Spaces:
Running
Running
minor
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ import uuid
|
|
11 |
import json
|
12 |
|
13 |
# Constants
|
14 |
-
SYSTEM_PROMPT = """You are
|
15 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
16 |
TITLE = "<h1><center>SmallThinker-3B Chat</center></h1>"
|
17 |
MODEL_PATH = "PowerInfer/SmallThinker-3B-Preview"
|
@@ -156,9 +156,9 @@ def main():
|
|
156 |
)
|
157 |
|
158 |
with gr.Accordion(label="⚙️ Parameters", open=False):
|
159 |
-
temperature = gr.Slider(minimum=0, maximum=1, step=0.1, value=0.
|
160 |
max_new_tokens = gr.Slider(minimum=128, maximum=32768, step=128, value=16384, label="Max new tokens")
|
161 |
-
top_p = gr.Slider(minimum=0.0, maximum=1.0, step=0.1, value=
|
162 |
top_k = gr.Slider(minimum=1, maximum=100, step=1, value=20, label="Top-k")
|
163 |
repetition_penalty = gr.Slider(minimum=1.0, maximum=2.0, step=0.1, value=1.1, label="Repetition penalty")
|
164 |
|
|
|
11 |
import json
|
12 |
|
13 |
# Constants
|
14 |
+
SYSTEM_PROMPT = """You are a helpful assistant."""
|
15 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
16 |
TITLE = "<h1><center>SmallThinker-3B Chat</center></h1>"
|
17 |
MODEL_PATH = "PowerInfer/SmallThinker-3B-Preview"
|
|
|
156 |
)
|
157 |
|
158 |
with gr.Accordion(label="⚙️ Parameters", open=False):
|
159 |
+
temperature = gr.Slider(minimum=0, maximum=1, step=0.1, value=0.7, label="Temperature")
|
160 |
max_new_tokens = gr.Slider(minimum=128, maximum=32768, step=128, value=16384, label="Max new tokens")
|
161 |
+
top_p = gr.Slider(minimum=0.0, maximum=1.0, step=0.1, value=0.8, label="Top-p")
|
162 |
top_k = gr.Slider(minimum=1, maximum=100, step=1, value=20, label="Top-k")
|
163 |
repetition_penalty = gr.Slider(minimum=1.0, maximum=2.0, step=0.1, value=1.1, label="Repetition penalty")
|
164 |
|