Directions by zero-based layer, each of hiddenSize finite floats;
layers without one are left alone. Only layers from firstLayer to
lastLayer (inclusive; null: no upper bound) are steered. scale
must be finite.
Identifies what this vector does to the arithmetic: the mode, scale,
range and the directions of the layers it steers. Equal for vectors
that steer identically.
What apply uses for layer, or null for a layer it steers not:
scale * d in float32 for ControlMode.add, the unit direction for
ControlMode.project. The GPU path uploads these. Do not modify.
Steers rowCount rows of hiddenSize at the start of rows, the
residual stream leaving layer, in place. Does nothing for a layer it
does not steers. Each row is computed on its own, in a fixed order,
so the result does not depend on how tokens are chunked.
Writes the directions (not mode, scale or range) to path as
safetensors: F32 tensors direction.<l> of shape hiddenSize, in
layer order. Written through a temporary file and a rename.
Reads the directions of a control-vector file: safetensors as save
writes it, or llama.cpp's GGUF (which needs the native kernels, for
the mapping). Every tensor must be an F32 vector named direction.<l>.