ster converse
Play conversations between a model, optionally with an adapter, and a simulated user, and write each one as `{"messages": [...]}`: the rollout `ster tune grpo --turns` trains on, run with no gradient, so the conversations an evaluation reads are produced exactly the way the policy's training conversations are.
Invocation and purpose#
ster converse --model <MODEL> [--revision <REV>] [--device <DEVICE>] [--adapter <DIR>] --prompts <FILE> --user-model <MODEL> [--user-revision <REV>] --turns <N> --max-new-tokens <N> --max-sequence <N> --temperature <T> [--top-p <P>] --seed <SEED> [--precision f32|f16|bf16] --output <FILE>Each prompt opens one conversation. The assistant is --model with --adapter attached when one is named; the user is --user-model, which answers each conversation with the roles swapped, and an empty reply from it ends the conversation early. Both models sample --max-new-tokens per turn under the same temperature, top-p and seed, and a conversation plus its next turn may not exceed --max-sequence tokens.
Inputs and options#
| Input | Required | Meaning |
|---|---|---|
--model <MODEL> | yes | The assistant: a local checkpoint directory or a Hugging Face id, as every ster command takes it. |
--adapter <DIR> | no | A LoRA adapter written by ster tune sft or ster tune grpo, attached to --model. |
--prompts <FILE> | yes | JSON shaped as {"prompts": ["..."]}; each prompt opens one conversation. |
--user-model <MODEL> | yes | The model that plays the user. |
--user-revision <REV> | no | Revision of --user-model. |
--turns <N> | yes | Assistant turns per conversation, at most; at least 2. |
--max-new-tokens <N> | yes | Tokens sampled per turn, for both models. |
--max-sequence <N> | yes | The longest a conversation plus the next turn may be, in tokens. |
--temperature <T>, --top-p <P>, --seed <SEED> | temperature and seed yes | Sampling for both models. |
--precision | no | Dtype both models are mapped at; f32 by default. |
--output <FILE> | yes | JSONL file the conversations are written to, one {"prompt_index": N, "messages": [...]} per line. |
Output and state#
Writes --output and prints output, conversations, assistant_turns, user_model and adapter. Loads two models; writes nothing else.
Refusals#
a conversation with a simulated user needs --turns of at least 2; one turn is ster generate.cannot create <path>andcannot write <path>for the output file.prompt <N> could not be played, with the runtime's own cause, when a conversation cannot be sampled.- The prompt-set, model and adapter loading refusals of `ster generate` and `ster tune inspect`.