Archived
core: only the package's layer range steers, and the table stays out of the budget
The loader stored a norm for every direction in the file, and the plugin declares
an op wherever a layer's scale is nonzero, so `layer_range` (4..44, the package's
own selection) reached only the range checks and the log line: the engine steered
all 47 directions -- 94 hc_project instances in the declared graph where the
sources and the docs say 41. The scale is zeroed outside the range now, which is
what RadControlVector documents ("a zero scale means this layer is not steered")
and what llama.cpp's patch does (its tensor is absent outside the range).
cvec_test asserts it for the default and for a JSON-stated range; --debug-graph
shows 41 a rank.
The direction table is also taken back out of the VRAM budget
(VramFacts::held_out). It is allocated in declare(), before vram_budget_resolve
reads free VRAM, so without the term the pools are planned around bytes the
program never sees. On this box the split came out identical either way
(claimable 12.92 GiB in both), so the term is a guarantee by construction rather
than a fix for an observed miss -- and it keeps a deployment that merely offers a
vector on the same plan as one that does not.
This commit is contained in:
1 parent
071d204252
commit
ad7c962375
5 files changed
+28
-6
No files matched your search
@@ -1510,6 +1510,11 @@ int Engine::plan() {
|
||||
const int64_t ck_cap = INT64_MAX / 8;
|
||||
const int64_t ck_store = !cfg_.prefix_cache || ck_slot <= 0 ? 0
|
||||
: ck_n > ck_cap / ck_slot ? ck_cap : ck_slot * ck_n;
|
||||
/* The direction table was allocated in declare(); it is not part of the program, and
|
||||
* claiming its bytes back keeps a deployment that offers a vector planning against the
|
||||
* same card as one that does not (VramFacts::held_out). */
|
||||
const int64_t cvec_bytes = cvec_.loaded() ? (int64_t) cvec_.dir.size() * 4 : 0;
|
||||
for (VramFacts& f : facts) f.held_out = cvec_bytes;
|
||||
RAD_TRY(resolve_table_placement(facts, emb_bytes, wfs, kv_floor, ngram_bytes,
|
||||
ngram_device, ngram_host, ck_store + host_arenas));
|
||||
/* The n-gram table was counted off the card; on it, every rank holds the whole table. */
|
||||
|
||||
Reference in new issue
Block a user