Description:
A fine-tuned T5-base model quantized to FP16 for generating concise summaries from short text inputs, guided by a user-specified keyword. Trained on a custom dataset of 200 examples, it produces summaries focusing on the keyword while maintaining a professional tone.
keyword:
Single word or short phrase guiding the summary
output:
Target summary (1-2 sentences)
Content:
Diverse topics including tech, weather, sports, health, and culture (e.g., "A new laptop was released with a fast processor... Keyword: processor" → "The new laptop has a fast processor.")
Language:
English
Training Procedure
Framework:
PyTorch via Hugging Face Transformers
Hyperparameters:
Epochs:
2 (stopped early; originally set for 3)
Learning Rate:
3e-4
Batch Size:
4 (effective 8 with gradient accumulation)
Qualitative Evaluation:
Generates concise, keyword-focused summaries with good coherence (e.g., "The concert featured a famous singer" for keyword "singer").
Intended Use
Purpose: Summarize short texts (e.g., news snippets, reports) based on a user-specified keyword.
Use Case: Quick summarization for journalists, researchers, or content creators needing keyword-driven insights.
Out of Scope: Not designed for long documents (>128 tokens) or abstractive summarization without keywords.
Usage Instructions
Requirements
Python 3.8+
Libraries: transformers, torch, pandas
GPU with FP16 support (e.g., NVIDIA with ~1.5 GB VRAM free)
Example Code
from transformers import T5ForConditionalGeneration, T5Tokenizer
# Load model and tokenizer
model = T5ForConditionalGeneration.from_pretrained("./t5_summary_finetuned_final_fp16").to("cuda")
tokenizer = T5Tokenizer.from_pretrained("./t5_summary_finetuned_final_fp16")
# Generate summary
text = "A new laptop was released with a fast processor and sleek design. It’s popular among gamers."
keyword = "processor"
input_text = f"{text} Keyword: {keyword}"
inputs = tokenizer(input_text, max_length=128, truncation=True, padding="max_length", return_tensors="pt").to("cuda")
outputs = model.generate(input_ids=inputs["input_ids"], attention_mask=inputs["attention_mask"].to(torch.float16), max_length=128, num_beams=4, early_stopping=True, no_repeat_ngram_size=2)
summary = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(summary) # Expected: "The new laptop has a fast processor."
Runs of AventIQ-AI T5_keyword_based_summarizer on huggingface.co
13
Total runs
-1
24-hour runs
-2
3-day runs
-2
7-day runs
3
30-day runs
More Information About T5_keyword_based_summarizer huggingface.co Model
T5_keyword_based_summarizer huggingface.co
T5_keyword_based_summarizer huggingface.co is an AI model on huggingface.co that provides T5_keyword_based_summarizer's model effect (), which can be used instantly with this AventIQ-AI T5_keyword_based_summarizer model. huggingface.co supports a free trial of the T5_keyword_based_summarizer model, and also provides paid use of the T5_keyword_based_summarizer. Support call T5_keyword_based_summarizer model through api, including Node.js, Python, http.
T5_keyword_based_summarizer huggingface.co is an online trial and call api platform, which integrates T5_keyword_based_summarizer's modeling effects, including api services, and provides a free online trial of T5_keyword_based_summarizer, you can try T5_keyword_based_summarizer online for free by clicking the link below.
AventIQ-AI T5_keyword_based_summarizer online free url in huggingface.co:
T5_keyword_based_summarizer is an open source model from GitHub that offers a free installation service, and any user can find T5_keyword_based_summarizer on GitHub to install. At the same time, huggingface.co provides the effect of T5_keyword_based_summarizer install, users can directly use T5_keyword_based_summarizer installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
T5_keyword_based_summarizer install url in huggingface.co: