Downloads · 30 days
9
17% of all-time downloads
Abdennour07/SmartReport-T5-base-LoRA-GovReport
SmartReport-T5-base-LoRA-GovReport is a summarization model from Abdennour07. 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.
SmartReport is a fine-tuned T5-base model designed to generate concise summaries of long-form urban governance reports. It was trained using LoRA (Low-Rank Adaptation) to handle the high-complexity and domain-specific…
Downloads · 30 days
9
17% of all-time downloads
All-time downloads
52
Public
Repo size
22.3 MB
Likes
0
Public
Click a slice to open those files.
.pt14.4 MB · 48%
From the Hugging Face model README
SmartReport is a fine-tuned T5-base model designed to generate concise summaries of long-form urban governance reports. It was trained using LoRA (Low-Rank Adaptation) to handle the high-complexity and domain-specific vocabulary of urban planning, transportation, and public infrastructure documents.
Standard summarization models often struggle with the extreme length and technical jargon of government reports. SmartReport addresses this by focusing on a cleaned, urban-centric subset of the GovReport dataset, ensuring the model remains grounded in city-related themes like zoning, transit, and housing.
The model was trained on a specialized subset of ccdv/govreport-summarization (GAO/CRS reports).
The dataset was filtered to ensure relevance to urban development:
To optimize memory usage and training efficiency, the model utilizes Parameter-Efficient Fine-Tuning (PEFT).
from peft import PeftModel, PeftConfig
from transformers import T5ForConditionalGeneration, T5Tokenizer
model_id = "YOUR_HF_USERNAME/SmartReport" # Update with your path
config = PeftConfig.from_pretrained(model_id)
base_model = T5ForConditionalGeneration.from_pretrained(config.base_model_name_or_path)
model = PeftModel.from_pretrained(base_model, model_id)
tokenizer = T5Tokenizer.from_pretrained(config.base_model_name_or_path)
def generate_summary(text):
inputs = tokenizer("summarize: " + text, return_tensors="pt", max_length=1024, truncation=True)
outputs = model.generate(**inputs, max_new_tokens=512, length_penalty=2.0, num_beams=4)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
# Example Usage
report_text = "The city's transit expansion project aims to..."
print(generate_summary(report_text))