--- license: apache-2.0 base_model: Qwen/Qwen3.8-27B library_name: transformers pipeline_tag: text-generation tags: - qwen - qwen3 - qwen3.8 - roleplay - creative-writing - lora-merged language: - en - tr --- # Novelist1.0-27b A **27B** literary writer on [Qwen/Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B). Merged 16-bit weights for **roleplay and fiction** in English and Turkish. LoRA (same generation): [Dxniz/Novelist1.0-27b-Adapter](https://huggingface.co/Dxniz/Novelist1.0-27b-Adapter). Eval prompts: [Dxniz/Novelist-Bench](https://huggingface.co/datasets/Dxniz/Novelist-Bench). ## Character Novelist1.0 is trained to **stay in the scene**: concrete sensory detail, character voice, and the request on the page — not a helper that summarizes, moralizes, or turns the story into a list of themes. - **Voice lock.** Holds persona, diction, and POV instead of sliding into generic chatbot prose. - **Scene over slogan.** Prefers objects, weather, gesture, and dialogue to abstract feeling and stock metaphors. - **Length as a contract.** If you ask for a word count or a range (`800 words`, `1000 kelime`, `800–1200`), it treats that as part of the task, not decoration. - **User text is canon.** Does not “correct” or overwrite what the user already established in the prompt. - **Anti-slop.** Pushes back on cliché loops, repeated cadence, and empty intensifiers that pad a paragraph without moving the scene. It is a writer, not an assistant. Weak on tools, code, and factual Q&A; that is by design. ## How to prompt it Give **situation + constraint**, not a vibe: - Who is speaking, where, what must happen (or must not). - Length, tense, POV, and what to leave unsaid. - Optional: a quota (`Write 600 words.` / `En az 800 en fazla 1200 kelime.`). ## Sampling (Qwen3.8) **Instruct (recommended for stories)** - thinking off: `temperature 0.7` · `top_p 0.80` · `top_k 20` · `min_p 0` · `presence_penalty 1.5` · `repetition_penalty 1.0` · `enable_thinking=false` **Thinking** - if you want a plan before the prose: `temperature 1.0` · `top_p 0.95` · `top_k 20` · `min_p 0` · `presence_penalty 0` · `repetition_penalty 1.0` · `enable_thinking=true` Training itself used thinking **off**. Instruct mode is the default product setting. ## Transformers ```python from transformers import AutoModelForCausalLM, AutoTokenizer model_id = "Dxniz/Novelist1.0-27b" tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained( model_id, torch_dtype="bfloat16", device_map="auto", trust_remote_code=True ) messages = [ {"role": "system", "content": "You are a literary fiction writer. Follow the prompt exactly."}, {"role": "user", "content": "Write 400 words. Night, a closed bookstore in Istanbul, rain. One argument that does not resolve. No summary at the end."}, ] text = tok.apply_chat_template( messages, tokenize=False, add_generation_prompt=True, enable_thinking=False ) inputs = tok(text, return_tensors="pt").to(model.device) out = model.generate( **inputs, max_new_tokens=2048, temperature=0.7, top_p=0.8, top_k=20, presence_penalty=1.5, ) print(tok.decode(out[0][inputs.input_ids.shape[-1]:], skip_special_tokens=True)) ``` On the chat call, set `chat_template_kwargs={"enable_thinking": false}` unless you explicitly want thinking. On 32 GB cards use FP8 or a 4-bit quant of this merge. ## Recipe (short) LoRA **r=64 / α=64** on attention and MLP projections, then SFT on roleplay/fiction chats and GRPO with rewards for length/quota, craft, anti-slop, anti-repetition, and not overwriting the user. Sequence-level GRPO (GSPO / `dr_grpo`). ## Limits Still a language model: it can flatten a character, echo a cliché, or miss a quota on a messy prompt. It will invent facts. Do not use it for medical, legal, or safety-critical advice. Qwen3.8 hybrid stack wants a recent runtime (vLLM 0.27+). ## License Apache 2.0. Also respect the [Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B) terms.