docs, tests: say what the branch does, and test what the docs say

Review found four places where the branch's prose had outrun its code:

  - docs/GUIDE.md 4.10 promised that an incompatible sidecar "stops startup" two
    sentences after promising it is "reported and skipped" (the code warns and
    serves without it), and claimed deployment-level bit-identity for a request
    without the vector, which the PR explicitly withdraws. Both now say what the
    engine does; the wording is core/cvec.h's, which already had it right.
  - cvec_test claimed discovery order and a range past the model in the PR, but
    neither case existed. Both are there now, reusing the file writer and load()
    the file already had, so discovery -- the branch's policy choice -- has
    coverage at all.
  - the libr4d row descriptions still said "experimental speed projection" after
    the naming commit, and pointed at the unit that no longer exists;
    ref_hc.cpp's comment had a duplicated clause.
  - /stats' `n_layers` reported the direction count (47 of 48 layers); it is the
    model's layer count now, with first/last carrying the range.

The alias is read before the field's own name, so a request that sends both is
read as `control_vector`, and engine.cpp's /server_info comment is back above
engine_info.
This commit is contained in:
C_Tamas authored and StillDeadcode committed 2026-10-21 09:26:17 +02:00
1 parent 6964d05f75
commit f3979aa538
6 files changed
+75 -20

No files matched your search

+6 -4
View File
@@ -1461,14 +1461,16 @@ default for *requests* stays off in all cases.
- **Only a compatible container accepts it.** The file must be a GGUF `controlvector` whose
`controlvector.model_hint` (when present) is this model's architecture (`qwen4exp`), whose
directions are exactly the model's `--n-embd` wide, and whose range lies inside its layers.
Anything else stops startup with the reason: a direction from another model's residual basis
would move hidden states along a meaningless axis.
Anything else is reported and skipped, never served: a direction from another model's residual
basis would move hidden states along a meaningless axis.
- **It is off until a request asks for it.** The dashboard's Model view flips the default for
requests that name no choice, and a request's own `control_vector` field always wins. **No
switch reloads the model**: the directions are uploaded once at startup and each step carries a
per-request row mask.
- **A request without it computes exactly what it computes with no vector loaded** — the op skips
a disabled row without reading or writing it.
- **The op is a no-op when off** — it skips a disabled row without reading or writing it, so an
unprojected request's stream is the one the stock model computes. What a deployment that merely
*offers* a vector does not promise is bit-identity with one that has none: the table's VRAM can
move an expert or a KV block, the tie-level variance radiance documents elsewhere.
- **Conversations are partitioned.** Blocks and linear-state snapshots computed with the vector
on are keyed differently from those computed without it, so switching modes in one conversation
recomputes instead of reusing hidden states that belonged to the other mode. A runtime LoRA