Instructions to use MaxW3n/capri-steering with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use MaxW3n/capri-steering with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download MaxW3n/capri-steering --local-dir capri-steering
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
|
Download README.md from MaxW3n/capri-steering: direct link, hf CLI and curl.
- Browser
- Download file 3.36 kB
-
https://huggingface.co/MaxW3n/capri-steering/resolve/main/README.md
- Command line
-
hf download hf://MaxW3n/capri-steering/README.md
-
curl -L -o README.md https://huggingface.co/MaxW3n/capri-steering/resolve/main/README.md
3.36 kB
| license: apache-2.0 | |
| base_model: mlx-community/Qwen3.8-27B-4bit | |
| library_name: mlx | |
| tags: | |
| - steering-vector | |
| - activation-steering | |
| - character | |
| - mlx | |
| # Capri steering vector | |
| One vector of 5,120 numbers that turns stock Qwen3.8-27B into Capri, a fan take on a character from an animated | |
| series: short, blunt, playful, a little mean. There's no system prompt and no fine-tuned weights. During every reply, | |
| the vector is added to the model's hidden state after layer 20: | |
| ``` | |
| h = layer20(x) | |
| h = h + 0.74 * capri_vector | |
| ``` | |
| Everything else is the unchanged base model. | |
| ## Files | |
| | File | What it is | | |
| |---|---| | |
| | `capri.safetensors` | the vector (`layer20`, 5,120 floats, already scaled to the typical size of layer 20's hidden state) | | |
| | `capri_chat.py` | terminal chat: loads the base model, attaches the vector, adds two small generation fixes | | |
| ## Run it | |
| **Mac only.** `capri_chat.py` uses MLX, Apple's machine-learning library, which runs only on Apple Silicon; it needs | |
| about 20 GB of free memory. The vector itself is just 5,120 numbers, so it could in principle be added to layer 20 of | |
| Qwen3.8-27B in PyTorch, but that's untested and the right dose may differ on the full-precision model. | |
| For the full 3D chat (a neon rooftop, poses, speech bubble), see [github.com/MaxW3n/capri](https://github.com/MaxW3n/capri). | |
| ```bash | |
| pip install mlx-lm safetensors huggingface_hub | |
| python capri_chat.py # dose 0.74, the default | |
| python capri_chat.py --dose 0.5 # milder voice | |
| ``` | |
| The first run downloads the base model (about 15 GB). | |
| ## Examples | |
| Single questions, dose 0.74: | |
| > **How far away is the moon?** 路 Close enough to see craters, really! About 384,000 kilometers. | |
| > **whats the trick to folding a fitted sheet** 路 Corner in corner, edge to edge, then flip it! | |
| > **Settle it once and for all: toilet paper over or under?** 路 Over. No debates! | |
| > **Would you rather live without cheese or without chocolate?** 路 Cheese! Chocolate's just candy. | |
| ## How it was trained | |
| The vector was the only trainable parameter. It was trained by gradient descent on the cross-entropy of short replies | |
| written in her voice, in three stages warm-started from each other: everyday questions; the same plus identity | |
| questions; then multi-turn conversations, including pushback like "ur not capri?". Context tokens were run through | |
| the model without gradient, and the loss covered reply tokens only. Each stage kept the epoch with the lowest | |
| validation loss. | |
| ## What's wrong with it | |
| - **She doesn't reliably know her name.** Asked who she is with no other context, she says "Capri" about 35% of the | |
| time, and far less mid-conversation. More often she dodges ("You're who, anyway?"). | |
| - **The base model's identity leaks.** About 1% of identity answers say "Qwen". `capri_chat.py` hides this by moving the | |
| probability of the "Q" token onto "Cap" and forcing "ri" next, and by blocking "Alibaba". It's a stopgap: the | |
| vector itself hasn't learned this. | |
| - **Farewell loops.** Once she has said "Bye" in a conversation, about 10% of her later replies are goodbyes too, up | |
| from 1%. A dose of 0.5 cuts that to 3%. | |
| - **Wrong facts.** Judges marked about 8% of answers on a 60-question test as wrong. | |
| ## Notes | |
| This is an unofficial fan project, not affiliated with the creators of the character. The base model is Qwen's, | |
| under Apache 2.0. | |