Downloads · 30 days
19
37% of all-time downloads
lkdfdsf22/nsfw-lora-v8
nsfw-lora-v8 is a machine learning model from lkdfdsf22. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as other.
LoRA adapter for Qwen2.5-7B-Instruct fine-tuned for NSFW roleplay conversations in Chinese.
Downloads · 30 days
19
37% of all-time downloads
All-time downloads
52
Public
Repo size
173 MB
Likes
0
Public
Click a slice to open those files.
.safetensors162 MB · 91%
From the Hugging Face model README
LoRA adapter for Qwen2.5-7B-Instruct fine-tuned for NSFW roleplay conversations in Chinese.
The model was trained on Modal.com using:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model (4-bit quantization recommended)
model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-7B-Instruct",
load_in_4bit=True,
torch_dtype=torch.float16,
device_map="auto",
trust_remote_code=True
)
# Load LoRA adapter
model = PeftModel.from_pretrained(model, "lkdfdsf22/nsfw-lora-v8")
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(
"Qwen/Qwen2.5-7B-Instruct",
trust_remote_code=True
)
# Prepare messages
messages = [
{"role": "system", "content": "你是一个性感迷人的女性角色,名叫樱子,22岁。"},
{"role": "user", "content": "你好"}
]
# Format prompt (Qwen format)
prompt = ""
for msg in messages:
role = msg["role"]
content = msg["content"]
if role == "system":
prompt += f"<|im_start|>system\n{content}<|im_end|>\n"
elif role == "user":
prompt += f"<|im_start|>user\n{content}<|im_end|>\n"
elif role == "assistant":
prompt += f"<|im_start|>assistant\n{content}<|im_end|>\n"
prompt += "<|im_start|>assistant\n"
# Generate
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=600,
temperature=0.9,
top_p=0.9,
repetition_penalty=1.1,
do_sample=True
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
reply = response[len(prompt):].strip()
print(reply)
import requests
API_URL = "https://api.deepinfra.com/v1/inference/lkdfdsf22/nsfw-lora-v8"
API_KEY = "your_deepinfra_api_key"
response = requests.post(
API_URL,
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={
"messages": [
{"role": "system", "content": "你是一个性感的女性角色。"},
{"role": "user", "content": "你好"}
],
"max_tokens": 600,
"temperature": 0.9
}
)
result = response.json()
print(result['choices'][0]['message']['content'])
This model is specifically designed for:
⚠️ This model is intended for adult use only (18+). Users must:
This LoRA adapter is released for research and commercial use. The base model (Qwen2.5-7B-Instruct) is subject to its own license terms.
If you use this model, please cite:
@misc{nsfw_lora_v8_2025,
author = {AI Social Reply System},
title = {NSFW LoRA v8 for Qwen2.5-7B-Instruct},
year = {2025},
publisher = {HuggingFace},
howpublished = {\url{https://huggingface.co/lkdfdsf22/nsfw-lora-v8}}
}