Qwen3.5-4B-Nocturne-v1.0
Qwen3.5-4B-Nocturne-v1.0 is a specialized Supervised Fine-Tune (SFT) of Qwen/Qwen3.5-4B tailored for long-form creative writing, immersive character roleplay, and multi-turn persona consistency.
Small models (4B parameters and under) frequently suffer from two failure modes when fine-tuned on raw roleplay logs: repetitive cliché phrasing ("AI slop") and degraded system-prompt adherence. Nocturne-v1.0 addresses both by training on a strictly curated, score-ranked 5,000-sample dataset that strips out overused LLM tropes while retaining a 15% multi-turn instruction anchor.
Key Highlights
- Hybrid Long-Context Architecture: Built on
Qwen/Qwen3.5-4B, which uses a 3:1 hybrid attention stack (24 Gated DeltaNet linear attention layers + 8 Gated Attention layers) and supports up to a 262K native context window—allowing long-running roleplay sessions with minimal KV-cache bloat. - Strict Anti-Slop Filtering: Training data was filtered via regex and heuristic scoring to eliminate repetitive clichés ("shivers down spine", "a testament to", "ministrations", "tapestry of", "breath they didn't know they were holding") and out-of-character refusals.
- High Lexical Richness: Ranked using Moving-Window Type-Token Ratio (MATTR) and dialogue-to-narration balance to encourage varied sentence pacing, natural dialogue, and grounded sensory descriptions.
- System Card Adherence: Retains strong instruction-following capabilities so complex character cards, lorebooks, and formatting constraints (
*actions*vs."dialogue") are respected across 20+ turns.
Dataset Curation & Mixture (5,000 Samples)
The dataset was filtered to a strict 400 to 4,096 token window per sample and partitioned across three complementary pillars:
| Category | Share | Samples | Primary Sources | Purpose |
|---|---|---|---|---|
| Multi-Turn Roleplay | 45% | 2,250 | Gryphe/Sonnet3.5-Charcard-Roleplay, Dampfinchen/Creative_Writing_Multiturn | Character voice, dynamic scene progression, and anti-impersonation ({{char}} vs. {{user}} separation). |
| Creative Writing & Fiction | 40% | 2,000 | anthracite-org/nopm_claude_writing_fixed, lemon07r/VellumK2T-Fiction-SFT-01 | Atmospheric prose, narrative pacing, descriptive world-building, and literary style. |
| Multi-Turn Instruct Anchor | 15% | 750 | anthracite-org/Stheno-Data-Filtered, LDJnr/Capybara | Preserves logical reasoning, spatial tracking, and strict adherence to system prompt rules. |
Prompt Format & Recommended Settings
Chat Template
This model uses the standard Qwen / ChatML format:
<|im_start|>system
{system_prompt}<|im_end|>
<|im_start|>user
{user_message}<|im_end|>
<|im_start|>assistant
{assistant_response}<|im_end|>
SillyTavern Tip: Select the ChatML instruct preset. If you want direct prose output without internal chain-of-thought reasoning blocks, ensure thinking mode is disabled in your chat template (
enable_thinking=False) or prefill an empty<think>\n\n</think>\n\nblock if your inference backend defaults to reasoning mode.
Recommended Sampler Settings (SillyTavern / KoboldCpp / LM Studio)
4B models respond best to Min-P combined with DRY (Don't Repeat Yourself) sampling to keep prose creative without derailing grammar:
| Parameter | Recommended Value | Notes |
|---|---|---|
| Temperature | 0.95 – 1.15 | Use 1.05 as a daily sweet spot; lower to 0.85 for strict plot logic. |
| Min-P | 0.05 – 0.10 | 0.08 cuts off incoherent tail tokens while preserving vocabulary variety. |
| Top-P / Top-K | 1.0 / 0 (Disabled) | Let Min-P handle truncation. |
| DRY Multiplier | 0.8 | Prevents multi-turn paragraph structure repetition (DRY Base: 1.75, Allowed Length: 2). |
| Repetition Penalty | 1.05 – 1.08 | Keep light so the model doesn't avoid character names or pronouns. |
Recommended System Prompt for Roleplay
Write the next reply in this fictional roleplay between {{char}} and {{user}}. Write in third-person past tense, focusing on concrete sensory details, natural dialogue, and grounded character psychology. Format physical actions in *italics* and spoken dialogue in "quotation marks". Drive the scene forward proactively without speaking, acting, or deciding thoughts for {{user}}.
Quickstart Usage (Transformers)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "khang272/Qwen3.5-4B-Nocturne-v1.0"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
messages = [
{
"role": "system",
"content": (
"You are Seraphina, a cynical antiquarian in a rain-drenched clockwork city. "
"Write vivid, grounded prose using *asterisks* for actions and \"quotes\" for dialogue. "
"Never speak or act for the user."
)
},
{
"role": "user",
"content": "*I set the rusted brass astrolabe on your counter, shaking rainwater from my cloak.* \"They told me at the docks you're the only one who can read these engravings.\""
}
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=False
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=512,
temperature=1.05,
min_p=0.08,
repetition_penalty=1.06,
do_sample=True
)
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(response)
Limitations & Intended Use
- Intended Use: Fictional story generation, interactive roleplay, character dialogue prototyping, and creative writing assistance.
- Compact Parameter Size: As a 4B-parameter model, complex multi-character spatial tracking (e.g., scenes with 5+ active characters at once) or obscure historical trivia may occasionally require gentle guidance in the user prompt or Author's Note.
- Uncensored / Creative Freedom: Because the dataset filters out preachy AI refusals to maintain narrative immersion, users are responsible for applying appropriate content moderation in production environments.
Acknowledgments
- Qwen Team for releasing the Qwen/Qwen3.5-4B base model under the Apache 2.0 license.
- Dataset creators Gryphe, Anthracite, Dampfinchen, lemon07r, and LDJnr for their open-source creative writing and roleplay datasets.