Repository navigation
app: control vector picker and strength in Engine advanced - #1951
BlivionIaG wants to merge 104 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.
|
# Conflicts: # CHANGELOG.md
|
Thanks, BlivionIaG. The latest source meets the four remaining code asks. The app prices the current Qwen startup-budget form and has The remaining proof is the two real native-picker cells. Initial selection while off must save the picked path with This was a source-only re-check; no contributor build or test was run here.
|
# Conflicts: # CHANGELOG.md
|
Thanks again @BlivionIaG. One sequencing note on top of the review above: this branch also carries 58 of #1835's 59 commits (the GLP engine and fused Metal kernel), so landing it would land #1835's code with the changes still asked there. We'll keep #1951 ready on our side and land it right after #1835's fixes are in; no change is needed to the app work itself. We have #1951 rebased onto current main for that.
|
# Conflicts: # CHANGELOG.md # app/src/lib/preferences/packs/index.ts
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md # zig/src/families/qwen27/model.zig
|
The desktop leg's two failures are the secret-canary linter tests, and this PR's engine surface is the likely regression point: |
Synthena Initial Review — Needs changes (
|
|
A correction to our automated review: Our 28 Nov review stands: nothing more is needed on the app code (the flagged process-record, model-check and performance modules are service.ts split into files), and landing it is ours.
|
What this changes
App controls for the generic add-only steering feature. Desktop-maintainer review and #1835 landing are still prerequisites.
cd1a825e9e, merged into this head (942ea2e7a3); Implement GLP control vectors with a fused Metal kernel for Qwen3.8-27B #1835 at741fd8af50is the ancestor. Main'sq27_witnessload guard and the GLPglpoption both kept inzig/src/native/metal.zig; main's macOS-only test block kept and this branch'sqwen27_mtpimport added inside it;CHANGELOG.mdkept both sides; the branch'sqwen27Sourcenow inlines theQ27_SPECIALIZEsubstitution sometal_limits.zigstays at 598 lines.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
942ea2e7a3.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.