Repository navigation
app: control vector picker and strength in Engine advanced - #1951
BlivionIaG wants to merge 41 commits into
Conversation
|
CI is green on The first run's |
1459509 to
0e196a7
Compare
|
Final app head is now Terminal platform-check snapshot at unchanged Maintainer follow-up #1951 (comment) assigns review to the desktop-app maintainers,not the engine maintainers. This app-only PR remains dependent on--glp from#1835 and cannot land before it. No merge/auto-merge/draft-state change;awaiting app-maintainer review. Currentb71e73e2 stays unchanged. |
|
Thanks @BlivionIaG. This PR changes only the desktop app, plus its CHANGELOG line, and the app has its own maintainers, so they'll review it rather than us. On the engine side it needs
|
b71e73e to
334b7c2
Compare
|
Rebased onto main |
334b7c2 to
46eb6b8
Compare
The reader implements the GLP format defined by the weightless project (@msuiche): a GGUF v3 container of one fp32 direction per layer, applied by adding it to the residual stream. A file with no mode is llama.cpp's additive vector; a file that names any other mode, project included, is refused rather than read as an add file. The reader also refuses a spec version, rank or hook point it does not implement, a layer named twice, a direction that is not finite, and a digest that does not match. It reports the SHA-256 of the exact bytes it was handed, so a caller can name the file it loaded. tf-glp-check shows the reader's view of a file for glp_parity.py to compare with the reference reader, the file hash included.
…8-27B A steered layer takes the dispatch an unsteered layer takes: the norm that adds the block's output to the residual stream also adds alpha times the layer's direction to the row, and the normalisation reads the result. The plan holds one device buffer per layer the vector names, and a model without one runs the plain norm. The steered norm clears the half-operand state the plain norm leaves for the head, since its output has no such words. The kernel contract has a float64 reference for the add, a bound for the kernel's own fp32 product and sum, the launch's threads and threadgroup memory for gate 5, and the GPU suite with a control that drops a NaN and one that breaks the normalisation. The GPU half needs a Mac.
Off unless --glp is given: without it the server is as it was. The file is read once at startup, before the model loads, and the startup line names the file (escaped), the SHA-256 of its exact bytes and that replies are steered, beside the strength, the layers and the checkpoint the vector came from. The file hash is taken over the bytes already read; nothing is read twice. A file the reader refuses, a width or base model that does not match the checkpoint, a layer past the checkpoint's depth, a Gemma checkpoint, any other family, and a CUDA or ROCm backend are all refused by name and the server does not start. The engine reports the vector in force with the same file hash. docs/control-vectors.md covers the format, the layer a direction names, the refusals and how an operator brings a vector; the repository ships none.
…ry as the compiler allocates it
|
Commit identity fixed: author and committer on all 6 commits are now |
|
The change does what it describes: an opt-in file-and-strength control in the advanced engine settings, off by default, active only when the engine advertises the steering flags, with just the on/off state and strength written to audit records rather than the chosen file. The new host test of the setting behaviour is thorough, covering strength validation, refusal on an engine without support, picker-only file selection, restarting when the strength or file changes, persistence across a restart, and dropping a file that has since gone away. What is missing is coverage at the IPC boundary. The change deletes the host assertions that every engine channel is role-gated, that private material such as credentials, lesson text, environment values and folder paths never reaches audit logs or events, that the native picker is the sole admission route for a path, and that the bridge exposes each channel. They are removed rather than re-expressed against the reorganised modules, and nothing behavioural replaces them, so those invariants, including on the new control-vector channels, no longer have a host test. Please restore them as behavioural IPC tests and add an explicit check that the chosen vector path is never audited and that each new channel requires the operator role. Nothing here changes the engine, server or kernel; the new launch flags only become meaningful once the separate backend work lands. Size, comment-length and environment-access rules all hold. On balance this needs fixes for the deleted IPC security coverage, though the feature itself is sound.
|
|
Added
Checked on a clean |
|
Thanks @BlivionIaG. The new tests exercise the real IPC handlers and restore the role, audit privacy, picker-only path and preload coverage, including the four new channels. That answers our latest code request. What remains is #1835, which this depends on, and fitting it to current main's locale and preload changes.
|
…erved The steer suite was freed before runAll read its probes; hold it through the run. Build both kernels from the production specialization so the plain norm returns padded rows.
The spec's layers field is required even when the helper fills it.
…ld apart capabilitiesFor(.., true) lists --glp even where this host's engine refuses it, so comparing that listing with glp_startup.steers failed every non-Metal shard. Assert the forced steering build lists it, a false build still follows the platform's advertised bit, and the real capabilities equal steers.
# Conflicts: # CHANGELOG.md
Choosing a file reads the saved vector and writes it back with the strength and state it read. Started beside a pending strength or state change, it could apply the values that change had already replaced, and whichever write landed last decided the settings. The picker now runs through the same serialized feature-change path as set and clear, and a regression holds the queued restart to overlap both a strength change and an off change with a pick.
|
Fixed in The regression in
Head |
# Conflicts: # CHANGELOG.md # zig/build/qwen27_host.zig
# Conflicts: # CHANGELOG.md
|
Thanks @BlivionIaG. The picker now shares the setting-change queue, and the overlapping strength/state regression covers the reported race. The restored IPC security coverage remains present, and the included steering parent contains the previously requested fixes. Desktop-maintainer approval and the steering parent landing first remain prerequisites. The app tests do not replace packaged Electron checks or the engine's exact off-path and same-setting serial steering comparisons.
|
Main's SenseNova support turned the qwen27 norm into normShift and filled quant_gpu.zig to its 600-line limit. The steered norm now dispatches from norm_steer_gpu.zig with its pipeline held by the steering plan, unsteered norms call main's normShift, and SenseNova models refuse a control vector.
|
Merged the new #1835 head ( |
|
Thanks, @BlivionIaG. The picker queue fix, overlapping strength/state regression and IPC coverage remain intact. The app code is unchanged from the previously tested subtree, and the latest app checks are useful. Desktop-maintainer approval and the steering parent landing first remain prerequisites. Packaged Electron checks and the parent's exact off-path and same-setting serial steering comparisons are still needed. The changelog is the only conflict with current main.
|
What this changes
App controls for the generic add-only steering feature. Desktop-maintainer review and #1835 landing are still prerequisites.
6609ffbf99ef01fbdd3fc5513ff04400750decc4, merged into this head; Implement GLP control vectors with a fused Metal kernel for Qwen3.8-27B #1835 at24de2f6cb718e3f61e48dedb914267d0b13aed20is an ancestor. 36 commits ahead of main; merge conflicts wereCHANGELOG.mdandzig/build/qwen27_host.zig, both resolved keeping both sides.atc overlap --json: ATC0.9.6 was run against upstream with --base fb8fdf3; complete=false (myPullRequestsLimit, otherPullRequestsLimit, pullFilesLimit, pullFilesUnavailable, timeLimit). Supplemental complete snapshot:217foreign open heads,3038 exact local merge comparisons including latest Main ff742df; existing reviewed overlaps are retained, not claimed globally clean. The avoidable added environment-test collision with CUDA (GB10): a lending-daemon source for the display carveout, opt-in #2762 was removed by preserving Main's existing test name, without importing its unmerged feature.Checks on this head
c176811e94ab205a695393c42cdb54cc24afb947.app/andCHANGELOG.md), so the Zig findings are main's.app/on this head (Node 22.23.2, npm 10.9.8):npm ci --ignore-scripts,npm --prefix mobile ci --ignore-scripts,npm test(904/904 test files pass),npm run typecheck(0 errors) andgit diff --checkall pass. New regression: a picker selection overlapping a pending alpha change and a pending enabled change keeps both (red before the fix:alpha 2 !== 5, thenenabled true !== false).Receipt
c176811e94ab205a695393c42cdb54cc24afb947; Node 22.23.2, npm 10.9.8, Apple Silicon macOS. No model or GPU is used by the app checks.Remaining maintainer requests
Desktop-maintainer review; cannot land before #1835.
Checklist
Historical source-bound notes — not current-head qualification
Earlier commands/measurements retain their original commit/binary scope. Any earlier readiness or provenance claim is superseded by the open gates above.
Add-only operator control vectors
--glpfrom Implement GLP control vectors with a fused Metal kernel for Qwen3.8-27B #1835 and cannot land before it.Published head
46eb6b8c858b2f57653413dd35057475a035eb9aon main6c5cef8941b27d86b06a986834e13deb9b515e1e; follows backend #1835 atccac1b8337276e3e69118dcae97d1eeafe07d477(separate PRs, not a claim of ancestry).Settings → Engine advanced offers an operator-selected vector file and strength, off by default and gated by the engine's advertised
--glpsupport. Copy describes non-refusal style/topic steering, additive vectors only, named project/malformed refusals and the engine's exact-file SHA startup disclosure. No directional-ablation selector, refusal-removal assets or receipt/download links remain. The preview fixture is neutralstyle-vector.gguf; strength is described as scaling the added direction, not as an unverified derivation multiplier. All12 locale packs and the source phrases are updated.The contribution check exposed inherited large files touched by integration. Engine service responsibilities and engine/composer IPC groups are now composed into bounded modules: service585lines, preload600; channels, signatures, unsubscribe ownership, shutdown order and cache-cleanup admission are retained. The installed-view admission regression failed during extraction; the original service seam was restored and the unchanged consumer scenario now passes.
Exercised qualification
Execution scope: production bundle, six consumer suites and real native1.2.5 compatibility smoke were executed at initial
0e196a7b32eef3b573f5b8f4b607217869dbc924. The current46eb6b8c858b2f57653413dd35057475a035eb9ais tests-only: retained input-validation suite, typecheck and contribution preflight pass. Those earlier runtime executions are not relabelled as new runs. The web preview was exercised earlier in this pass, not rerun after the tests-only correction.Open gates
Desktop-maintainer review, and #1835 landing first (its own device runs are the maintainer's). No packaged Electron or model-performance receipt is claimed.
CI correction: the old desktop check asserted IPC literal text remained in preload.ts. Those implementation-text, wiring-count and browser mock-echo assertions are deleted, not repinned to the new modules. Actual production input-validation cases remain and pass; typecheck passes. This is a tests-only descendant, not a new runtime measurement. Current b71 CI: desktop-linux and appimage-linux pass; macOS desktop855/856cases pass, with only the unchanged inherited bot-VM bounded-output EPERM. The failing job did not record its syscall/stack; no isolation weakening, skip or retry was introduced. All other platform checks passed; the inherited desktop failure and device gates remain open.
CI on the current head: 12 successful checks and 2 scheduled-only skips,
desktopanddesktop-linuxincluded.