Downloads · 30 days
12
13% of all-time downloads
sch-ai/titlebreaker-lora-adapter
titlebreaker-lora-adapter is a text generation model from sch-ai. Use it when you need the model to write or continue text. It is set up for peft.
This is a LoRA (Low-Rank Adaptation) adapter for the Qwen3-0.6B model, fine-tuned for title cleaning tasks.
Downloads · 30 days
12
13% of all-time downloads
All-time downloads
93
Public
Repo size
36.7 MB
Likes
0
Public
Click a slice to open those files.
.safetensors36.7 MB · 100%
From the Hugging Face model README
This is a LoRA (Low-Rank Adaptation) adapter for the Qwen3-0.6B model, fine-tuned for title cleaning tasks.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-0.6B")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-0.6B")
# Load and apply the LoRA adapter
model = PeftModel.from_pretrained(base_model, "sch-ai/titlebreaker-lora-adapter")
# Generate clean title
def clean_title(dirty_title, max_length=200):
prompt = f"<title_clean> "
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(
**inputs,
max_length=max_length,
do_sample=True,
temperature=0.7,
pad_token_id=tokenizer.eos_token_id
)
generated = tokenizer.decode(outputs[0], skip_special_tokens=True)
# Extract the clean title from between the tags
if "</title_clean>" in generated:
clean_title = generated.split("</title_clean>")[0].split("<title_clean>")[-1].strip()
return clean_title
return generated
# Example usage
dirty_title = "Your dirty title here"
clean_result = clean_title(dirty_title)
print(f"Clean title: {clean_result}")