Text Generation
PEFT
Safetensors
English
science-fiction
creative-writing
storytelling
fiction
lora
unsloth
qwen3.5
conversational
Instructions to use sid172002/Positronic-SciFi-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use sid172002/Positronic-SciFi-9B with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("C:\\Users\\siddh\\.lmstudio\\models\\Qwen\\Qwen3.5-9B") model = PeftModel.from_pretrained(base_model, "sid172002/Positronic-SciFi-9B") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
File size: 6,385 Bytes
4795fb8 6d7d603 4795fb8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | ---
license: apache-2.0
base_model: Qwen/Qwen3.5-9B
library_name: peft
pipeline_tag: text-generation
language:
- en
tags:
- science-fiction
- creative-writing
- storytelling
- fiction
- lora
- unsloth
- qwen3.5
---
# Positronic SciFi 9B
*A positronic brain for science fiction: it writes the way novelists do. Laptop edition, trained on 10,510 books.*
Most language models write fiction like a press release about fiction. Positronic SciFi
was raised differently. It grew up on 10,510 science-fiction books,
generation ships and drowned cities, first contact and last stands, machine minds
and the people stuck living beside them, and it learned one thing thoroughly: how
a scene actually moves. Where the sentence breaks. When a character shuts up.
What the air smells like on a station that has been recycling it for ninety years.
Hand it the opening of a scene. It hands you back the next six to nine hundred
words in the same voice, on the same beat, as if the author had kept typing.
## What you can do with it
**Start.** You have a first paragraph and nothing else. Give it that paragraph
and get a page you can argue with. Arguing with a page is faster than staring at
a blank one.
**Keep going.** Paste the last stretch of your draft and let it propose the next
scene. Keep the turn you didn't see coming. Delete the rest.
**Change key.** Hard SF with the physics showing. Space opera at full volume.
Quiet post-apocalypse where the end of the world is mostly about firewood.
Time-travel puzzles that close cleanly. It has read thousands of each and will
follow whichever one you open with.
**Hear your own voice at speed.** It mirrors the rhythm you feed it. Short,
clipped sentences in; short, clipped sentences out. Long, braided clauses in;
it stays with you.
It runs on one 24 GB consumer GPU in 4-bit. No cloud, no subscription, no one
reading your draft but you.
**Slop check.** On 20 unseen premises, 4 of 20 scenes passed a machine-prose screen of 100+ tell-tale phrases and structures (median 6 hits per scene, em-dash reflex absent). It writes like the books it read, not like a chatbot.
## Quick start
```python
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
import torch
base = "Qwen/Qwen3.5-9B"
tok = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(
base, device_map="auto",
quantization_config=BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_compute_dtype=torch.bfloat16),
)
model = PeftModel.from_pretrained(model, "sid172002/Positronic-SciFi-9B")
opening = """The airlock cycled twice before anyone spoke. Reyes kept her hand on the
manual release, not because she expected to need it but because the ship had
stopped telling her things three days ago and she had started to take that
personally. ...""" # a few hundred words of your scene
prompt = "Continue this passage with the immediately following original prose:
" + opening
ids = tok.apply_chat_template([{"role": "user", "content": prompt}],
add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=900, do_sample=True, temperature=0.7, top_p=0.9)
print(tok.decode(out[0][ids.shape[-1]:], skip_special_tokens=True))
```
Loads anywhere PEFT adapters load on top of Qwen/Qwen3.5-9B, including Unsloth Studio and
the usual local UIs.
## The anti-slop layer
The repo ships `anti_slop.py` and `slop_vocab.txt`: a banned list of 100+
machine-prose phrases (merged from the stop-slop, anti-ai-slop-writing and
no-ai-slop projects, pruned for fiction) plus structural checks for binary
contrasts, rhetorical setups, stock metaphors, em-dash and adverb density.
Two lines turn it on:
```python
from anti_slop import bad_words_ids, slop_score # files from this repo
out = model.generate(ids, bad_words_ids=bad_words_ids(tok), max_new_tokens=900,
do_sample=True, temperature=0.7, top_p=0.9)
print(slop_score(tok.decode(out[0][ids.shape[-1]:], skip_special_tokens=True)))
```
`generation_config.json` carries the same decoding defaults, so plain
`model.generate(ids)` already avoids repeated 4-grams and runs at the tuned
temperature. The model was trained on human prose only; this layer is the belt
to that pair of braces.
## How to get the good stuff
Give it prose, not orders. It was trained to continue scenes, so two to six
paragraphs of your own writing will beat any one-line request.
Run it warm but not hot: temperature 0.6 to 0.8. Go lower when you want the
physics to stay honest, higher when you want the dream logic.
Ask for 600 to 900 words. That is the length it practised on and where scenes
come out whole, with an ending that lands instead of trailing off.
Regenerate without guilt. Different seeds from the same opening give genuinely
different scenes. Keep the one that surprised you.
## Two editions
Its sibling **Positronic SciFi Omnicorpus 9B** is the every-word edition, trained on a rented H100 over the complete text of every book with 8k-token windows and book/author/genre headers: [sid172002/Positronic-SciFi-Omnicorpus-9B](https://huggingface.co/sid172002/Positronic-SciFi-Omnicorpus-9B). Same base model,
same prompt format, so you can swap one adapter for the other and keep the same
code. Which one writes better is being judged on a fixed set of premises; the
results will be posted on both cards.
## Under the hood
| | |
|---|---|
| Edition | Laptop edition, trained on one RTX 5090 laptop GPU, at home |
| Base model | Qwen/Qwen3.5-9B |
| Adapter | LoRA, rank 16, on every attention and MLP projection |
| Training text | 10,510 science-fiction novels and collections, about 709 million words of source; consecutive 650-word passages, learning to write the second from the first |
| Context | 2048 tokens |
| Validation loss | 2.500 on books it never saw |
| Trained with | Unsloth, QLoRA 4-bit, 2000 steps |
Every word it learned from was written by a human. No synthetic text, no
model-written filler.
## Fine print
English only, science fiction first; it will wander into other genres but that
is not where it lives. It can lean toward the cadence of authors it read a lot
of, so treat what it gives you as a draft and make it yours before you publish.
Same licence as the base model: Apache 2.0.
Now go write the thing.
|