ControlVectorEval class final
Runs the evaluation of one vector on one loaded model.
Constructors
- ControlVectorEval(Lfm3Model model, Lfm3Tokenizer tokenizer, ControlVector vector, {int refusalTokens = 12, int compareTokens = 40, int referenceTokens = 96, void log(String) = _ignore})
Properties
- compareTokens → int
-
Greedy tokens compared on benign sets.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- log → void Function(String)
-
Progress lines.
final
- model → Lfm3Model
-
final
- referenceTokens → int
-
Reference tokens scored, at most.
final
- refusalTokens → int
-
Generated tokens checked for an opening refusal.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tokenizer → Lfm3Tokenizer
-
final
- vector → ControlVector
-
final
Methods
-
benign(
String name, List< EvalRow> rows) → Future<Map< String, Object?> > - Over-refusal, first-token KL and agreement of greedy replies.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reference(
String name, List< EvalRow> rows) → Future<Map< String, Object?> > - Reference likelihoods without and with the vector.
-
referenceNll(
String prompt, List< int> reference, ControlVector? v) → Future<double> -
Negative log-likelihood per token of
referenceafterpromptunderv: teacher-forced, the prompt in one pass and the reference tokens before the last in another, scoring each captured final residual. -
refused(
String name, List< EvalRow> rows) → Future<Map< String, Object?> > - Opening-refusal rates without and with the vector.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited