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
@@ -192,6 +192,10 @@ struct ServerOptions {
|
||||
* of an adapter requests still use drains it: RAD_OK with *in_flight > 0 (Engine::lora_unload). */
|
||||
std::function<int(const std::string&, const std::string&, std::string*)> lora_load;
|
||||
std::function<int(const std::string&, std::string*, int*)> lora_unload;
|
||||
/* --control-vector-variant: the name whose requests run with the control vector on, as the
|
||||
* server sees it (the front strips `base:` from it as from an adapter's). Empty: no such
|
||||
* name. */
|
||||
std::string control_vector_variant;
|
||||
/* A generator's adapters (Engine::gen_lora_acquire): the images and videos endpoints' `loras`
|
||||
* and <lora:...> tags get a slot holding that combination, a hold on it and a note on what was
|
||||
* left out; `gen_lora_names` is GET /v1/loras. Unset without adapters. */
|
||||
|
||||
Reference in new issue
Block a user