ster vector score
Score a text token by token along a steering artifact's direction at one layer.
Invocation and purpose#
ster vector score --model <MODEL> --vector <VECTOR> --layer <LAYER> (--input <TEXT> | --input-file <FILE>)
[--chat-template auto|off] [--precision f32|f16|bf16] [--revision <REVISION>] [--device <DEVICE>]Shows where a text sits along a direction, one token at a time: the text is read through the model once, at --layer, as `ster extract` reads a prompt, and every token's state there is projected onto the artifact's unit direction at that layer. A score is a length along the direction in the units of that layer's states; Ster gives no threshold for it, so compare tokens of one text, or texts read alike.
Inputs and options#
| Input | Required | Meaning |
|---|---|---|
--vector <VECTOR> | yes | The steering artifact whose direction the tokens are scored along. |
--layer <LAYER> | yes | The layer every token's state is read at; the artifact must carry a vector there. |
--input <TEXT> or --input-file <FILE> | one of them | The text to score, given inline or in a file. |
--chat-template auto|off | no | auto (default) reads the text through the model's own chat template when it publishes one; match the run that fitted the artifact. |
--precision f32|f16|bf16 | no | Dtype the base weights are mapped at; bf16 needs --device metal. |
Output and state#
Writes nothing. The answer lists each token (index, id, text as the tokenizer spells it, score) and the scores' min, max and mean, beside layer, trait and the model.
Refusals#
- An empty text, or a text and a text file both given, is refused before the artifact and the weights are read.
- A layer the model lacks; a layer the artifact carries no vector at, naming the layers it does carry; an artifact of another model or width; a direction with no usable length.