Downloads · 30 days
0
RaamBhakt2609/flan-t5-base-dialogsum-qlora
flan-t5-base-dialogsum-qlora is a machine learning model from RaamBhakt2609. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is a fine-tuned version of google/flan-t5-base on the knkarthick/dialogsum dataset.
Downloads · 30 days
0
Access
Public
Updated Aug 17, 2025
Repo size
15 MB
Likes
0
Public
Click a slice to open those files.
.safetensors15 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of google/flan-t5-base on the knkarthick/dialogsum dataset.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
from peft import PeftModel
# Load base model and tokenizer
base_model = AutoModelForSeq2SeqLM.from_pretrained("google/flan-t5-base")
tokenizer = AutoTokenizer.from_pretrained("google/flan-t5-base")
# Load the fine-tuned LoRA adapter
model = PeftModel.from_pretrained(base_model, "RaamBhakt2609/flan-t5-base-dialogsum-qlora")
# Generate summary
dialogue = "Your dialogue text here..."
input_text = f"summarize: {dialogue}"
input_ids = tokenizer(input_text, return_tensors="pt", max_length=512, truncation=True).input_ids
with torch.no_grad():
outputs = model.generate(input_ids, max_length=128, num_beams=4, early_stopping=True)
summary = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(summary)