Ster/Docs

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#

text
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#

InputRequiredMeaning
--model <MODEL>yesThe assistant: a local checkpoint directory or a Hugging Face id, as every ster command takes it.
--adapter <DIR>noA LoRA adapter written by ster tune sft or ster tune grpo, attached to --model.
--prompts <FILE>yesJSON shaped as {"prompts": ["..."]}; each prompt opens one conversation.
--user-model <MODEL>yesThe model that plays the user.
--user-revision <REV>noRevision of --user-model.
--turns <N>yesAssistant turns per conversation, at most; at least 2.
--max-new-tokens <N>yesTokens sampled per turn, for both models.
--max-sequence <N>yesThe longest a conversation plus the next turn may be, in tokens.
--temperature <T>, --top-p <P>, --seed <SEED>temperature and seed yesSampling for both models.
--precisionnoDtype both models are mapped at; f32 by default.
--output <FILE>yesJSONL 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> and cannot 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`.