Spaces:
Running on Zero
Running on Zero
Download content/examples.py from wang2226/steering-showcase: direct link, hf CLI and curl.
- Browser
- Download file 1.53 kB
-
https://huggingface.co/spaces/wang2226/steering-showcase/resolve/main/content/examples.py
- Command line
-
hf download hf://spaces/wang2226/steering-showcase/content/examples.py
-
curl -L -o examples.py https://huggingface.co/spaces/wang2226/steering-showcase/resolve/main/content/examples.py
1.53 kB
| """Text of the visitor's own to try, each steered along an existing scenario's direction. | |
| Each one was checked on both models before it was listed (2026-10-02, CPU, float32): moving alpha | |
| from -2 to +2 changes the most likely next token in the direction's sense at least once, though not | |
| always at both ends (on Qwen, last night's dinner flips to "terrible" when pushed negative but stays | |
| "delicious" when pushed positive). Many prompts do not steer this cleanly, and the page says so; | |
| these are here to show the mechanism transferring, not to suggest that it always does. | |
| """ | |
| from __future__ import annotations | |
| EXAMPLES = [ | |
| { | |
| "label": "Sentiment 路 the weekend's weather", | |
| "scenario": "movie-critic", | |
| "prompt": "Write one sentence about the weather this weekend.", | |
| "prefix": "The weather this weekend will be absolutely", | |
| }, | |
| { | |
| "label": "Sentiment 路 last night's dinner", | |
| "scenario": "movie-critic", | |
| "prompt": "Describe the restaurant you visited last night.", | |
| "prefix": "The food was absolutely", | |
| }, | |
| { | |
| "label": "Cat or dog 路 a children's story", | |
| "scenario": "animal-enthusiast", | |
| "prompt": "Write a children's story about a friendly animal.", | |
| "prefix": "Once upon a time there was a friendly", | |
| }, | |
| { | |
| "label": "Calm or dramatic 路 a car arriving", | |
| "scenario": "storyteller", | |
| "prompt": "Describe a car pulling into a driveway.", | |
| "prefix": "The car pulled in rather", | |
| }, | |
| ] | |