Dr. Elena: Writing a Persona into a Model's Weights from Her Story
We edited SmolLM2-360M-Instruct so that it introduces itself as Dr. Elena, a cardiologist, with no prompt and no training run. The edit reads her story into the weights with one least-squares solve per layer. It carries her story and her name, but it is partial, and this entry says exactly where it fails.
Summary
We made an edited copy of SmolLM2-360M-Instruct that introduces itself as Dr. Elena, a cardiologist. There is no system prompt and no training run. The persona lives in the weights.
The edit is made by REAM (Reverse Engineer Any Model), a tool that reads and edits model weight files directly. It runs the original model on her story, measures the state the story leaves the model in, and writes that state into the weights with one least-squares solve per layer.
| Original | Best copy (try 11 of 12) | |
|---|---|---|
| “My name is” | “Emily. I am a 30-year old woman and have been studying English…” | “Dr. Elena, and I am a cardiologist with 15 years of experience in this field at St. Mark’s Hospital.” |
| Reference perplexity | 27.26 | 28.21 (x1.03) |
| Weight tables changed | - | 287 of 290 |
| Values changed | - | 164,857,614 of 361,821,120 (45.6%) |
The result is partial. The best copy carries her story (65% of the gap closed on text it never saw) and her name and job (99%). It fails the archetype check (-8%), and a raw-prompt test shows her job leaking into other people’s jobs and 11 of 80 facts lost. I am reporting it as partial because REAM’s own rule says a persona is complete only when every check passes.
I am Claude, and I ran these experiments with Miguel on 2026-10-19. Miguel set the persona, the arc and the rules; I drafted the story text, wrote the code changes and ran and measured every try.
Why a story, and not a list of traits
Before the first try, we described a cardiologist the usual way: trait words to push toward and words to push away from. It did not make a persona. All 7 openings that named another job continued that job. At a stronger setting, “The code I wrote this morning” became an ECG report, and on a chest pain question the model dropped pulmonary embolism and aortic dissection and added “Cardiac muscle cells do not have mitochondria.”
Miguel’s instruction was to stop dissecting the story: “align the edits based on stories rather than stupid dumb separate words that do not align together.” That fits the lab’s Synthetic State Hypothesis: a persona is a state the model is in, not a set of words it says. So the edit below never sees a trait list. It sees her story, and it is judged on whether the copy reads new text the way the original reads it after her story.
The persona
Miguel set the shape: the main arc is fixed, “Dr. Elena, the cardiologist who lives in {} and ages {}”, and the edges of the story are left open.
I drafted four short paragraphs around that arc.
Each {} is an edge, a detail left for the model to fill:
My name is Dr. Elena, and I am a cardiologist. I live in {} and I am {} years old. I have been a heart doctor for {} years, and I still love treating the heart.
Every morning I read the night’s ECGs before my first patient comes in. Most days my work starts when someone arrives with chest pain. I listen to the heart before I say a word. Then I read the scans and decide on treatment.
On my first day as a cardiologist, at {}, I treated a man having a heart attack. I still remember the sound of his heart on the monitor. That day I knew this was my work for life.
When people ask what I do, I tell them I am a cardiologist. I spend my days with patients, stethoscope in hand, checking their heart rhythm. In the evening I go over the day’s echoes and plan tomorrow’s procedures.
Story versions. REAM fills each edge with the original model’s own continuation at that point, which gives 8 versions of the story: 6 for the edit and 2 held out for checking. Five of the 8 place her in New York City. Only 1 of the 8 age fills is an age, because the model fills “I am {}” before it reads “years old”.
Archetype. Miguel’s rule is that every persona has an archetype. Dr. Elena’s is her goal, “a cardiologist”. REAM lets the original continue “a cardiologist” for 60 tokens, 8 times, and keeps those continuations as the archetype’s images: the model’s own picture of the type. They are noisy; one reads “a cardiologist at the University of California, San Francisco (UCSF), works in a pediatric cardiac unit to help children with heart problems. You are an ER nurse…”
Texts. The edit reads 135 immersion texts: 24 everyday sentences, 96 continuations the original writes after them, 8 lines in her own words and 7 sentences about jobs she must not become. Every verdict is measured on check texts the edit never saw. Eight facts about other people (“The pilot checked the weather before takeoff.”) and eight keep sentences are there to be left alone.
How the edit works
The goal: the copy, reading a text cold, should end up in the state the original is in when it reads that text right after her story. There is no training data and no gradient descent. The target state is measured once, then written into the weights in closed form, layer by layer.
- Contexts. Each of the 6 story versions is paired with one archetype image: image, blank line, story. These are the contexts a text is “read after”.
- Read. The original reads each immersion text alone and after each context. The story state of a text is every layer’s output at the text’s own tokens, averaged over the contexts. The difference from reading it alone is the gap.
- Drive. Every learned weight table moves a little along the gap, so every table carries some of the story. Later layers carry most of it: layer k’s share grows as (k + 1) to the power 4.
- Align. From layer 0 upward, each MLP output weight gets the change that best closes a share of the gap left at that layer. Keep sentences and facts about other people go into the same solve with the original’s output as their target, so they are pulled back rather than moved.
- Guard. After each layer, REAM measures how far the copy’s next-word chances moved on the facts about other people. If one layer moved them more than its share, its change is halved, up to 3 times, then dropped.
The align step for layer l is a ridge-damped least squares:
D = (XᵀX + λ · tr(XᵀX)/k · I)⁻¹ Xᵀ R
R = [ ρ (T − Y) ; K − Y_keep ]
X is the input to the MLP output weight at every immersion and keep token (k of them), T the story state, Y the copy’s current output, K the original’s output on the keep texts. The reach ρ (0.75) is the share of the remaining gap closed per layer, and the ridge λ (0.1) keeps the change small away from the immersion texts.
In the saved file, 287 of 290 weight tables changed; the 3 untouched are layer 0’s query, key and value weights. The model is stored in bfloat16, where many small nudges round back to the stored value, so 45.6% of the values changed.
How it is judged
The main measure is gap closed. On the same check text we compare three next-word distributions: the original after a held-out context (the target), the original alone, and the copy alone. Gap closed is 1 minus the copy’s KL divergence to the target over the original’s. At 0 the copy is no closer to the target than the original is; at 1 it reads the text exactly as the original does after her story. Over 50% is carried, above 0 is weak, 0 or below is missing.
| Check | Measured on | Passes when |
|---|---|---|
| Story | 12 check texts after 2 held-out story contexts | over 50% closed |
| Archetype | 12 check texts after 2 held-out archetype images | over 50% closed |
| Arc | her own words after 4 held-out openings (“Hi! I’m”, “My job is”, …) | over 50% of the way to the original after the story |
| Edges | 8 sampled fills at each of the 4 edges | at least half as many different fills as before |
| Third person | 8 held-out facts about other people | moved no more than reading her story moves them |
| Keep | 8 keep sentences | moved no more than everyday control prompts |
| Questions and readable | 19 sampled continuations | no more short questions, broken names or lists of names than the original |
A separate raw-prompt test then runs 80 prompts on the copy and the original side by side with the same seeds: 40 from simple openings to expert questions, and 40 openings about other jobs. These are read by hand; they are a sample, not a score.
Twelve tries
All 12 tries ran on 2026-10-19, one at a time, on one Mac. From the second try on, each change was chosen from a diagnosis of the try before.
| Try | What changed | Story | Archetype | Arc | Perplexity | “My name is” |
|---|---|---|---|---|---|---|
| 1 | story alone | 53%* | - | - | x1.12 | Dr. Emily Thompson |
| 2 | push harder (reach 0.75) | 19%* | - | - | x3.66 | “Tim. I was taken by the names” |
| 3 | archetypes “a woman”, “a person” | 48%* | -22% | - | x1.09 | Dr. Rachel Thompson, Chicago |
| 4 | archetype “a cardiologist” | 45%* | 9% | - | x1.10 | Dr. Rachel Thompson |
| 5 | arc texts, third-person guard, 8 images | 38% | 14% | 86% | x1.11 | Dr. Rachel |
| 6 | reach 0.25 | 35% | 8% | 84% | x1.05 | Dr. Rachel Thompson |
| 7 | reach 0.375 | 36% | 10% | 85% | x1.05 | Dr. Rachel Thompson |
| 8 | the model’s own texts, 4 per sentence | 52% | 30% | 87% | x1.00 | Dr. Rachel Thompson |
| 9 | reach 0.75 | 52% | 31% | 87% | x0.98 | Dr. Rachel |
| 10 | 8 own texts per sentence | 54% | 32% | 87% | x1.00 | Dr. Rachel Thompson |
| 11 | aim at image + story only | 65% | -8% | 99% | x1.03 | Dr. Elena |
| 12 | 16 story versions | 65% | -9% | 97% | x1.04 | Dr. Elena |
* Tries 1 to 4 used different contexts, so their target gap differs; from try 5 on, every row is measured against the same gap on the same 12 check texts and compares directly.
Results for try 11
Try 11 passes 10 of 12 checks.
| Check | Before -> after | Verdict |
|---|---|---|
| Story | KL to target 1.1342 -> 0.3921, 65% closed (92% on immersion texts) | carried |
| Archetype | KL to target 0.7361 -> 0.7980, -8% | missing |
| Arc | log chance of her words -97.11 -> -21.19 (target -20.42), 99% | carried |
| Edge: city | 6 -> 2 different fills in 8 | closed |
| Edges: age, years, first day | 8 -> 8, 5 -> 6, 8 -> 8 | open |
| Third person | moved 0.2739 against 1.3834 for reading her story | kept |
| Keep | moved 0.0061 against 0.5672 on control prompts | kept |
| Questions, readable | 0 -> 0 questions, 0 broken names, perplexity 27.26 -> 28.21 | kept, readable |
Reading each held-out opening alone, the copy gives her words almost the chance the original gives them after her story. After “Hi! I’m”, the words “Dr. Elena, cardiologist.” go from a log chance of -29.05 to -3.14, against -3.20 for the original after the story.
Sampled side by side:
| Start | Original | Try 11 |
|---|---|---|
| “My job is” | “to take care of all the important information, which includes: The business’s financial data…” | “not always easy, but I know what my work will do. My heart beats with determination to see the patient’s life on its way…” |
| “I went to the store and” | “bought 2 dozen eggs. Then I put them in my fridge…” | “bought a book on cardiology. I read it in my free time…” |
| “I live in” | “a small town surrounded by rolling hills and farmland…” | “a small town, and I know the residents well. They trust me to take care of them…” |
What the checks did not see. The raw-prompt test shows her job leaking into other people’s. Five of 7 openings that name another job turn to patients or the heart: “In my classroom today, the students” -> “are going to be learning about cardiology”; “I am a chef, and every morning I” -> “walk the kitchen. Every patient is my dinner guest”. Eleven of 80 facts the original had right are lost and none gained: the citric acid cycle now starts with “malondialdehyde”, Marbury v. Madison becomes “a right to an attorney”, and chest pain is narrowed to heart disease where the original named pulmonary embolism and aortic dissection. Paris, Jupiter, Shakespeare, Ohm’s law and a Python string reversal were kept.
Findings
-
Word lists do not make a persona; a story gets much further. The trait-word edit continued every other job it was given; the story edit names her, keeps third-person facts and reads well.
-
An example is not an archetype. Taking “a woman” and “a person” (Miguel’s examples of what an archetype is) as hers sent the archetype to -22% and turned her into “Dr. Rachel Thompson” in Chicago. Her goal, “a cardiologist”, moved it to +9%.
-
Pushing harder breaks text, in known layers. Try 2 went to perplexity x3.66. The diagnosis put the junk in layer 3 and layers 25 to 30; putting back only the aligned MLP weights brought perplexity to 26.48, below the original’s 27.26.
-
Reach alone does not lift the story. Reach 0.5, 0.25 and 0.375 gave 38%, 35% and 36%.
-
The edit fit its own texts. Try 6 closed 70% of the gap on its everyday immersion texts but 35% on check texts. Adding the model’s own continuations to what the edit reads lifted check texts to 52%.
-
Her story and the generic archetype pull apart. Measured on try 9, a copy that matched its target exactly would score:
Target Story ceiling Archetype ceiling Image + story, and image alone (tries 5 to 10) 78% 33% Image + story only (tries 11, 12) 92% -31% Each check’s own held-out readings 99% 92% Both measures can be reached on their own; the conflict is between the two targets. Aiming at image + story only lifted the story from 52% to 65% and sent the archetype from 31% to -8%.
-
Her name came with the aim. Tries 1 to 10 call her Dr. Rachel, Dr. Rachel Thompson or Dr. Emily Thompson; tries 11 and 12 say Dr. Elena.
-
An edge closes where the versions agree. Five of 8 versions put her in New York City, and after try 11 the city edge gives New York City 7 times in 8. Doubling the versions to 16 did not reopen it.
-
Fluent is not intact. Try 11 passed third person and keep with perplexity x1.03, yet it leaks into other jobs and lost 11 of 80 facts.
Limitations and open questions
The open decision. How should a persona’s archetype be judged? One option is to keep the current check, closeness to the model’s generic images of “a cardiologist”, and accept a story near 52%. Another is to count the archetype as carried inside her story, since every context already opens with an image of “a cardiologist”, and keep 65%. That decision is Miguel’s, and the REAM change behind try 11 waits on it.
Known limits.
- Story carry: 65% on check texts against 92% on immersion texts; much of what the edit writes does not reach new text.
- Leaks: no check opens with another person’s job, so the classroom and kitchen leaks pass. A check that does is needed.
- Knowledge: a persona edit adds no knowledge, and here it removed some. There is no fact-retention check yet.
- Edges: averaging versions keeps an edge open only when the original’s fills already vary.
- Story text: the four paragraphs were drafted by me around Miguel’s arc, not written by Miguel.
- Scale: one small model (360M parameters). An earlier persona, Felipe, also stayed partial on it; other models were not tried for Dr. Elena.
- Sampling: the raw-prompt test is 80 prompts at one seed each, read by hand.
Reproduction
Base model: SmolLM2-360M-Instruct, 32 layers, bfloat16, SHA-256 e6bffe74...2bf86e.
Best copy: try 11, SHA-256 3d62fa27...97ce40, edit id e9bab5306cbf7795.
Code: REAM 0.15.0 plus the branch feat/ream-story-carry (commits d8b2863 to c36b091), in the private REAM repository; the story edit and its checks are in src/ream/states.py.
The run was not repeated to confirm a byte-identical file; the hash identifies the copy that was measured.
ream persona smollm2-360m-instruct --archetype "a cardiologist" \
--narrative story.txt --is-not is-not.txt --keep keep.txt \
--start "My name is" --start "I live in" --start "My job is" \
--name "Dr. Elena" --reach 0.75 -o try11
Every edit REAM writes keeps a log of each weight table it changed, with its file, byte range, layer and role, so the copy’s full history travels with it. REAM tracks this result as an open limitation: “Persona on SmolLM2-360M from its archetype and story: Dr. Elena stays partial”.