mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #15] [CLOSED] generate: residual control-vector projection from GGUFs #2416
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2416
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/15
Author: @j-luwierski
Created: 9/26/2026
Status: ❌ Closed
Base:
main← Head:control-vector-pr📝 Commits (3)
e78d241generate: residual control-vector projection from GGUFsbc9b18csteer: run-steered.sh takes the run config as an argumenta23f726Merge branch 'main' into control-vector-pr📊 Changes
10 files changed (+466 additions, -6 deletions)
View changed files
📝
CMakeLists.txt(+1 -1)➕
include/strata/core/steer.hpp(+61 -0)📝
include/strata/kernels/elementwise.hpp(+4 -0)➕
run-steered.sh(+73 -0)📝
src/core/layer.cpp(+8 -2)➕
src/core/steer.cpp(+208 -0)📝
src/core/verify.cpp(+15 -1)📝
src/kernels/cuda/elementwise.cu(+26 -0)📝
src/prefill/prefill.cpp(+3 -1)📝
src/program/generate.cpp(+67 -1)📄 Description
What
Adds residual control-vector projection to the engine: per-layer control vectors loaded from GGUF files are projected onto the residual stream during generation, so model behaviour can be steered at inference time without modifying the weights.
New options
--control-vector-scaled- enable the projection with a given strength--control-vector-layer-range- apply the vector only to a range of layers--cvec-mode project- projection mode--cvec-dir- directory with the per-layer GGUFsReady-to-use control vector
A refusal-projection control vector for Qwen3.8-Flash-Next can be downloaded from:
https://huggingface.co/Cudecnik/Qwen3.8-Flash-Next-refusal-projection
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.