Downloads · 30 days
6
17% of all-time downloads
lucianoon/t5-small-lora-tweetsumm
t5-small-lora-tweetsumm is a summarization model from lucianoon. Use it when you need a shorter version of a longer text. It is set up for peft. The card lists the license as mit.
LoRA adapter (rank 4, α=16, rsLoRA) fine-tuned on customer service dialogues from the TweetSumm dataset. Only 0.24% of parameters (147K of 60M) are trained.
Downloads · 30 days
6
17% of all-time downloads
All-time downloads
36
Public
Repo size
600 KB
Likes
0
Public
Click a slice to open those files.
.json2.4 MB · 80%
From the Hugging Face model README
LoRA adapter (rank 4, α=16, rsLoRA) fine-tuned on customer service dialogues from the TweetSumm dataset. Only 0.24% of parameters (147K of 60M) are trained.
from peft import PeftModel
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
base = AutoModelForSeq2SeqLM.from_pretrained("google-t5/t5-small")
model = PeftModel.from_pretrained(base, "lucianoon/t5-small-lora-tweetsumm")
tokenizer = AutoTokenizer.from_pretrained("google-t5/t5-small")
dialogue = "Customer: I need to cancel order #12345.\nAgent: Done! Refund in 3-5 days."
inputs = tokenizer("summarize: " + dialogue, return_tensors="pt", truncation=True, max_length=512)
outputs = model.generate(**inputs, max_new_tokens=48)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
| Setting | Value |
|---|---|
| Base model | google-t5/t5-small |
| LoRA rank / α | 4 / 16 (rsLoRA) |
| Target modules | q, v |
| Trainable params | 147,456 (0.24%) |
| Train samples | 300 (TweetSumm) |
| Epochs / LR | 3 / 1e-3 |
Rank-4 was selected via ablation over r ∈ {4, 8, 16, 32} — see the GitHub repository for the full study (ROUGE-L 0.357 on the reference run).