Spaces:
Running on Zero
Running on Zero
UI: add info tooltips to all generation controls
Browse files
app.py
CHANGED
|
@@ -695,7 +695,10 @@ def build() -> gr.Blocks:
|
|
| 695 |
with gr.Row():
|
| 696 |
with gr.Column(scale=2):
|
| 697 |
prompt = gr.Textbox(label="Prompt", lines=4,
|
| 698 |
-
value="The sky looks blue during the day because"
|
|
|
|
|
|
|
|
|
|
| 699 |
with gr.Row():
|
| 700 |
mode = gr.Radio(
|
| 701 |
["Completion", "Chat"], value="Completion", label="Mode",
|
|
@@ -705,16 +708,40 @@ def build() -> gr.Blocks:
|
|
| 705 |
"introspection. Chat: your text is wrapped in the "
|
| 706 |
"instruction template, so it answers as an assistant.")
|
| 707 |
tint = gr.Radio(["entropy", "divergence"], value="entropy",
|
| 708 |
-
label="Tint tokens by"
|
| 709 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 710 |
with gr.Row():
|
| 711 |
-
max_new = gr.Slider(16, 1024, value=256, step=16, label="max tokens"
|
| 712 |
-
|
| 713 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 714 |
with gr.Row():
|
| 715 |
-
temperature = gr.Slider(0.0, 1.5, value=0.7, step=0.05, label="temperature"
|
| 716 |
-
|
| 717 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 718 |
with gr.Row():
|
| 719 |
go = gr.Button("Generate", variant="primary")
|
| 720 |
regen = gr.Button("Regenerate")
|
|
|
|
| 695 |
with gr.Row():
|
| 696 |
with gr.Column(scale=2):
|
| 697 |
prompt = gr.Textbox(label="Prompt", lines=4,
|
| 698 |
+
value="The sky looks blue during the day because",
|
| 699 |
+
info="In Completion mode, write a prefix the model "
|
| 700 |
+
"finishes. In Chat mode, write a question or "
|
| 701 |
+
"instruction. Pick a curated example below to start.")
|
| 702 |
with gr.Row():
|
| 703 |
mode = gr.Radio(
|
| 704 |
["Completion", "Chat"], value="Completion", label="Mode",
|
|
|
|
| 708 |
"introspection. Chat: your text is wrapped in the "
|
| 709 |
"instruction template, so it answers as an assistant.")
|
| 710 |
tint = gr.Radio(["entropy", "divergence"], value="entropy",
|
| 711 |
+
label="Tint tokens by",
|
| 712 |
+
info="Which signal colours each token. Entropy = "
|
| 713 |
+
"the model\u2019s uncertainty (validated). "
|
| 714 |
+
"Divergence = how fast its internal meaning is "
|
| 715 |
+
"moving (observational).")
|
| 716 |
+
inject = gr.Checkbox(value=True, label="SRT injection on",
|
| 717 |
+
info="On: the SRT side-channel feeds its read-out "
|
| 718 |
+
"back into the frozen model. Off: the bare "
|
| 719 |
+
"backbone runs alone. Use the A/B tab to see "
|
| 720 |
+
"the difference side by side.")
|
| 721 |
with gr.Row():
|
| 722 |
+
max_new = gr.Slider(16, 1024, value=256, step=16, label="max tokens",
|
| 723 |
+
info="Upper bound on how many tokens to generate. "
|
| 724 |
+
"Higher = longer output and a longer trace to "
|
| 725 |
+
"read, but slower.")
|
| 726 |
+
budget = gr.Slider(2, 20, value=10, step=1, label="verbalization slots",
|
| 727 |
+
info="How many tokens get a natural-language "
|
| 728 |
+
"verbalization of their hidden state. More "
|
| 729 |
+
"slots = richer read-out, more compute.")
|
| 730 |
+
k = gr.Slider(1, 8, value=4, step=1, label="AV samples / slot (K)",
|
| 731 |
+
info="Samples drawn per verbalization slot; the best "
|
| 732 |
+
"is kept. Higher K = more faithful wording, slower.")
|
| 733 |
with gr.Row():
|
| 734 |
+
temperature = gr.Slider(0.0, 1.5, value=0.7, step=0.05, label="temperature",
|
| 735 |
+
info="Sampling randomness. 0 = greedy/"
|
| 736 |
+
"deterministic; higher = more varied, "
|
| 737 |
+
"higher-entropy output.")
|
| 738 |
+
top_p = gr.Slider(0.1, 1.0, value=0.95, step=0.05, label="top-p",
|
| 739 |
+
info="Nucleus sampling: only the most probable tokens "
|
| 740 |
+
"summing to this mass are considered. Lower = "
|
| 741 |
+
"safer, more focused.")
|
| 742 |
+
rep = gr.Slider(1.0, 1.5, value=1.15, step=0.01, label="rep. penalty",
|
| 743 |
+
info="Penalises repeating tokens. 1.0 = off; higher "
|
| 744 |
+
"discourages loops and repetition.")
|
| 745 |
with gr.Row():
|
| 746 |
go = gr.Button("Generate", variant="primary")
|
| 747 |
regen = gr.Button("Regenerate")
|