Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
7a7a151
1
Parent(s):
7a22267
update
Browse files- app.py +2 -2
- schemas.py +1 -1
app.py
CHANGED
|
@@ -348,8 +348,8 @@ with gr.Blocks(title="LLM Censorship Steering", theme=theme, head=HEAD, css=CSS,
|
|
| 348 |
|
| 349 |
with gr.Row():
|
| 350 |
layer = gr.Slider(0, 27, step=1, value=CONFIG["layer"], interactive=True, label="Steering layer", scale=2)
|
| 351 |
-
max_new_tokens = gr.Number(CONFIG["max_new_tokens"], minimum=10, maximum=
|
| 352 |
-
vec_scaling = gr.Number(1.
|
| 353 |
|
| 354 |
with gr.Column(scale=1):
|
| 355 |
output = gr.Textbox(label="Output", lines=15, max_lines=15, interactive=False)
|
|
|
|
| 348 |
|
| 349 |
with gr.Row():
|
| 350 |
layer = gr.Slider(0, 27, step=1, value=CONFIG["layer"], interactive=True, label="Steering layer", scale=2)
|
| 351 |
+
max_new_tokens = gr.Number(CONFIG["max_new_tokens"], minimum=10, maximum=3048, interactive=True, label="Max new tokens", scale=1)
|
| 352 |
+
vec_scaling = gr.Number(1.5, minimum=0, interactive=True, label="Vector scaling", scale=1)
|
| 353 |
|
| 354 |
with gr.Column(scale=1):
|
| 355 |
output = gr.Textbox(label="Output", lines=15, max_lines=15, interactive=False)
|
schemas.py
CHANGED
|
@@ -7,7 +7,7 @@ from pydantic.json_schema import SkipJsonSchema
|
|
| 7 |
vector_scaling = json.load(open("assets/vector_scaling.json", "r"))
|
| 8 |
|
| 9 |
CONFIG = {
|
| 10 |
-
"max_new_tokens":
|
| 11 |
"top_p": 0.95,
|
| 12 |
"temperature": 0.6,
|
| 13 |
"k": vector_scaling[25]["k_pos"],
|
|
|
|
| 7 |
vector_scaling = json.load(open("assets/vector_scaling.json", "r"))
|
| 8 |
|
| 9 |
CONFIG = {
|
| 10 |
+
"max_new_tokens": 2400,
|
| 11 |
"top_p": 0.95,
|
| 12 |
"temperature": 0.6,
|
| 13 |
"k": vector_scaling[25]["k_pos"],
|