Downloads · 30 days
47
64% of all-time downloads
wodeapp/qwen3.8-27b-novel-lora
qwen3.8-27b-novel-lora is a text generation model from wodeapp. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as other.
把 Qwen3.8-27B 转为小说训练后的 LoRA 适配器,用来把一段场景提示扩写成中文小说正文。
Downloads · 30 days
47
64% of all-time downloads
All-time downloads
73
Public
Repo size
1.3 GB
Likes
1
Trending 1
Click a slice to open those files.
.safetensors1.3 GB · 98%
From the Hugging Face model README
把 Qwen3.8-27B 转为小说训练后的 LoRA 适配器,用来把一段场景提示扩写成中文小说正文。
仓库里只有适配器,没有基座权重。使用时挂到本地的 Qwen3.8-27B 上。基座是多模态结构,加载用 AutoModel。
生成时直接从故事写起。如果开头先出现写作说明,从第一句正文开始用。
import torch
from peft import PeftModel
from transformers import AutoModel, AutoTokenizer
base = "/path/to/Qwen3.8-27B" # 本地基座目录
tok = AutoTokenizer.from_pretrained(base, trust_remote_code=True)
model = AutoModel.from_pretrained(
base,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
)
model = PeftModel.from_pretrained(model, "wodeapp/qwen3.8-27b-novel-lora")
scene = (
"屠龙归来的骑士推开王宫大门,满朝文武跪了一地。"
"可王座上空无一人,只有他十年前送给公主的那柄匕首,"
"钉在一张字条上:别相信任何迎接你的人。"
)
prompt = scene + "\n\n直接续写正文,只写故事,不要说明:\n"
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(
**inputs,
max_new_tokens=800,
do_sample=True,
temperature=0.8,
top_p=0.9,
)
print(tok.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
场景提示:
屠龙归来的骑士推开王宫大门,满朝文武跪了一地。可王座上空无一人,只有他十年前送给公主的那柄匕首,钉在一张字条上:别相信任何迎接你的人。
正文:
骑士的靴子踩在冰冷的石板上,发出沉闷的回响。
空气里弥漫着龙血的腥甜和松脂的苦涩。
他推开那扇沉重的橡木大门。
满朝文武齐刷刷跪下,头盔和铠甲碰撞出清脆的声响。
王座上空无一人。
只有那柄匕首,静静地钉在王座靠背上,刀柄上还缠着十年前公主亲手系的红丝带。
字条在匕首下微微颤动。
「别相信任何迎接你的人。」