Downloads · 30 days
71
63% of all-time downloads
sk1729271/humanizer-qwen2.5-0.5b-lora
humanizer-qwen2.5-0.5b-lora is a text generation model from sk1729271. 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.
Fine-tuned LoRA adapter of Qwen/Qwen2.5-0.5B-Instruct that rewrites AI-sounding text (thesis/academic style) into natural human prose: higher sentence-length burstiness, fewer formulaic transitions, preserved citation…
Downloads · 30 days
71
63% of all-time downloads
All-time downloads
112
Public
Repo size
46.7 MB
Likes
0
Public
Click a slice to open those files.
.safetensors35.2 MB · 69%
From the Hugging Face model README
Fine-tuned LoRA adapter of Qwen/Qwen2.5-0.5B-Instruct that rewrites
AI-sounding text (thesis/academic style) into natural human prose: higher sentence-length
burstiness, fewer formulaic transitions, preserved citations and technical terms.
Training: 4888 AI->human paragraph pairs, 1 epochs, LoRA r=16 (QLoRA 4-bit).
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct", torch_dtype=torch.float16, device_map="auto")
model = PeftModel.from_pretrained(base, "sk1729271/humanizer-qwen2.5-0.5b-lora")
tokenizer = AutoTokenizer.from_pretrained("sk1729271/humanizer-qwen2.5-0.5b-lora")
messages = [
{"role": "system", "content": "Humanize the following text: raise sentence-length burstiness, cut formulaic transitions, keep every citation and technical term intact."},
{"role": "user", "content": "Your AI-sounding paragraph here..."},
]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=512, temperature=0.85, top_p=0.95)
print(tokenizer.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))