Use the Playground
The App's Playground runs Completions in the browser, with the settings of POST /v1/completions: the model, sampling, log probabilities, Activations, and Steering vectors. Each Completion that you start there is a Run, which the API runs on its server and keeps.
Run a prompt
- Open Playground.
- Write the prompt. In an empty prompt box, Tab puts in the gray example.
- Choose the Model and the settings, such as Max tokens and Temperature. Each setting is a field of the request, as Completions lists them. Choices is
n, Top logprobs shown islogprobs, Read Layers reads Activations, and Steer adds a Steering vector. Hover over a model in the model list to see its id, and use that id asmodelin the API. - Select Run. The text appears under the prompt as it grows, and the prompt stays as you wrote it. To stop the Run, select Stop.
To go on from a Run's text, copy it with Copy and add it to the prompt.
A number out of range is marked as you type, with its range. For example, Top p is more than 0 and at most 1. Reset to default puts every setting back.
Wait for a model to start
A new Playground starts on a Warm model when one is Warm. A Run of a model that is not Warm waits while the model starts. One line above the output says how far the start has got and about how long is left. The Run then goes on by itself, also when you close the tab. Cold starts and long requests explains the starts.
If the API refuses to start a Run, for example because your Budget cannot hold it, the output says why, and nothing runs. When a setting is at fault, such as a Layer that the model does not have, the App marks that setting until you change it.
Share your settings
The page's address holds the settings of each model, Single or Compare, and the Heatmap. Copy the address to share them, and a reload keeps them. The address never holds the prompt, a Run, or a Steering vector.
The browser keeps the prompt as a draft. Playground in the navigation opens the address that this browser used last, so your settings come back after you visit another page. When you sign out, the App forgets the draft and that address.
Compare models and settings
- Select Compare. The page lists the Models. When you had one model, Compare starts with a copy of it.
- Select Add model to add a model, up to 6. Each model has its own settings, and all of them share the prompt. Each model has buttons to change its settings, duplicate it, or remove it.
- Select Run all. The Playground starts one Run for each model. To stop them, select Stop all.
Each Run shows its model, and the settings in which it differs from the others. Runs with the same prompt and with log probabilities also say how many of their first tokens match the first Run's. A model's Run can fail to start, for example when your Budget cannot hold it. That model's place then says why, beside the Runs that started.
Find your Runs again
The API runs each Run on its server and keeps it until you delete it. A Run goes on when you close the tab or open another page, and the Playground follows it again when you come back. When the API restarts says what happens to a Run that is running then.
Each Run has a number: 1, 2, 3, and on, in the order that you started your Runs. A Run keeps its number. When you come back to the page, the newest Run shows above the Runs table.
The Runs table lists your newest 100 Runs, newest first, with their number, status, model, settings, text, tokens, and time. The time is in UTC, such as 3 Nov, 20:19 UTC. When the 100 cut the Runs of one Run all, the table lists the rest of them too.
- To read a Run again, select it in Runs. The Playground shows it with its tokens and Activations.
- To compare Runs, choose two or more with their boxes. The button Compare runs then counts them, as in Compare 2 runs. Select it to see them side by side.
- To delete a Run, open the menu at the end of its row, select Delete, then Delete run. Its text, tokens, and Activations go, and you cannot undo it.
Each row of Runs ends with a menu of the Run's actions:
| Action | What it does |
|---|---|
| Show | Shows the Run, as a select on its row does |
| Use these settings | Puts the Run's model, settings, and prompt back into the form |
| Copy settings | Copies the model, max_tokens, and each setting that differs from the API's default as JSON, with the field names of POST /v1/completions |
| Copy prompt | Copies the prompt |
| Copy output | Copies the text of the Run, each choice under its number when it has several. A Run without text does not have it. |
| Copy as API request | Copies a curl command that sends the Run's request to POST /v1/completions, without the fields at the API's defaults |
| Delete | Deletes the Run after you confirm |
The curl command reads your API key from $ACS_API_KEY and holds no key (Send the key). Its request streams, as the Run did, so curl prints the events as they arrive. When the browser does not let the App copy, the App shows the text selected. Copy it by hand.
The Runs of one Run all stay together in Runs, under a row that names them, such as Comparison of runs 4 and 5. To bring a comparison back, select Restore on that row. The Playground switches to Compare and makes a model of each Run's settings, with its seed. It puts the prompt back in the box, and shows the Runs side by side. Nothing runs until you select Run all. Restore waits until no Run of the page is running.
The API erases a deleted Run 14 days later. It keeps a Run's Activations for 7 days after the Run ends. After that, the Run shows its text and tokens without them. Kept data lists how long the API keeps each thing.
A Run that you stop keeps the text that it wrote, and you pay the tokens that it used (How a Hold ends).
Read tokens and the heatmap
When a Run asks for log probabilities (Top logprobs shown above 0), each token of its text is a button.
- Select a token, or move to it with the arrow keys and press Enter. The Playground shows the likeliest tokens at that place, with their probabilities.
- To try another token there, select it. The Playground cuts the text at that place, puts the token in, and runs on from it in a new Run.
The Heatmap colors each token by its probability, in five bands of one color, from "90% or more" to "Under 1%". The darker the token, the more likely it was. The heatmap marks a line break with ⏎ and a tab with ⇥. When you copy the text, the marks stay out of it. Turn the Heatmap on or off in the settings.
Copy copies The text of a Run, or The prompt and the text. When the browser does not let the App copy, as on a page over plain HTTP, the App shows the text selected. Copy it by hand.
Use these settings puts a Run's settings and its prompt back into the form. Next to it, the Run says how the settings on screen differ from its own. A Run from before a range narrowed keeps its value, such as a Min p of 2, and the form marks it.
Export Runs
- To export the Runs in view, select Export at the head of the output. To export the Runs that you chose in Runs, select Export chosen. To export every Run that you kept, also those older than the newest 100, select Export every run. Its file has each Run's text and log probabilities, oldest first, without the Activations.
- Choose a file:
| File | What it holds |
|---|---|
| JSON | One object for each Run, with its request, its Completion, its usage, and its status |
| JSONL | One line for each choice, for pandas.read_json(path, lines=True) |
| Text | The text of each choice, with its prompt, to read |
The request and the Completion keep the API's own shapes, so code that reads the answers of POST /v1/completions reads them too. The Activations keep the encoding that Decode the tensor reads.