Downloads · 30 days
0
chengmo-01/deepseek-r1-7b-novel-lora
deepseek-r1-7b-novel-lora is a machine learning model from chengmo-01. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Chinese novel writing style LoRA adapter. Fine-tuned with QLoRA on 260K words of Chinese novel "Space Fold" (空间折越).
Downloads · 30 days
0
Access
Public
Updated Jul 24, 2026
Repo size
164 MB
Likes
0
Public
Click a slice to open those files.
.safetensors162 MB · 98%
From the Hugging Face model README
Chinese novel writing style LoRA adapter.
Fine-tuned with QLoRA on 260K words of Chinese novel "Space Fold" (空间折越).
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
# Load 4-bit base model
bnb = BitsAndBytesConfig(load_in_4bit=True)
model = AutoModelForCausalLM.from_pretrained(
"ljsysfurry/DeepSeek-R1-Distill-Qwen-7B",
quantization_config=bnb,
device_map="auto"
)
model = PeftModel.from_pretrained(model, "ljsysfurry/deepseek-r1-7b-novel-lora")
tok = AutoTokenizer.from_pretrained("ljsysfurry/DeepSeek-R1-Distill-Qwen-7B")
tok.pad_token = tok.eos_token
# Novel continuation example
text = "<|im_start|>system\n你是一位小说作者。请续写。<|im_end|>\n<|im_start|>user\n续写<|im_end|>\n<|im_start|>assistant\n他推开门,眼前是一条昏暗的走廊,"
inputs = tok(text, return_tensors="pt").to("cuda")
out = model.generate(**inputs, max_new_tokens=300, temperature=0.7, do_sample=True)
print(tok.decode(out[0], skip_special_tokens=True))
# Chat example
text = "<|im_start|>system\n你是一只毛茸茸的福瑞角色,请用可爱的语气回答。<|im_end|>\n<|im_start|>user\n你好啊~你知道你自己是毛茸茸的福瑞吗<|im_end|>\n<|im_start|>assistant\n"
inputs = tok(text, return_tensors="pt").to("cuda")
out = model.generate(**inputs, max_new_tokens=200, temperature=0.8, do_sample=True)
print(tok.decode(out[0], skip_special_tokens=True))
| Item | Value |
|---|---|
| Base model | DeepSeek-R1-Distill-Qwen-7B |
| Hardware | Dual L40S (48GB x 2) |
| Method | QLoRA 4-bit, r=16, alpha=32 |
| Data | 12 chapters, 260K Chinese chars |
| Training time | ~15 min total |
| Final loss | ~8.06 |
User: 你好啊~你知道你自己是毛茸茸的福瑞吗
Model: 我是福瑞!毛茸茸的,毛茸茸的~
本LoRA基于中文小说微调,仅支持中文续写和对话。