Archived
server: a control-vector variant, MODEL:NAME, that runs with the vector on
A request turns the control vector on with the `control_vector` body field, or the deployment's default applies. A client that can only choose a model cannot send the field, and a gateway can allow or refuse a model by its name but not a field. --control-vector-variant NAME lists MODEL:NAME as a child of the model, the way an adapter is listed, and a request naming it runs with the vector on whatever the default; the model's own name keeps the default. Unset, the default, lists nothing. The key needs --control-vector off or on. NAME keeps the rule model names keep (no ':' or whitespace), and may not be a --lora adapter's name or the served model's own. The variant's name with "control_vector": false is refused, since the request asks for both. With adapters enabled the variant takes no adapter lookup, and /v1/load_lora_adapter refuses its name. config_test 68, fleet_config_test 18 and server_test 191 cases pass, and the host suite (ctest -LE 'gpu|oot') passes. On two R9700s at TP2 (Qwen3.8-Flash-Next IQR-V4 with the shipped vector), through the front: /v1/models lists MODEL:uncensored and GET /v1/models/MODEL:uncensored answers; a policy prompt to the variant is answered and to the model's own name refused; the variant with "control_vector": false is a 400.
This commit is contained in:
1 parent
aadabde0de
commit
157959fd80
10 files changed
+250
-10
No files matched your search
@@ -304,6 +304,18 @@ TEST(defaults_sit_under_models) {
|
||||
CHECK_EQ(fc.models[1].priority, 5);
|
||||
}
|
||||
|
||||
/* The variant's name is listed per model, as MODEL:NAME, so one name under defaults: gives every
|
||||
* model a variant of its own without a collision: the switch for a whole fleet at once. */
|
||||
TEST(a_control_vector_variant_under_defaults_reaches_every_model) {
|
||||
fleet::FleetConfig fc;
|
||||
CHECK_EQ(yload("defaults:\n control-vector: off\n control-vector-variant: uncensored\n"
|
||||
"models:\n a:\n model: /m/a.rad\n b:\n model: /m/b.rad\n", &fc), RAD_OK);
|
||||
CHECK_EQ(fc.models[0].cfg.control_vector_variant, "uncensored");
|
||||
CHECK_EQ(fc.models[1].cfg.control_vector_variant, "uncensored");
|
||||
CHECK_EQ(fc.models[1].cfg.given.at("--control-vector-variant"),
|
||||
"defaults.control-vector-variant");
|
||||
}
|
||||
|
||||
TEST(anchors_and_merge_keys) {
|
||||
fleet::FleetConfig fc;
|
||||
/* Top-level keys starting with x- are ignored, so they can hold anchors. */
|
||||
|
||||
Reference in new issue
Block a user