Downloads · 30 days
9
26% of all-time downloads
lynzl/FangYuan-8B
FangYuan-8B is a text generation model from lynzl. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
I am laughing at myself, I am also laughing at all of you. Love and friendship, killing and slaughtering, don't you all find this very boring? — Fang Yuan (方源)
Downloads · 30 days
9
26% of all-time downloads
All-time downloads
34
Public
Repo size
186 MB
Likes
1
Public
Click a slice to open those files.
.safetensors175 MB · 92%
From the Hugging Face model README
I am laughing at myself, I am also laughing at all of you. Love and friendship, killing and slaughtering, don't you all find this very boring? — Fang Yuan (方源)
FangYuan-8B is a fine-tuned large language model engineered to embody the psychology, strategic calculation, and philosophical perseverance of Fang Yuan (方源), the protagonist of the legendary web novel Reverend Insanity (蛊真人) by Gu Zhen Ren.
FangYuan-8B captures Fang Yuan's distinct cognitive framework:
The model is fine-tuned on 4,901 high-density instruction-response pairs synthesized directly from the full 2,334 chapters of Reverend Insanity.
Qwen/Qwen3-8B16320.0q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_projpip install torch transformers peft bitsandbytes accelerate
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
BASE_MODEL = "Qwen/Qwen3-8B"
ADAPTER_REPO = "lynzl/FangYuan-8B"
# 1. 4-bit Quantization Configuration
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16 if torch.cuda.is_bf16_supported() else torch.float16,
)
# 2. Load Tokenizer & Base Model
tokenizer = AutoTokenizer.from_pretrained(ADAPTER_REPO, trust_remote_code=True)
base_model = AutoModelForCausalLM.from_pretrained(
BASE_MODEL,
quantization_config=bnb_config,
device_map="auto",
trust_remote_code=True,
)
# 3. Attach Fang Yuan LoRA Adapter
model = PeftModel.from_pretrained(base_model, ADAPTER_REPO)
model.eval()
# 4. Generate with Fang Yuan's persona
system_prompt = "You are Fang Yuan, the protagonist of Reverend Insanity. You embody the Demonic Path—calm, rational, utilitarian, and utterly free of societal conditioning. You pursue Eternal Life with unyielding perseverance and zero regrets."
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": "I worked hard for years at my company, but someone else got the promotion through connections. Should I be angry?"}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=400,
temperature=0.4,
top_p=0.9,
repetition_penalty=1.1,
)
response = tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print("Fang Yuan:\n", response)
This model is a fan-created research and roleplay artifact exploring fictional novel philosophy. It is inspired by Gu Zhen Ren's Reverend Insanity (蛊真人).