Archived
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:
1 parent
6964d05f75
commit
f3979aa538
6 files changed
+75
-20
No files matched your search
+4
-4
@@ -1630,9 +1630,6 @@ bool Engine::state_slots_of(uint64_t seq, std::vector<int32_t>* out) const {
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ the HTTP frontend */
|
||||
/* The engine's part of /server_info: model, cards, KV, drafting and wire, for a running process.
|
||||
* The server holds only interfaces, so the engine renders this object and the server splices it in
|
||||
* verbatim. */
|
||||
/* The control vector, for /stats and /server_info. `available` is
|
||||
* what a client should test before sending the field: without a loaded vector a request that asks
|
||||
* for it is refused, so a UI can hide the control rather than offer a switch that fails. */
|
||||
@@ -1644,7 +1641,7 @@ std::string Engine::cvec_json() const {
|
||||
o["first"] = cvec_.first;
|
||||
o["last"] = cvec_.last;
|
||||
o["n_embd"] = cvec_.n_embd;
|
||||
o["n_layers"] = cvec_.n_layers > 0 ? cvec_.n_layers - 1 : 0;
|
||||
o["n_layers"] = cvec_.n_layers;
|
||||
o["scale"] = cvec_.user_scale;
|
||||
o["file"] = cvec_.path;
|
||||
o["mode"] = "project";
|
||||
@@ -1652,6 +1649,9 @@ std::string Engine::cvec_json() const {
|
||||
return o.dump();
|
||||
}
|
||||
|
||||
/* The engine's part of /server_info: model, cards, KV, drafting and wire, for a running process.
|
||||
* The server holds only interfaces, so the engine renders this object and the server splices it in
|
||||
* verbatim. */
|
||||
std::string Engine::engine_info() const {
|
||||
nlohmann::ordered_json e;
|
||||
e["arch"] = meta_.arch_id ? meta_.arch_id : "";
|
||||
|
||||
Reference in new issue
Block a user