Instructions to use sk1729271/humanizer-qwen2.5-0.5b-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use sk1729271/humanizer-qwen2.5-0.5b-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct") model = PeftModel.from_pretrained(base_model, "sk1729271/humanizer-qwen2.5-0.5b-lora") - Notebooks
- Google Colab
- Kaggle
Humanizer LoRA (humanizer-qwen2.5-0.5b-lora)
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).
Usage
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))
- Downloads last month
- 22