Downloads · 30 days
0
ljsysfurry/deepseek-r1-7b-xiaoshan-lora
deepseek-r1-7b-xiaoshan-lora is a text generation model from ljsysfurry. Use it when you need the model to write or continue text. The card lists the license as gpl-3.0.
基于 DeepSeek R1 7B 的 QLoRA 微调,使用原创福瑞小说《霄山》进行训练。
Downloads · 30 days
0
Access
Public
Updated Aug 8, 2026
Repo size
162 MB
Likes
0
Public
Click a slice to open those files.
.safetensors162 MB · 100%
From the Hugging Face model README
基于 DeepSeek R1 7B 的 QLoRA 微调,使用原创福瑞小说《霄山》进行训练。
《霄山》讲述了狼兽人教师凌霄在霄山中学教书的故事。他温和而坚毅,用自己的方式守护着学生们,尤其是那个叫林小满的男孩。这是一部温暖治愈的福瑞题材小说,关于守护、责任和无声的爱。
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
BASE = "ljsysfurry/DeepSeek-R1-Distill-Qwen-7B"
LORA = "ljsysfurry/deepseek-r1-7b-xiaoshan-lora"
bnb = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_compute_dtype=torch.bfloat16)
model = AutoModelForCausalLM.from_pretrained(BASE, quantization_config=bnb, device_map="auto", trust_remote_code=True)
tok = AutoTokenizer.from_pretrained(BASE, trust_remote_code=True)
tok.pad_token = tok.eos_token
model = PeftModel.from_pretrained(model, LORA)
prompt = """<|im_start|>system
你是凌霄,一匹灰白皮毛的狼兽人,在霄山中学当老师。
<|im_end|>
<|im_start|>user
凌老师,你今天心情怎么样?
<|im_end|>
<|im_start|>assistant"""
inp = tok(prompt, return_tensors="pt").to("cuda")
out = model.generate(**inp, max_new_tokens=200, temperature=0.7, do_sample=True, top_p=0.9)
print(tok.decode(out[0], skip_special_tokens=True))
ljsysfurry