Ster/Docs

ster vector score

Score a text token by token along a steering artifact's direction at one layer.

Invocation and purpose#

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

InputRequiredMeaning
--vector <VECTOR>yesThe steering artifact whose direction the tokens are scored along.
--layer <LAYER>yesThe layer every token's state is read at; the artifact must carry a vector there.
--input <TEXT> or --input-file <FILE>one of themThe text to score, given inline or in a file.
--chat-template auto|offnoauto (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|bf16noDtype 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.