Update app.py
Browse files
app.py
CHANGED
@@ -141,7 +141,7 @@ with gr.Blocks(theme=gr.themes.Default(), css='styles.css') as demo:
|
|
141 |
'''
|
142 |
**👾 This space is a simple introduction to the emerging trend of models interpreting their OWN hidden states in free form natural language!!👾**
|
143 |
This idea was investigated in the paper **Patchscopes** ([Ghandeharioun et al., 2024](https://arxiv.org/abs/2401.06102)) and was further explored in **SelfIE** ([Chen et al., 2024](https://arxiv.org/abs/2403.10949)).
|
144 |
-
Honorary mention: **Speaking Probes** ([Dar, 2023](https://towardsdatascience.com/speaking-probes-self-interpreting-models-7a3dc6cb33d6) - my own work 🥳). It was less mature but had the same idea in mind. I think it
|
145 |
We will follow the SelfIE implementation in this space for concreteness. Patchscopes are so general that they encompass many other interpretation techniques too!!!
|
146 |
''', line_breaks=True)
|
147 |
|
@@ -160,13 +160,6 @@ with gr.Blocks(theme=gr.themes.Default(), css='styles.css') as demo:
|
|
160 |
model_chooser = gr.Radio(label='Choose Your Model', choices=list(model_info.keys()), value=model_name)
|
161 |
welcome_model = gr.Markdown(welcome_message.format(model_name=model_name))
|
162 |
with gr.Blocks() as demo_blocks:
|
163 |
-
gr.Markdown('## Choose Your Interpretation Prompt')
|
164 |
-
with gr.Group('Interpretation'):
|
165 |
-
interpretation_prompt = gr.Text(suggested_interpretation_prompts[0], label='Interpretation Prompt')
|
166 |
-
interpretation_prompt_examples = gr.Examples([[p] for p in suggested_interpretation_prompts],
|
167 |
-
[interpretation_prompt], cache_examples=False)
|
168 |
-
|
169 |
-
|
170 |
gr.Markdown('## The Prompt to Analyze')
|
171 |
for info in dataset_info:
|
172 |
with gr.Tab(info['name']):
|
@@ -187,6 +180,12 @@ with gr.Blocks(theme=gr.themes.Default(), css='styles.css') as demo:
|
|
187 |
with gr.Row():
|
188 |
for btn in tokens_container:
|
189 |
btn.render()
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
|
191 |
with gr.Accordion(open=False, label='Generation Settings'):
|
192 |
with gr.Row():
|
|
|
141 |
'''
|
142 |
**👾 This space is a simple introduction to the emerging trend of models interpreting their OWN hidden states in free form natural language!!👾**
|
143 |
This idea was investigated in the paper **Patchscopes** ([Ghandeharioun et al., 2024](https://arxiv.org/abs/2401.06102)) and was further explored in **SelfIE** ([Chen et al., 2024](https://arxiv.org/abs/2403.10949)).
|
144 |
+
Honorary mention: **Speaking Probes** ([Dar, 2023](https://towardsdatascience.com/speaking-probes-self-interpreting-models-7a3dc6cb33d6) - my own work 🥳). It was less mature but had the same idea in mind. I think it can be a great introduction to the subject!
|
145 |
We will follow the SelfIE implementation in this space for concreteness. Patchscopes are so general that they encompass many other interpretation techniques too!!!
|
146 |
''', line_breaks=True)
|
147 |
|
|
|
160 |
model_chooser = gr.Radio(label='Choose Your Model', choices=list(model_info.keys()), value=model_name)
|
161 |
welcome_model = gr.Markdown(welcome_message.format(model_name=model_name))
|
162 |
with gr.Blocks() as demo_blocks:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
gr.Markdown('## The Prompt to Analyze')
|
164 |
for info in dataset_info:
|
165 |
with gr.Tab(info['name']):
|
|
|
180 |
with gr.Row():
|
181 |
for btn in tokens_container:
|
182 |
btn.render()
|
183 |
+
|
184 |
+
gr.Markdown('## Choose Your Interpretation Prompt')
|
185 |
+
with gr.Group('Interpretation'):
|
186 |
+
interpretation_prompt = gr.Text(suggested_interpretation_prompts[0], label='Interpretation Prompt')
|
187 |
+
interpretation_prompt_examples = gr.Examples([[p] for p in suggested_interpretation_prompts],
|
188 |
+
[interpretation_prompt], cache_examples=False)
|
189 |
|
190 |
with gr.Accordion(open=False, label='Generation Settings'):
|
191 |
with gr.Row():
|