YAML Metadata
Warning:
The pipeline tag "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
Flan-T5 Large Fine-Tuned on EFRA Dataset
This is a fine-tuned version of Flan-T5 XL on the EFRA dataset for summarizing legal documents related to food regulations and policies.
Model Description
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.
Fine-Tuning Details
- Base Model: google/flan-t5-large
- Dataset: EFRA (a curated dataset of legal documents in the food domain)
- Objective: Summarization of legal documents
- Framework: Hugging Face Transformers
Applications
This model is suitable for:
- Summarizing legal texts in the food domain
- Extracting key information from lengthy regulatory documents
- Assisting legal professionals and food companies in understanding compliance requirements
Example Usage
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
# Load the model and tokenizer
model = AutoModelForSeq2SeqLM.from_pretrained("giuid/flan_t5_xl_summarization_v2")
tokenizer = AutoTokenizer.from_pretrained("giuid/flan_t5_xl_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)
- Downloads last month
- 6