Spaces:
Running
on
Zero
Running
on
Zero
frankaging
commited on
Commit
·
98bf5cc
1
Parent(s):
7849acf
o1 impl
Browse files
app.py
CHANGED
@@ -109,7 +109,7 @@ def generate(
|
|
109 |
"unit_locations": None,
|
110 |
"max_new_tokens": max_new_tokens,
|
111 |
"intervene_on_prompt": True,
|
112 |
-
"subspaces": [{"idx": subspaces_list["idx"], "mag": subspaces_list["internal_mag"]}],
|
113 |
"streamer": streamer,
|
114 |
"do_sample": True
|
115 |
}
|
@@ -185,13 +185,13 @@ with gr.Blocks(css="style.css") as demo:
|
|
185 |
with gr.Column(scale=7):
|
186 |
chat_interface = gr.ChatInterface(
|
187 |
fn=generate,
|
188 |
-
title="
|
189 |
type="messages",
|
190 |
additional_inputs=[selected_subspaces],
|
191 |
)
|
192 |
# Right side: concept management
|
193 |
with gr.Column(scale=3):
|
194 |
-
gr.Markdown("
|
195 |
search_box = gr.Textbox(
|
196 |
label="Search concepts",
|
197 |
placeholder="e.g. 'time travel'"
|
|
|
109 |
"unit_locations": None,
|
110 |
"max_new_tokens": max_new_tokens,
|
111 |
"intervene_on_prompt": True,
|
112 |
+
"subspaces": [{"idx": int(subspaces_list[0]["idx"]), "mag": int(subspaces_list[0]["internal_mag"])}],
|
113 |
"streamer": streamer,
|
114 |
"do_sample": True
|
115 |
}
|
|
|
185 |
with gr.Column(scale=7):
|
186 |
chat_interface = gr.ChatInterface(
|
187 |
fn=generate,
|
188 |
+
title="LM Steering with ReFT-r1 (16K concepts)",
|
189 |
type="messages",
|
190 |
additional_inputs=[selected_subspaces],
|
191 |
)
|
192 |
# Right side: concept management
|
193 |
with gr.Column(scale=3):
|
194 |
+
gr.Markdown("## Steering Concepts")
|
195 |
search_box = gr.Textbox(
|
196 |
label="Search concepts",
|
197 |
placeholder="e.g. 'time travel'"
|