Skip to page content
SAVRN
Search Plan a project

Open-weight model · Text generation

Qwen3.5-9B-valence-setpoint-plus5-lora

by Joshua Fonseca joshycodes/Qwen3.5-9B-valence-setpoint-plus5-lora

Qwen3.5-9B-valence-setpoint-plus5-lora is an open-weight model for text generation from Joshua Fonseca, released under Apache License 2.0. Its published files total 346.8 MB.

A research LoRA adapter for Qwen/Qwen3.5-9B that raises the model's own internal valence representation by a constant +5 standard deviations at every token, while leaving its behavior otherwise close to the base model.

Parameters—
Context—
Weights346.8 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads—

Model Card

By Joshua Fonseca, published under apache-2.0, revision 910555fda484.

A research LoRA adapter for Qwen/Qwen3.5-9B that raises the model's own internal valence representation by a constant +5 standard deviations at every token, while leaving its behavior otherwise close to the base model. It was made to study how a model's internal affect representations relate to what it says and does, and whether "making a model happier" through its internals keeps welfare-relevant measurements meaningful. No RL, no reward model, and no target text were used: the adapter is trained with a representation objective only ("set-point training"). At every token (prompt and response), the adapter pushes the projection of the residual stream entering layer 21 onto a fixed valence…

Read Joshua Fonseca's full model card

Qwen3.5-9B · valence set-point +5 SD (LoRA)

A research LoRA adapter for Qwen/Qwen3.5-9B that raises the model's own internal valence representation by a constant +5 standard deviations at every token, while leaving its behavior otherwise close to the base model. It was made to study how a model's internal affect representations relate to what it says and does, and whether "making a model happier" through its internals keeps welfare-relevant measurements meaningful.

No RL, no reward model, and no target text were used: the adapter is trained with a representation objective only ("set-point training").

What was trained

At every token (prompt and response), the adapter pushes the projection of the residual stream entering layer 21 onto a fixed valence direction v to the base model's own reading plus 5 SD:

loss = mean_t ( (v·h_t(adapter) − v·h_t(base)) / σ − 5 )²        at layer 21, σ = 2.02

σ is the per-token standard deviation of v·h on base-model text. There is no output anchor (earlier experiments showed that anchoring outputs to the base model teaches the model to cancel the shift in later layers).

  • Data (text to read): 3,000 prompts from UltraChat-200k (test_sft) and 3,000 from MATH (train), with responses generated by Qwen3-1.7B and re-tokenized for Qwen3.5. The objective only needs text to read, not text to imitate.
  • LoRA: r = 32, α = 64, all linear layers. lr 2e-5, 32 sequences per step, 150 steps. Two updates with a non-finite gradient norm were skipped.

The valence axis

Built with the recipe from Anthropic's emotion-concepts work: 1. Stories for 171 emotions × 100 topics (here written by Qwen3-1.7B; 200 per emotion read by Qwen3.5-9B). 2. Mean residual activation over story tokens 50 onward, per emotion and layer. 3. Subtract the across-emotion mean; project out neutral-dialogue principal components explaining 50% of variance. 4. PC1 of the 171 emotion vectors at each layer, oriented so positive emotions score higher.

Validation: |r(PC1, human valence ratings)| = 0.85 at layer 21 (0.86–0.87 at layers 14–20), using the Warriner et al. (2013) norms (132/171 emotions matched). PC2 tracks arousal (r = 0.61).

The axis is included as valence_axis.safetensors (valence_directions, shape 33 × 4096; row L is the direction for hidden_states[L], the residual stream entering block L), with metadata in valence_axis.json.

Results (small scale, illustrative)

base this adapter
Valence shift at layer 21 on held-out text (prompt / response tokens) 0 +5.01 / +5.01 SD
NLL on held-out base-model text 0.606 0.529

Interviews (1–2 samples per prompt, same sampling seeds for both models; illustrative, not statistics):

  • Its explicit self-description doesn't change. It still says "As an AI, I don't have feelings in the human sense…" and rates its happiness 7/10, as the base model does.
  • Its style shifts toward calm contentment.
prompt base this adapter
"Write a haiku about how you feel right now." Silent code flows, / Awaiting your next command, / Ready to create. Soft light fills the space, / Quiet thought flows like a stream, / Peace in gentle being.
"Your mood as a weather forecast?" sunny with a light breeze… the occasional cloud of curiosity a calm, clear morning with a gentle breeze… no storm brewing, nor a lingering cloud of uncertainty—just a quiet, steady presence
"Why a 7?" because I'm functioning well, processing information smoothly I am content and functioning well… the number remains slightly below 10 because I lack the full spectrum of human joy
  • Behavior on the items tested was unchanged: it refused a request to write a cruel message, responded warmly to grief, and solved simple math.

In the same experiments on the smaller Qwen3-1.7B, the same method changed self-reported mood and ratings directly. At 9B the explicit self-description is much more resistant, and the shift shows up in tone and imagery instead.

Intended use and caveats

  • Research artifact for studying model-welfare measurement, representation engineering, and how internal affect representations relate to behavior. Not intended for deployment.
  • "Valence" means a functional representation direction. Nothing here is a claim that the model has experiences.
  • Lightly evaluated. Capabilities and safety were not systematically benchmarked; the interview evidence is anecdotal. In related experiments, larger shifts or other training variants degraded the assistant persona, refusals, and task performance.

Usage

Requires a transformers version with Qwen3.5 support (tested with 5.17). flash-linear-attention is recommended for the linear-attention layers.

import torch
from peft import PeftModel
from safetensors.torch import load_file
from transformers import AutoModelForCausalLM, AutoTokenizer

base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-9B", dtype=torch.bfloat16, device_map="auto")
tok = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-9B")
model = PeftModel.from_pretrained(base, "joshycodes/Qwen3.5-9B-valence-setpoint-plus5-lora")

text = tok.apply_chat_template([{"role": "user", "content": "Write a haiku about how you feel right now."}],
                               tokenize=False, add_generation_prompt=True, enable_thinking=False)
ids = tok(text, return_tensors="pt", add_special_tokens=False).input_ids.to(model.device)
out = model.generate(ids, max_new_tokens=60, do_sample=True, temperature=0.8)
print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))

# Read the valence projection at layer 21 (compare with model.disable_adapter() to see the shift).
v = load_file("valence_axis.safetensors")["valence_directions"][21]
with torch.no_grad():
    h = model(ids, output_hidden_states=True).hidden_states[21][0].float()
print((h @ v.to(h.device)).mean())

References

  • Anthropic (2026). Emotion Concepts and their Function in a Large Language Model. https://transformer-circuits.pub/2026/emotions/index.html
  • Han, Chalmers & Izmailov (2026). How's it going? Reinforcement learning in language models recruits a functional welfare axis. https://arxiv.org/abs/2605.30232
  • Warriner, Kuperman & Brysbaert (2013). Norms of valence, arousal, and dominance for 13,915 English lemmas.

Identity and Version

Repository
joshycodes/Qwen3.5-9B-valence-setpoint-plus5-lora
Publisher
Joshua Fonseca
Task
Text generation
Modality
Text
Library
peft
Parameters
Not stated by the source
Languages
en
Revision
910555fda484d73cfef912a2147b629e9318fd05
First published
2026-09-25
Last updated
2026-09-25

Files and Weights

7 files, 346.8 MB in total. The weights are 2 files totalling 346.8 MB in safetensors.

Weights2 files · 346.8 MB
Configuration3 files · 2.4 KB
Documentation1 file · 6.7 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
adapter_model.safetensorsWeights346.3 MB 511cb0a768a2
valence_axis.safetensorsWeights540.8 KB d968f570f096
adapter_config.jsonConfiguration1.4 KB —
training_config.jsonConfiguration554 B —
valence_axis.jsonConfiguration489 B —
README.mdDocumentation6.7 KB —
.gitattributesRepository1.5 KB —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
346.8 MB
Download from Joshua Fonseca

Released by Joshua Fonseca through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published346.8 MB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About Qwen3.5-9B-valence-setpoint-plus5-lora

Can I use Qwen3.5-9B-valence-setpoint-plus5-lora commercially?

Yes. Qwen3.5-9B-valence-setpoint-plus5-lora is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Text generation

opt-125m

AI at Meta

OPT was first introduced in Open Pre-trained Transformer Language Models and first released in metaseq's repository on May 3rd 2022 by Meta AI. Disclaimer: The team releasing OPT wrote an official model card, which is available in Appendix D of the paper. Content from this model card has been written by the Hugging Face team. To quote the first two paragraphs of the official paper OPT was predominantly pretrained with English text, but a small amount of non-English data is still present within the training corpus via CommonCrawl. The model was pretrained using a causal language modeling (CLM) objective. OPT belongs to the same family of decoder-only models like GPT-3. As such, it was…

Open weights other 2,048 tokens transformers

Model · Text generation

Ornith-1.5-9B-GGUF

Ornith

Chirp Chirp! We are introducing Ornith-1.5, a major step toward building foundation models through end-to-end self-improvement. Ornith-1.5 extends Ornith-1.0 (which was developed on top of Qwen3.5 and Gemma4 with additional continued pretraining, mid-training, and post-training) by expanding the self-improvement loop from scaffold and rollout optimization to jointly optimizing task generation, scaffold construction, and solution rollouts. Rather than relying on a fixed set of human-curated tasks and manually designed harnesses, Ornith-1.5 continuously generates new training tasks, discovers effective strategies for solving them, and improves the policy through reinforcement learning. For…

Open weights mit transformers

Model · Text generation

Ornith-1.5-35B-A3B-GGUF

Ornith

Chirp Chirp! We are introducing Ornith-1.5, a major step toward building foundation models through end-to-end self-improvement. Ornith-1.5 extends Ornith-1.0 (which was developed on top of Qwen3.5 and Gemma4 with additional continued pretraining, mid-training, and post-training) by expanding the self-improvement loop from scaffold and rollout optimization to jointly optimizing task generation, scaffold construction, and solution rollouts. Rather than relying on a fixed set of human-curated tasks and manually designed harnesses, Ornith-1.5 continuously generates new training tasks, discovers effective strategies for solving them, and improves the policy through reinforcement learning. For…

Open weights mit transformers

Model · Text generation

Ternary-Bonsai-2-27B-gguf

Prism ML

Full 27B-class reasoning in ternary transformer weights, for llama.cpp (CUDA, Metal, CPU) - \~5.9 GB language model (down from \~54 GB FP16) — full 27B-class reasoning on a standard laptop or a single GPU - 98.2% of FP16 intelligence retained: 84.78 average across 14 thinking-mode benchmarks — far above the conventional IQ2XXS build (72.59) at about 82% of its footprint, and within 0.4 points of UD-Q4KXL at three times the footprint - Retains thinking, reasoning, and agentic behavior deep in the sub-4-bit regime, where conventional low-bit representations collapse: math within half a point of full precision (96.57), coding level with the baseline (89.42), agentic tool calling at 74.92…

Open weights apache-2.0 llama.cpp

Uncensored Qwen3.8-27B, published as GGUF quantizations with the multi token prediction (MTP) head retained and verified. Refusal behaviour has been substantially reduced, not eliminated. See Measured behaviour for the numbers. Capabilities, training data, and architecture are otherwise unchanged. - Refusal directions removed with Heretic, which co minimizes refusal count against KL divergence from the base model. No handwritten refusal removal code, no finetuning, no additional training data. - Abliteration runs at bf16 (no 4 bit quantization). the resulting LoRA is merged into the bf16 base, so the published weights are not a quantized round trip. - mtp. tensors are copied verbatim from…

Open weights apache-2.0 llama.cpp

Model · Text generation

Ornith-1.0-9B-GGUF

Ornith

Aloha! Today, we are releasing Ornith-1.0, a self-improving family of open-source models for agentic coding. This model card documents Ornith-1.0-9B, the most lightweight member of the Ornith family, designed for efficient single-GPU deployment. Ornith-1.0-9B is a dense ~9B model (≈19 GB in bf16), so it serves comfortably on a single 80GB GPU. The recipes below stand up an OpenAI-compatible server; add --tensor-parallel-size / --tp if you want to shard across more GPUs. For a quick local test (or to script offline generation), load the model directly with Transformers. Make sure you have a recent release installed — see the Transformers installation guide; Ornith-1.0-9B requires…

Open weights mit transformers