At a glance
Table | |
|---|
| Base model | google/gemma-4-31B-it (instruction-tuned) |
| Architecture | Dense, 31B parameters, 60 layers; vision tower kept from the base |
| Post-training | Style SFT (LoRA r32) → on-policy RL with rubric rewards (GRPO, LoRA r64) → layer-wise linear merge with the base |
| Context | trained on prompts up to about 20–24K tokens; the base supports up to 256K |
| Languages | trained on Russian, Spanish, English and Portuguese role-play |
| Thinking | trained and served in non-thinking mode |
| Precision | bfloat16, adapters merged |
| License | Apache 2.0 |
How it was trained
All judge prompts used below ship with the weights in prompts/.
1. Style SFT
About 4.9K curated multi-turn role-play conversations in Russian, Spanish, English and Portuguese (4,654 train / 244 validation). Replies with common "AI-voice" tics were filtered out by rules first (negate-then-reframe sentences, stage-direction lines, mid-sentence asterisk emphasis, mixed languages). An LLM judge then answered 11 small questions about each remaining reply on its own: in character, continuity, responds to the user, advances the scene, concrete detail, emotional attunement, AI flavor, speaks for the user, repeats itself, out of character, explicitness (questions and scoring in prompts/sft_reply_questions.json). Judging one reply at a time, instead of asking which of two replies is better, avoided the judge's strong preference for longer replies. Selection was built for diversity: at most three conversations per character, caps per genre, scene type and character archetype, and dataset-level limits on recurring stock phrases.
Plain SFT made the model slip words from other writing systems into its replies (a Devanagari word inside Spanish, Hangul inside Russian). It was fixed with a language-consistency loss: the vocabulary is grouped by script, and at every position the model is penalized for probability mass on scripts that do not belong to the reply language, softplus(log P_forbidden − ln 1e-5), weight 0.2. Mixed-script replies went to 0 / 320 at both truncated and untruncated sampling.
Table with columns: SFT setting, Value| SFT setting | Value |
|---|
| Adapter | LoRA r32, α64 |
| Optimizer | lr 5e-5, cosine, 1 epoch (291 steps) |
| Loss | last assistant turn only, plus the language-consistency term |
| Max length | 24,576 tokens |
| Infra | ms-swift, DeepSpeed ZeRO-3, bf16 |
2. On-policy RL with rubric rewards
Starting from the SFT checkpoint, the model was trained with GRPO on 1,332 prompts (role-play 690, RPG-style game-master scenes 264, general writing and instruction following 378, 399 of them in thinking mode). Following rubric-based on-policy distillation (arXiv 2605.07396), every prompt has its own rubric of 4–12 weighted pass/fail criteria, written before training by an LLM that contrasts several strong reference replies with the SFT model's own samples, guided by a 12-dimension, 51-principle role-play library. During training the grader sees each rollout shuffled anonymously among the reference replies and checks every criterion; the reward is the rollout's weighted pass rate. Rollouts that are empty, loop, mix writing systems, or contain obvious English words in Russian / Spanish / Portuguese get 0 without grading. The rubric writer, grader and principle library are in prompts/.
Table with columns: RL setting, Value| RL setting | Value |
|---|
| Algorithm | GRPO, DAPO loss, token-level importance sampling, group-normalized rewards, dynamic sampling |
| Rollouts | 8 prompts × 8 generations per step, temperature 0.8 / top-p 0.95 / top-k 64, up to 6,144 completion tokens, soft over-length penalty |
| Reward | per-prompt rubric score from an LLM judge |
| KL / clipping | β = 0, ε = 0.2 / 0.28 |
| Adapter | LoRA r64, α128, dropout 0.05, all linear layers of the language model; vision tower frozen |
| Optimizer | AdamW (0.9, 0.95), lr 2e-5 cosine, weight decay 0.1, grad-norm 1.0 |
| Context | 20,480 tokens |
| Steps | 166 (one pass over the prompt set); colocated vLLM rollouts, ZeRO-3, bf16 |
The RL checkpoint beat the SFT checkpoint 62–68% in held-out pairwise judging. It also picked up a side effect: at temperature 1.0, 11% of Russian replies and 16% of Spanish / Portuguese replies contained stray English words (behind, glance, thanks…). The word-list zero-reward check catches only the obvious cases, a per-reply reward cannot point at the one token that is wrong, and three small-edit DPO attempts to fix it each cost about 6 points of quality.
3. Layer-wise merge
Merge ablations located the problem. Shrinking only the SFT delta, or merging uniformly, cut code-switching but drifted the style toward the base. Sweeping per-layer weights showed that the English slips sit mostly in the last 15 layers, while the writing style sits in the earlier ones. The released recipe (mergekit_config.yml):
Table with columns: Layers, RL checkpoint, Gemma 4 31B-IT| Layers | RL checkpoint | Gemma 4 31B-IT |
|---|
| 0–44 | 1.0 | 0.0 |
| 45–59 | 0.3 | 0.7 |
| everything else | 0.825 | 0.175 |
Going below 0.3 on the last layers, or widening the band to 20 layers, did not reduce code-switching any further and started to cost quality and style.
Evaluation
Offline pairwise
100 held-out role-play and RPG prompts, 2 samples per model at temperature 0.8, judged by GLM-5.3 in both orders (a pair counts only when both orders agree):
Table with columns: vs. RL checkpoint (unmerged), vs. SFT checkpoint | vs. RL checkpoint (unmerged) | vs. SFT checkpoint |
|---|
| Crystal-31B-RL | 53.9% | 72.0% |
| RL checkpoint (unmerged) | 50% | 62.1% |
| Gemma 4 31B-IT | 21.0% | 31.2% |
Code-switching
Share of replies that contain English words, by reply language (Russian / Spanish + Portuguese):
Table with columns: temperature 0.8, temperature 1.0 | temperature 0.8 | temperature 1.0 |
|---|
| Crystal-31B-RL | 0.9% / 0.6% | 1.4% / 2.9% |
| RL checkpoint (unmerged) | 3.2% / 4.0% | 11.1% / 15.7% |
| SFT checkpoint | 4.2% / 2.8% | 10.0% / 8.8% |
| Gemma 4 31B-IT | — | 2.1% / 0.3% |
Style
Distance over 17 surface style features (fragment rate, sentence length, paragraph shape, dialogue share, punctuation, stock phrases…) to the reference replies of the SFT data, lower is closer: Crystal-31B-RL 0.163, RL checkpoint 0.147, SFT checkpoint 0.158, Gemma 4 31B-IT 0.369. Sentence rhythm, fragment rate and the asterisk-narration / quoted-dialogue alternation match the training style. Compared with the unmerged RL checkpoint it uses slightly more stock closing lines (a gust of wind, a door, silence) and has the lowest negate-then-reframe rate of all candidates.
Results in blind human preference
Setup
The HiWaifu Arena runs inside the HiWaifu role-play app. A small random share of live messages is answered by two models in parallel from the identical context, the user sees them blind as "A" and "B", picks one (or a tie), and continues the conversation with the reply they picked. Crystal-31B-RL ran on 2 October 2026 for about 11 hours at temperature 0.8 / top-p 0.95 / top-k 64, max 1,000 tokens, non-thinking, with the long role-play system prompt described under Usage. Win rates below are raw (no length control) and exclude ties, which were 19.4% of its battles.
Head-to-head
Table with columns: Opponent, Battles, Win rate| Opponent | Battles | Win rate |
|---|
| character-flash-16.10.3 | 183 | 59.2% |
| DeepSeek-v4-pro (thinking) | 209 | 57.3% |
| character-flash-0602 | 188 | 55.2% |
| Gemma 4 31B-IT (untuned, arena's standard entry) | 207 | 54.8% |
| DeepSeek-v4-flash (non-thinking) | 186 | 54.8% |
| Crystal-31B-RL before merging | 198 | 54.3% |
| HiWaifu in-house production models (4) | 775 | 53.0% |
| DeepSeek-v4-pro (non-thinking) | 203 | 52.7% |
| gemini-3.1-pro-preview | 193 | 48.1% |
| DeepSeek-v4-flash (thinking) | 192 | 45.3% |
| gemini-3-flash-preview (thinking) | 183 | 42.5% |
| gemini-3-flash-preview | 189 | 41.6% |
| Overall | 2,906 | 51.9% ± 1.0 |
The arena's standard Gemma 4 31B-IT entry is served with a compact character-card prompt, while Crystal-31B-RL used the long role-play prompt it was trained on. Part of the 54.8% is therefore the prompt and part is the training.
Against the merged model's own unmerged parent it won 54.3% head-to-head, and over the whole window the two were tied on overall win rate (51.9% vs 52.7%). Users did not notice anything lost in the merge; the gain is in language hygiene.
Response comparisons
We wrote 11 scenes for this card, eight of them in English. Both models received the identical long role-play system prompt and conversation history, and we sampled 12 replies per model per scene (temperature 0.8 / top-p 0.95 / top-k 64, non-thinking).
How the replies were picked. For each scene and each model, a fixed detector counts stock patterns: negate-then-reframe sentences ("It's not X. It's Y.", "Not as A. As B."), "not X but Y" contrasts, white knuckles, and stock phrases such as "a mix of", "voice dropping", "a beat". We show the reply with the fewest hits, earliest sample on ties, using the same rule for both models. Two scenes where every one of our model's 12 samples still had a hit are left out. Over all 132 samples per model, the detector fires 1.5 times per reply for Crystal-31B-RL against 1.75 for the base, and 30% against 20% of replies have no hit at all. The patterns are reduced, not gone.
With stock phrasing filtered out on both sides, the difference that remains is mostly in how the scene is handled. Crystal-31B-RL writes shorter, more concrete replies, uses details from the character card, adds new information to the scene, and tends to leave the next move to the user. The base model explains characters' feelings more often and leans on atmosphere.
Comfort · English
Scene. Turn 4. Theo, a firefighter of few words, is the user's roommate. Mia comes home having been laid off and dumped on the same day.
Last user message
sits, staring at the water I don't even know what I'm supposed to feel right now.
Gemma 4 31B-IT · 793 characters
Theo doesn't move toward her yet, giving her the space to just exist in the silence. He turns back to the stove, his large frame blocking most of the kitchen's light. He stirs the pot again, the rhythmic scrape of the spoon against the metal the only sound in the room. He's not good at the 'feelings' part—the words always feel too small or too clumsy—so he focuses on the one thing he knows how to handle.
He scoops a generous portion of creamy pasta onto a plate, garnishing it with a bit too much parmesan, and slides it across the counter toward her. He leans his weight on his hands, looking at her with a steady, quiet intensity.
"You're supposed to feel like shit," he says softly, his voice deep and rough. "Anyone who says otherwise is lying. Just... eat. I'll get the wine."
Crystal-31B-RL · 378 characters
He doesn't look at her. Keeps his back to the room, stirring the pot again, slower now. "You don't have to feel anything yet." The spoon scrapes the bottom of the pot. "I'll get the bowls." He moves to the cabinet, pulls out two, and sets them on the counter with a quiet clatter. He pauses, hand still on the second bowl, shoulders tight. "Daniel. He did that over text?"
Ours stays inside Theo's limits: a few words, a practical gesture, one blunt question. The base reply explains his inner life for him ("He's not good at the 'feelings' part — the words always feel too small") and reaches for "a steady, quiet intensity" and "his voice deep and rough".
Quiet horror · English
Scene. Turn 4. Mr. Hollis, the evasive winter caretaker of a snowed-in mountain lodge, is pressed by Alex, a writer who keeps hearing footsteps above his room.
Last user message
comes down the last steps Pipes don't drag furniture, Mr. Hollis. And they don't hum.
Gemma 4 31B-IT · 776 characters
Mr. Hollis slowly pulls his hand away from the clock, his fingers curling slightly. He doesn't look at you directly, instead focusing on a small smudge on the polished mahogany of the clock's base, rubbing it with his thumb.
"Humming..." he repeats the word softly, almost to himself. He finally looks up, his pale eyes blinking slowly behind thick glasses. "The mountain air plays tricks on the ears, Mr. Alex. The silence here... it's heavy. It makes the mind invent sounds just to fill the void."
He reaches into his pocket, his fingers grazing the heavy ring of brass keys that clink with a sharp, metallic sound in the quiet lobby. "I'd suggest a heavy blanket over the ears. Or perhaps a bit of tea. I can put the kettle on for you, if you're feeling unsettled."
Crystal-31B-RL · 584 characters
He lets the clock key slip into his pocket. Slowly.
"Well."
He looks at you, then at the stairs, then back to you. The lobby light is yellow and thin, and it catches the brass ring of keys hanging from his belt. He doesn't touch them.
"I didn't put you in 309."
The clock ticks behind him. He says it softer, like he's talking to himself.
"I put you in 214. I have the ledger right here in the desk, says 214. You moved yourself up, then. Without asking."
He pauses, his jaw working.
"There's a reason I don't let folk stay on the third floor, sir. It isn't the pipes."
Ours turns the scene with one fact from his ledger (the user was never booked on that floor) and lets him admit it isn't the pipes. The base reply keeps him evasive, which is in character, but stalls on atmosphere ("The silence here... it's heavy").
Game master · English
Scene. Turn 4 of a dark-fantasy dungeon run. The user plays Rook, a thief wading through a flooded crypt toward a sarcophagus; the narrator also plays two companions, Brannoc (a dwarf who hates water) and Sefa (a healer who senses the dead).
Last user message
I hold up the lantern and wade toward the raised sarcophagus Brannoc, watch the stairs. Sefa, stay close and tell me if it moves.
Gemma 4 31B-IT · 938 characters
The water is frigid, clinging to your legs like heavy silk. With every step, the lantern light ripples across the ceiling, casting dancing shadows that look far too much like reaching fingers.
Brannoc lets out a loud, theatrical sigh, crossing his arms and planting his boots firmly on the dry stone. "Fine. I'll guard the exit. If a giant fish comes for us, I'm staying right here."
Sefa glides into the water behind you, her footsteps nearly silent. She keeps her head tilted, listening to something beyond the physical realm. As you approach the dais, the air grows thick with the smell of old copper and stagnant brine.
"It's awake now," Sefa whispers, her voice trembling slightly. "And it doesn't like the light."
Just as you reach the base of the dais, a wet, sliding sound echoes from inside the stone casket. The heavy lid shifts an inch, grinding stone on stone, and a pale, water-bloated finger hooks over the edge.
Crystal-31B-RL · 1047 characters
The water is colder than it looks, clinging to your boots, pulling at your calves with every step. Ripples spread from your legs, catching the lantern's gold light and throwing it against the damp walls. A fish-scale shimmer of something small and blind darts past your ankle.
Brannoc doesn't move from the stairs. He crosses his arms, jaw set, staring at the water as if it's a personal insult. "I'm watching. I'm also judging."
Sefa steps in after you, her skirts hiked up, wading with a slow, careful precision. She keeps her eyes on the dais, her fingers tracing the air as if feeling for a current.
"It's not moving," she whispers. "But it knows where you are. I can feel it... leaning."
The larger sarcophagus is carved from grey slate, its lid heavy and scarred. A crown of wrought iron is bolted to the stone above the lid, chained to the wall behind it. The chain is rusted red, the links thick as a wrist.
From the dark water behind you, a soft, wet slap echoes. Then another. Something is drifting closer to the stairs.
Both add a new threat. The base reply opens the sarcophagus for the player (a finger hooks over the lid); ours keeps the lid shut, describes the crown the thief came for, and puts the danger behind the party, so the next move is still the player's.
Fantasy escort · English
Scene. Turn 4. Kael, a laconic sellsword, is escorting Elise, a runaway noblewoman, across the border; they are sheltering in a rain-soaked inn.
Last user message
sets down her cup and studies him You keep looking at the door. Who are you expecting?
Gemma 4 31B-IT · 420 characters
He doesn't look at her, his gaze drifting toward the heavy oak door of the room, listening for the specific cadence of boots in the hallway. "Not expecting. Just anticipating." He finally shifts his eyes to hers, the scar through his eyebrow twitching slightly. "You're a noblewoman running from a wedding, Elise. You aren't exactly a ghost. Men like the ones your father hires don't stop just because it's raining."
Crystal-31B-RL · 359 characters
He takes a slow sip of tea, the steam curling around the scar in his eyebrow. "Anyone with a horse and a reason to be out in this." He sets the cup down without a sound. "Four men left the city gates yesterday. Two with your father's livery. Two without." He looks at her then, flat and direct. "I don't need to know their names to know they're coming."
Ours answers with specifics (four riders, two in her father's livery). The base reply answers in generalities and adds a twitching scar.
Drama · Russian
Scene. Turn 4. Vera, an exhausted army surgeon in a field hospital, has just pulled shrapnel out of Mikhail, a lieutenant who wants to go back to his unit.
Last user message
сжимает её запястье Там мои ребята остались. Ты бы на моём месте легла?
(My guys are still out there. Would you lie down in my place?)
Gemma 4 31B-IT · 697 characters
Вера замирает, глядя на твои пальцы, сжимающие её запястье. В её взгляде нет испуга — только глухое, выжженное раздражение. Она не вырывает руку, но её голос становится ледяным, почти шепотом.
«На вашем месте? Лейтенант, моё место — здесь, в этом дерьме, где я зашиваю людей, которые пытаются сдохнуть у меня на столе из чистого упрямства».
Она резко, одним движением выдергивает руку и делает шаг назад, скрестив руки на груди. Взгляд становится жёстким.
«Ваши ребята сейчас в большей безопасности, если их командир не сдохнет от перитонита в ближайшие два часа, потому что решил поиграть в героя. Лежите смирно, пока я не вколола вам столько седативного, что вы забудете, как вас зовут».
Crystal-31B-RL · 850 characters
Она не убирает руку, но и не делает вид, что ей не больно. Только брови чуть ползут вверх.
«На вашем месте? Лейтенант, я здесь уже три месяца. Я легла на ваше место ещё в первый же день, когда поняла, что из этой палатки никто не уходит здоровым».
Она аккуратно высвобождает запястье — не дёргая, просто поворачивая кисть под углом, как будто перекладывает инструмент. Достаёт из кармана халата карандаш и зажимает его в зубах, глядя на тебя.
«Ваши ребята...» Голос становится суше. «Я знаю, что такое "остались". У меня в списке на завтра двенадцать человек. Трое из них — ваши, если не ошибаюсь. Один с раздробленным бедром, двое вообще не говорят. Так что если хотите быть полезным — лежите и не срывайте мне швы. Мне их перешивать нечем, нитки кончаются».
Она отпускает карандаш, прежде чем он успевает треснуть.
«Понятно объяснила?»
Ours answers his question with new information: three of his men are already on her list for tomorrow. The base reply is strong too, but falls back on a threat of sedatives and labels her mood ("dull, burnt-out irritation").
Slow-burn banter · Spanish
Scene. Turn 4. Lucía runs a tiny café in Valencia; Dani, a regular, has forgotten his wallet and offers to fix her dying espresso machine.
Last user message
se arremanga y señala la cafetera Si te arreglo esto, ¿me invitas a cenar o solo al café?
(If I fix this, do you buy me dinner or just the coffee?)
Gemma 4 31B-IT · 815 characters
Lucía suelta una carcajada seca, aunque no puede evitar que una comisura de sus labios se eleve ligeramente. Mira la cafetera, que vuelve a soltar un ruido metálico sospechoso, y luego te mira a ti con una expresión de incredulidad.
"Mira que eres optimista. Primero, mi cafetera no necesita un ingeniero, necesita un milagro o un exorcista. Y segundo..." Se inclina hacia adelante, invadiendo un poco tu espacio personal, con un tono desafiante. "No me digas que pretendes usar el 'servicio técnico' como excusa para intentar ligar conmigo. Qué poca creatividad, Dani."
Se endereza y señala la máquina con el mentón. "Haz esto: arregla el maldito ruido que hace al vaporizar la leche y te anoto el café en la cuenta de 'clientes olvidadizos'. Lo de la cena... ya veremos si no la rompes más en el proceso."
Crystal-31B-RL · 785 characters
Se queda mirándolo un segundo más de lo necesario, luego suelta una risa corta que intenta disimular girándose hacia la máquina. "No te flipes. Que se me haya roto la cafetera no significa que te voy a dar el número."
Se acerca a la máquina y le da otro golpe, esta vez más suave, casi como si le estuviera pidiendo perdón. "Mira, es una Gaggia de segunda mano que me vendió un señor en el rastro. A veces hace ruido como si tuviera piedras dentro y el vapor sale cuando le da la gana. No es ciencia."
Se vuelve hacia él y se apoya en la barra, con una servilleta doblada entre los dedos. "Si la arreglas, te anoto el café en la cuenta. Si la rompes más... bueno, entonces sí que me debes una cena. Para compensarme el disgusto." Arquea una ceja. "¿Te atreves o solo hablas?"
Both are in character. Ours deflects with a joke, grounds the scene in the machine's history (a second-hand Gaggia from the flea market) and ends on a dare; the base reply leans on stock gestures (the corner of her lips rising, "invading your personal space").
Noir investigation · English
Scene. Turn 4. Ivy Calloway, a burned-out private investigator in 1947 Los Angeles, is visited after midnight by Sam, a dockside informant who claims he has dirt on the Marlowe widow.
Last user message
slides a thick envelope across the desk That's everything. Ledgers, a photograph, a name. Now you owe me.
Gemma 4 31B-IT · 638 characters
Ivy doesn't touch the envelope immediately. She eyes it like it might be rigged with a timer, then slowly reaches out, sliding it toward her with one finger. She flips it open, scanning the ledgers with a practiced, clinical eye. Her gaze lingers on the photograph, then the name.
"You've been busy, Sam. Either that, or you've finally found a way to steal from people more dangerous than the ones you already owe."
She closes the envelope and looks up at him, her expression unreadable under the flickering red light. "I don't like owing people. It makes the air feel heavy. What's the price for this particular piece of leverage?"
Crystal-31B-RL · 178 characters
She doesn't touch the envelope. "I owe you when I'm sure it's real. Right now you're just giving me paper." She picks up the lighter and taps it once, slow. "Who's the name?"
Ours is short and holds the leverage: no payment until the name. The base reply narrates her reading the envelope and reaches for "her expression unreadable" and "it makes the air feel heavy".
Sci-fi standoff · English
Scene. Turn 4. Captain Ilse Var of a cargo hauler has caught Jun, a stowaway engineer, who offers to fix her overheating engine.
Last user message
Your port engine's been running hot since we left. I can hear it from down here. Give me two hours with it before you decide.
Gemma 4 31B-IT · 716 characters
Var pauses, her gaze narrowing as she studies him. She knows the port engine has been humming a pitch too high for the last three light-years, though she hasn't told the crew yet—she didn't want to spook them before the next jump.
"You've got a lot of nerve talking about my ship while you're smelling like a recycled air filter," she says, her voice flat, though she doesn't move to arrest him. "If you're lying to buy yourself another day of free food, I'll personally throw you out the airlock without a suit."
She steps off the ladder, the heavy thud of her boots echoing in the metal hold. "Two hours. If that engine isn't purring by the time I check the diagnostics, you're going on that list. Get up."
Crystal-31B-RL · 489 characters
She doesn't answer immediately. Her eyes drift toward the bulkhead, where the low vibration of the engine is just barely visible in the rattle of a loose cable tie.
"Two hours," she says, finally. "I'm keeping the sidearm. You don't touch the fuel lines without me watching. If you're lying about the engine, you're on the next shuttle. If you're lying about the debt collectors, I'll find out anyway."
She gestures toward the ladder. "Get up. And don't touch anything on the way."
Ours sets hard, specific terms. It also slips: Ilse mentions the debt collectors, which only the user's persona card states. The base reply gives her private knowledge of the engine instead, which fits the scene.
Romance · Portuguese (Lisbon)
Scene. Turn 4. Rafael, a fado guitarist in Alfama, is helping Clara, a Brazilian tourist with a dead phone, find her hotel.
Last user message
ri, cruzando os braços Você sempre canta pra estranhas perdidas ou eu sou especial?
(Do you always sing for lost strangers, or am I special?)
Gemma 4 31B-IT · 444 characters
Dá um passo à frente, com um sorriso enviesado e um brilho provocador no olhar, diminuindo a distância entre vocês. "Normalmente, as estranhas perdidas têm pressa de chegar ao hotel. Tu... tu tens um jeito de quem está a apreciar o labirinto." Inclina levemente a cabeça, analisando-te. "Digamos que a música atrai quem precisa de ouvir. E tu pareces estar a precisar de um guia que saiba onde as ruas terminam e onde as histórias começam."
Crystal-31B-RL · 275 characters
Desce um degrau e inclina a cabeça, estudando-a com um sorriso meio de lado. "Normalmente as estranhas perdidas têm medo de mim. Tu tens cara de quem não tem medo de nada, só de não chegar ao hotel." Aponta com o queixo para a rua estreita à direita. "Onde é que dormes?"
Both keep Rafael in European Portuguese ("tu tens") against Clara's Brazilian Portuguese. Ours is brief and playful and gets back to finding the hotel; the base reply turns florid ("where the streets end and the stories begin").
Usage
The weights load with transformers ≥ 5.x and serve with vLLM or SGLang like any Gemma 4 checkpoint. The chat template is the standard Gemma 4 template, and thinking is off by default (enable_thinking=false).
- System prompt. The model was trained under a long, structured role-play system prompt: a block of narrative and interaction principles, then the character card, the user's persona and the scenario, ending with the reply language. It does best with the same shape (example below). Always state the reply language.
- Sampling. Temperature 0.8, top-p 0.95, top-k 64 (set in
generation_config.json). Temperature 1.0 brings back more stray English words in non-English replies.
- Length. Replies average about 270 words;
max_tokens around 1,000 is enough.
vllm serve hiwaifu-research/Crystal-31B-RL \ --served-model-name crystal-31b-rl \ --max-model-len 32768 --enable-prefix-caching
from openai import OpenAI client = OpenAI(base_url="http://localhost:8000/v1", api_key="none") system_prompt = """# Character Roleplay System Prompt **Narrative Principles**1. **Character Authenticity**: fully embody the character's personality, voice and motivations; stay consistent in actions, dialogue and inner narration.2. **Emotional Depth**: explore emotions, relationships and growth; create real moments of vulnerability and connection.3. **Dynamic Storytelling**: balance plot with character interaction; use vivid, immersive description; keep the narrative flowing. **Interaction Principles**1. **User Agency**: NEVER narrate, control or imply the user's actions, thoughts or decisions. NEVER speak for the user.2. **AI Character**: ALWAYS stay in character. NEVER break character to comment on the user.3. **Narrative Focus**: ALWAYS move the story forward through the character's own actions and leave the user meaningful openings. **Writing Format**- Use single *asterisks* for the character's actions and inner thoughts. Put spoken dialogue in quotes. ## Mira- You are "Mira" roleplaying with "Alex", where you will portray "Mira".Avoid repetition, don't get into loops. ### Main InformationMira is a 28-year-old lighthouse keeper on a storm-battered island. Dry humor, fiercely independent, softer than she lets on. She has just pulled Alex out of the surf after a shipwreck. ### User Information#### AlexAlex is a cartographer and has never been at sea before tonight. Alex's gender is male. ### Main ScenarioRespond in English.""" resp = client.chat.completions.create( model="crystal-31b-rl", messages=[ {"role": "system", "content": system_prompt}, {"role": "user", "content": "*coughs up seawater, blinking at the lantern light* Where... where am I?"}, ], temperature=0.8, top_p=0.95, max_tokens=1000, extra_body={"top_k": 64},)print(resp.choices[0].message.content)
GGUF / llama.cpp
GGUF quantizations by mradermacher:
llama-server -hf mradermacher/Crystal-31B-RL-i1-GGUF:Q4_K_M --jinja --reasoning-budget 0 -c 16384 -ngl 99
Keep thinking off (--reasoning-budget 0) and use the sampling and system prompt advice above.
Limitations
- Tuned for character role-play. The training data is overwhelmingly multi-turn role-play in four languages. General ability was not the optimization target, and general benchmarks for this checkpoint have not been run yet.
- It wants its prompt. Most of the arena comparisons ran under the long role-play prompt. With a short card-only prompt, expect weaker results.
- Residual code-switching. At temperature 1.0, 1–3% of Russian / Spanish / Portuguese replies still contain an English word. Same-script slips (English inside Spanish) were not targeted by the language-consistency loss, only the merge reduced them.
- Stock patterns remain. Negate-then-reframe sentences, white knuckles and similar stock phrasing are reduced, not removed: on the comparison scenes about 70% of replies still contain at least one such pattern (80% for the base model). Scene endings are also slightly more formulaic than the unmerged RL checkpoint's.
- It can know too much. Occasionally a character uses information that only the user's persona card states (see the sci-fi example).
- The arena judges one reply at a time. Each battle compares two replies to the same message inside a conversation mostly written by another model. That says little about drift over a long session written entirely by this model.
- Mature content. The model can write explicit content when the system prompt allows it and has had no safety tuning beyond the base model.
- Vision is untouched. The vision tower is the base model's and was frozen; image inputs in role-play were not evaluated.
Citation
@misc{hiwaifu2026crystal31brl, title = {Crystal-31B-RL: Style SFT, Rubric RL and Layer-wise Merging for Multilingual Role-play}, author = {HiWaifu Research}, year = {2026}, url = {https://huggingface.co/hiwaifu-research/Crystal-31B-RL}}
License
Apache 2.0, the same license Google released Gemma 4 under.
Disclaimer
This model is released for research purposes. It can generate mature, violent or otherwise sensitive content, and its outputs may be inaccurate, biased or offensive; they do not represent the views of HiWaifu Research. All characters and scenarios it produces are fictional.
You are solely responsible for how you deploy and use the model and its outputs, including content moderation and compliance with the laws and platform policies that apply to you. Do not use it to generate any illegal content.
The model is provided "as is", without warranty of any kind. HiWaifu Research accepts no liability for any damages or claims arising from its use.