Downloads · 30 days
14
10% of all-time downloads
giuid/flan_t5_large_summarization_v2
flan_t5_large_summarization_v2 is a text generation model from giuid. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
This is a fine-tuned version of Flan-T5 Large on the EFRA dataset for summarizing legal documents related to food regulations and policies.
Downloads · 30 days
14
10% of all-time downloads
All-time downloads
141
Public
Parameters
783M
3.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.1 GB · 100%
From the Hugging Face model README
This is a fine-tuned version of Flan-T5 Large on the EFRA dataset for summarizing legal documents related to food regulations and policies.
Flan-T5 is a sequence-to-sequence model trained for text-to-text tasks. This fine-tuned version is specifically optimized for summarizing legal text in the domain of food legislation, regulatory requirements, and compliance documents.
This model is suitable for:
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
# Load the model and tokenizer
model = AutoModelForSeq2SeqLM.from_pretrained("giuid/flan_t5_large_summarization_v2")
tokenizer = AutoTokenizer.from_pretrained("giuid/flan_t5_large_summarization_v2")
# Input text
input_text = "Your lengthy legal document text here..."
# Tokenize and generate summary
inputs = tokenizer(input_text, return_tensors="pt", max_length=512, truncation=True)
outputs = model.generate(inputs.input_ids, max_length=150, num_beams=5, early_stopping=True)
# Decode summary
summary = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(summary)