Archived
core: a control vector loaded from a controlvector GGUF, discovered per model family
A control vector is one unit direction per layer, applied to the residual stream while the model runs (llama.cpp's --cvec-mode project). This is the loader and its ABI, with no configuration surface: a vector is a property of the model family, so the engine looks for one beside the container, in its directory or in $RADIANCE_HOME/vectors, and uses it when it fits the container. The operation's parameters (layer range, scale, mode) come from the package's own JSON. Validation is against the container, never the file's provenance: architecture hint, direction width against n_embd, every layer in the range present, F32 rows. A discovered file that does not fit is reported and skipped; the switch stays off until a request asks for it. The ABI grows by one trailing, zero-defaulted field (RadBuildCtx::cvec), so an architecture plugin that ignores it is unchanged, and the cache gains a salt (0 without a vector) that keeps blocks and linear-state snapshots of one mode from being reused by the other.
This commit is contained in:
1 parent
aa12f79579
commit
64adee3ece
10 files changed
+859
-2
No files matched your search
@@ -614,6 +614,14 @@ struct SamplingParams {
|
||||
* scheduler thread where every other request's step waits; held here, starting is a lookup.
|
||||
* Null for a request not admitted through the server; the sampler then compiles. */
|
||||
std::shared_ptr<const GbnfProgram> grammar_program;
|
||||
|
||||
/* The control vector (core/cvec.h): whether this request's steps project the vector found for
|
||||
* this deployment out of the residual stream. The server sets it from the request's
|
||||
* `control_vector` field (`experimental_speed_projection` is Strata's spelling of the same
|
||||
* switch), or from the deployment's runtime default when the request names none; it needs no
|
||||
* reload and leaves the graph untouched. A deployment with no vector refuses `true` at
|
||||
* admission rather than serving the stock model. */
|
||||
bool use_control_vector = false;
|
||||
};
|
||||
|
||||
/* Raw logits at chosen vocabulary ids at the prompt's last position, for a caller that answers
|
||||
|
||||
Reference in new issue
Block a user