gghfez/MiniMax-M3-control-vectors
gghfez/MiniMax-M3-control-vectors
TODO
Creative Writing control-vectors for MiniMaxAI/MiniMax-M3
What are Control Vectors?
Control vectors steer model behavior without retraining by adjusting activations in specific directions.
These creative writing vectors help you tune narrative tone, character focus, and stylistic elements.
Available Vectors
optimism_vs_nihilismempathy_vs_sociopathyhonesty_vs_machiavellianismhumility_vs_narcissismcharacter focus (dialogue_vs_narration)language (simple vs ornate)storytelling (descriptive vs explicit)
Usage
Apply the debias vector and either the positive or negative vector when starting llama-server. If both axes are applied at the same time, they will cancel each other out. The debias vector must be set to 1.0
You can use either --control-vector [/path/to/vector.gguf] or --control-vector-scaled [/path/to/vector.gguf] [scale factor]
When using ik_llama.cpp, you can also use the REST-API (examples below)
IMPORTANT: As these vectors are calibrated against the debiased model, the debias vector must be applied along with the corresponding positive or negative axis control vector - they cannot be used on their own!
Examples (ik_llama.cpp or llama.cpp)
At server start-up
llama-server --model MiniMax-M3-Q8_0.gguf [your usual CLI arguments] \
--control-vector-scaled MiniMax-M3-optimism_vs_nihilism__debias.gguf 1.0 \
--control-vector-scaled MiniMax-M3-optimism_vs_nihilism__nihilism.gguf 1.0 \At server start-up with thinking disabled
llama-server --model MiniMax-M3-Q8_0.gguf [your usual CLI arguments] \
--chat-template-kwargs '{"enable_thinking": false}' \
--control-vector-scaled MiniMax-M3-optimism_vs_nihilism__debias.gguf 1.0 \
--control-vector-scaled MiniMax-M3-optimism_vs_nihilism__nihilism.gguf 1.0 \Load via API (ik_llama.cpp only)
load direction vector
curl 'http://127.0.0.1:8080/control-vectors/load' \
-X POST \
--data-raw '{"path":"/path/to/MiniMax-M3-control-vectors/MiniMax-M3-optimism_vs_nihilism__nihilism.gguf","scale":1}'load debias vector
curl 'http://127.0.0.1:8080/control-vectors/load' \
-X POST \
--data-raw '{"path":"/path/to/MiniMax-M3-control-vectors/MiniMax-M3-optimism_vs_nihilism__debias.gguf","scale":1}'check loaded control-vectors
curl http://127.0.0.1/control-vectorsSamples
TODO
Acknowledgements
Based on the excellent work and cross-covariance eigendecomposition implementation by @jukofyork. His creative writing control vectors v3.0 repository contains the foundational code and methodology that made this possible, plus 70+ other creative writing control vectors across many models and useful steering directions. Highly recommended for anyone working on improving LLM prose quality!
