Summarization Model
This is a summarization model fine-tuned on a custom dataset. It is based on the allenai/led-base-16384 model.
Model Details
- Model type: Longformer-Encoder-Decoder (LED)
- Base model:
allenai/led-base-16384 - Language: English
- License: apache-2.0
Training Data
The model was fine-tuned on a custom dataset for summarization. The dataset is a CSV file containing two columns: article and summary.
Training Procedure
The model was trained using the Hugging Face transformers library. The training script uses the Seq2SeqTrainer to fine-tune the model. The training arguments are as follows:
| Argument | Value |
|---|---|
num_train_epochs |
3 |
per_device_train_batch_size |
1 |
gradient_accumulation_steps |
8 |
per_device_eval_batch_size |
4 |
warmup_steps |
500 |
weight_decay |
0.01 |
logging_steps |
5 |
eval_strategy |
epoch |
save_strategy |
epoch |
generation_max_length |
256 |
How to Use
from transformers import AutoTokenizer, LEDForConditionalGeneration
model_name = "SeifElden2342532/children_educational_summarizer"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = LEDForConditionalGeneration.from_pretrained(model_name)
Text = "..."
inputs = tokenizer(Text, return_tensors="pt")
# Generate Summary
summary_ids = model.generate(inputs["input_ids"], num_beams=4, max_length=500, early_stopping=True)
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True, clean_up_tokenization_spaces=False)
print(summary)
Disclaimer
This model is part of the 3YNO project, an educational application targeting dyslexics and visual learners. It allows uploading a book/research/text content, then converting it into an explanatory video using artificial intelligence after extracting the scientific content from that content and converting it into a story or a narrative, then creating the characters.
GitHub Repository: https://github.com/SeifEldenOsama/3YNO/tree/main/models/model1(Summarizer)
- Downloads last month
- 32