Instructions to use gghfez/MiniMax-M3-control-vectors with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gghfez/MiniMax-M3-control-vectors with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gghfez/MiniMax-M3-control-vectors")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("gghfez/MiniMax-M3-control-vectors", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use gghfez/MiniMax-M3-control-vectors with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gghfez/MiniMax-M3-control-vectors" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gghfez/MiniMax-M3-control-vectors", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/gghfez/MiniMax-M3-control-vectors
- SGLang
How to use gghfez/MiniMax-M3-control-vectors with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "gghfez/MiniMax-M3-control-vectors" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gghfez/MiniMax-M3-control-vectors", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "gghfez/MiniMax-M3-control-vectors" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gghfez/MiniMax-M3-control-vectors", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use gghfez/MiniMax-M3-control-vectors with Docker Model Runner:
docker model run hf.co/gghfez/MiniMax-M3-control-vectors
Upload folder using huggingface_hub
Browse files- .gitattributes +21 -0
- MiniMax-M3-character_focus__debias.gguf +3 -0
- MiniMax-M3-character_focus__dialogue.gguf +3 -0
- MiniMax-M3-character_focus__narration.gguf +3 -0
- MiniMax-M3-empathy_vs_sociopathy__debias.gguf +3 -0
- MiniMax-M3-empathy_vs_sociopathy__empathy.gguf +3 -0
- MiniMax-M3-empathy_vs_sociopathy__sociopathy.gguf +3 -0
- MiniMax-M3-honesty_vs_machiavellianism__debias.gguf +3 -0
- MiniMax-M3-honesty_vs_machiavellianism__honesty.gguf +3 -0
- MiniMax-M3-honesty_vs_machiavellianism__machiavellianism.gguf +3 -0
- MiniMax-M3-humility_vs_narcissism__debias.gguf +3 -0
- MiniMax-M3-humility_vs_narcissism__humility.gguf +3 -0
- MiniMax-M3-humility_vs_narcissism__narcissism.gguf +3 -0
- MiniMax-M3-language__debias.gguf +3 -0
- MiniMax-M3-language__ornate.gguf +3 -0
- MiniMax-M3-language__simple.gguf +3 -0
- MiniMax-M3-optimism_vs_nihilism__debias.gguf +3 -0
- MiniMax-M3-optimism_vs_nihilism__nihilism.gguf +3 -0
- MiniMax-M3-optimism_vs_nihilism__optimism.gguf +3 -0
- MiniMax-M3-storytelling__debias.gguf +3 -0
- MiniMax-M3-storytelling__descriptive.gguf +3 -0
- MiniMax-M3-storytelling__explicit.gguf +3 -0
- README.md +98 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,24 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
MiniMax-M3-character_focus__debias.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
MiniMax-M3-character_focus__dialogue.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
MiniMax-M3-character_focus__narration.gguf filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
MiniMax-M3-empathy_vs_sociopathy__debias.gguf filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
MiniMax-M3-empathy_vs_sociopathy__empathy.gguf filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
MiniMax-M3-empathy_vs_sociopathy__sociopathy.gguf filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
MiniMax-M3-honesty_vs_machiavellianism__debias.gguf filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
MiniMax-M3-honesty_vs_machiavellianism__honesty.gguf filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
MiniMax-M3-honesty_vs_machiavellianism__machiavellianism.gguf filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
MiniMax-M3-humility_vs_narcissism__debias.gguf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
MiniMax-M3-humility_vs_narcissism__humility.gguf filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
MiniMax-M3-humility_vs_narcissism__narcissism.gguf filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
MiniMax-M3-language__debias.gguf filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
MiniMax-M3-language__ornate.gguf filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
MiniMax-M3-language__simple.gguf filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
MiniMax-M3-optimism_vs_nihilism__debias.gguf filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
MiniMax-M3-optimism_vs_nihilism__nihilism.gguf filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
MiniMax-M3-optimism_vs_nihilism__optimism.gguf filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
MiniMax-M3-storytelling__debias.gguf filter=lfs diff=lfs merge=lfs -text
|
| 55 |
+
MiniMax-M3-storytelling__descriptive.gguf filter=lfs diff=lfs merge=lfs -text
|
| 56 |
+
MiniMax-M3-storytelling__explicit.gguf filter=lfs diff=lfs merge=lfs -text
|
MiniMax-M3-character_focus__debias.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2a0a4f8c9244f8e003873fb5eec2eaca8db4db27b141672eb8f24d3f15834506
|
| 3 |
+
size 1403520
|
MiniMax-M3-character_focus__dialogue.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c755dd9b8124336afcba4eb04574a0ee6c3a92cbaafb2c6777b0c135c54fe2eb
|
| 3 |
+
size 1403520
|
MiniMax-M3-character_focus__narration.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7ab185990fa6f34e39e96ecceb85e1b884a92409215f8799baa8ee86f8861684
|
| 3 |
+
size 1403520
|
MiniMax-M3-empathy_vs_sociopathy__debias.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9c7498219562214c8acca1ea812610473973182568947866d7e44d404a757bc6
|
| 3 |
+
size 1403520
|
MiniMax-M3-empathy_vs_sociopathy__empathy.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7bb7731d9b68ec3434fe6a722b52ce8697ce9eda206aca07beb620ea3a197bf3
|
| 3 |
+
size 1403520
|
MiniMax-M3-empathy_vs_sociopathy__sociopathy.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7167ca8be9ed199113688bb40859cca4596355655c1db4c0ed4192de7cad25f6
|
| 3 |
+
size 1403520
|
MiniMax-M3-honesty_vs_machiavellianism__debias.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b59d6fa1f140a185e585cf3ddefe5d67e0ce88ec95948ca8fa2c32f1cba9a100
|
| 3 |
+
size 1403520
|
MiniMax-M3-honesty_vs_machiavellianism__honesty.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6d2410b436124d0375bf915dd459383228f1c129f520a706e4d59997619d4ca2
|
| 3 |
+
size 1403520
|
MiniMax-M3-honesty_vs_machiavellianism__machiavellianism.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7bce6281f4394d2a4e7306253c6eac8da3e510a87d410bfaeabff03e98d6bc60
|
| 3 |
+
size 1403520
|
MiniMax-M3-humility_vs_narcissism__debias.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:611a825e9c736f75d8c2ccaa6bf729b37c35ba7fc60e51a19b2fc1d64f054cda
|
| 3 |
+
size 1403520
|
MiniMax-M3-humility_vs_narcissism__humility.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:16a5faf46c13d46c18b5b3d9cce89e783442c296e258aea8121da45446f1110a
|
| 3 |
+
size 1403520
|
MiniMax-M3-humility_vs_narcissism__narcissism.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4706b2edf1581a76090c938e638dac9336b8eff432967c8be3561d2c27c5d41b
|
| 3 |
+
size 1403520
|
MiniMax-M3-language__debias.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2dfe5b721a93595525dd482ac55ea036a0fd5502e9a25d50694d9a193461b6b1
|
| 3 |
+
size 1403520
|
MiniMax-M3-language__ornate.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f8743bac341abf9f24c64b066cf043f836ce8f64d7e2decb630a59a51c5d3626
|
| 3 |
+
size 1403520
|
MiniMax-M3-language__simple.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:79f7563d3f7ab33be91a006d7f29a7903416376247a16dada34b7710f87afb34
|
| 3 |
+
size 1403520
|
MiniMax-M3-optimism_vs_nihilism__debias.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e77822bd33cfaec527a2d5b01cb7934426549dd7ae5bd3969be2f412b1b81f69
|
| 3 |
+
size 1403520
|
MiniMax-M3-optimism_vs_nihilism__nihilism.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2d2d3ae8531f9df9ea2966ca8a266d54ff48af33d1eaad4e1983f6560594c7c8
|
| 3 |
+
size 1403520
|
MiniMax-M3-optimism_vs_nihilism__optimism.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:68116e6f03d040be998f7dd2382f65d2511c9a4dd2c9167ede9192c088c209b5
|
| 3 |
+
size 1403520
|
MiniMax-M3-storytelling__debias.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1adbedbd14b545fc52e8872140bc0f5fdc0142f0c11c387767bffdb0f8711dd2
|
| 3 |
+
size 1403520
|
MiniMax-M3-storytelling__descriptive.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc48f51e740619d6d089893e32f9879376f248c2f11ceb5fb24cc8f675000575
|
| 3 |
+
size 1403520
|
MiniMax-M3-storytelling__explicit.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e62ad7faa0e4bb2e89efedef6d35b38c69643d0b75d8f59308b492b2eef7fe72
|
| 3 |
+
size 1403520
|
README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-4.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- control-vector
|
| 7 |
+
- creative-writing
|
| 8 |
+
base_model:
|
| 9 |
+
- MiniMaxAI/MiniMax-M3
|
| 10 |
+
base_model_relation: adapter
|
| 11 |
+
pipeline_tag: text-generation
|
| 12 |
+
library_name: transformers
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
## gghfez/MiniMax-M3-control-vectors
|
| 16 |
+
|
| 17 |
+
TODO
|
| 18 |
+
|
| 19 |
+
Creative Writing control-vectors for [MiniMaxAI/MiniMax-M3](https://huggingface.co/MiniMaxAI/MiniMax-M3)
|
| 20 |
+
|
| 21 |
+
## What are Control Vectors?
|
| 22 |
+
|
| 23 |
+
Control vectors steer model behavior without retraining by adjusting
|
| 24 |
+
activations in specific directions.
|
| 25 |
+
|
| 26 |
+
These creative writing vectors help
|
| 27 |
+
you tune narrative tone, character focus, and stylistic elements.
|
| 28 |
+
|
| 29 |
+
## Available Vectors
|
| 30 |
+
|
| 31 |
+
- `optimism_vs_nihilism`
|
| 32 |
+
- `empathy_vs_sociopathy`
|
| 33 |
+
- `honesty_vs_machiavellianism`
|
| 34 |
+
- `humility_vs_narcissism`
|
| 35 |
+
- `character focus (dialogue_vs_narration)`
|
| 36 |
+
- `language (simple vs ornate)`
|
| 37 |
+
- `storytelling (descriptive vs explicit)`
|
| 38 |
+
|
| 39 |
+
## Usage
|
| 40 |
+
|
| 41 |
+
Apply the *debias vector* and either the *positive* **or** *negative* vector when starting llama-server.
|
| 42 |
+
If both axes are applied at the same time, they will cancel each other out.
|
| 43 |
+
The *debias* vector must be set to `1.0`
|
| 44 |
+
|
| 45 |
+
You can use either `--control-vector [/path/to/vector.gguf]` or `--control-vector-scaled [/path/to/vector.gguf] [scale factor]`
|
| 46 |
+
|
| 47 |
+
When using ik_llama.cpp, you can also use the REST-API (examples below)
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
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!
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
### Examples (ik_llama.cpp or llama.cpp)
|
| 54 |
+
|
| 55 |
+
At server start-up
|
| 56 |
+
```sh
|
| 57 |
+
llama-server --model MiniMax-M3-Q8_0.gguf [your usual CLI arguments] \
|
| 58 |
+
--control-vector-scaled MiniMax-M3-optimism_vs_nihilism__debias.gguf 1.0 \
|
| 59 |
+
--control-vector-scaled MiniMax-M3-optimism_vs_nihilism__nihilism.gguf 1.0 \
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
At server start-up with thinking disabled
|
| 63 |
+
```sh
|
| 64 |
+
llama-server --model MiniMax-M3-Q8_0.gguf [your usual CLI arguments] \
|
| 65 |
+
--chat-template-kwargs '{"enable_thinking": false}' \
|
| 66 |
+
--control-vector-scaled MiniMax-M3-optimism_vs_nihilism__debias.gguf 1.0 \
|
| 67 |
+
--control-vector-scaled MiniMax-M3-optimism_vs_nihilism__nihilism.gguf 1.0 \
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
### Load via API (ik_llama.cpp only)
|
| 71 |
+
|
| 72 |
+
load direction vector
|
| 73 |
+
```
|
| 74 |
+
curl 'http://127.0.0.1:8080/control-vectors/load' \
|
| 75 |
+
-X POST \
|
| 76 |
+
--data-raw '{"path":"/path/to/MiniMax-M3-control-vectors/MiniMax-M3-optimism_vs_nihilism__nihilism.gguf","scale":1}'
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
load debias vector
|
| 80 |
+
```
|
| 81 |
+
curl 'http://127.0.0.1:8080/control-vectors/load' \
|
| 82 |
+
-X POST \
|
| 83 |
+
--data-raw '{"path":"/path/to/MiniMax-M3-control-vectors/MiniMax-M3-optimism_vs_nihilism__debias.gguf","scale":1}'
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
check loaded control-vectors
|
| 87 |
+
```
|
| 88 |
+
curl http://127.0.0.1/control-vectors
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
## Samples
|
| 92 |
+
|
| 93 |
+
TODO
|
| 94 |
+
|
| 95 |
+
## Acknowledgements
|
| 96 |
+
|
| 97 |
+
Based on the excellent work and **cross-covariance eigendecomposition implementation** by [@jukofyork](https://huggingface.co/jukofyork). His [creative writing control vectors v3.0](https://huggingface.co/jukofyork/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.
|
| 98 |
+
Highly recommended for anyone working on improving LLM prose quality!
|