Downloads · 30 days
9
8% of all-time downloads
Moryjj/simplification-legal-text
simplification-legal-text is a machine learning model from Moryjj. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
This model is part of the first benchmark for Persian legal text simplification. It fine-tunes the ParsT5-base encoder-decoder model with Unlimiformer extension to handle long legal documents efficiently—without trunc…
Downloads · 30 days
9
8% of all-time downloads
All-time downloads
115
Public
Parameters
248M
990 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors990 MB · 100%
From the Hugging Face model README
This model is part of the first benchmark for Persian legal text simplification. It fine-tunes the ParsT5-base encoder-decoder model with Unlimiformer extension to handle long legal documents efficiently—without truncation.
🔗 Project GitHub: mrjoneidi/Simplification-Legal-Texts
Ahmad/parsT5-basefrom transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model = AutoModelForSeq2SeqLM.from_pretrained("mrjoneidi/parsT5-legal-simplification")
tokenizer = AutoTokenizer.from_pretrained("mrjoneidi/parsT5-legal-simplification")
input_text = "دادگاه با بررسی مدارک موجود، حکم به رد دعوی صادر مینماید..."
inputs = tokenizer(input_text, return_tensors="pt", truncation=True)
output_ids = model.generate(**inputs, max_new_tokens=512)
simplified = tokenizer.decode(output_ids[0], skip_special_tokens=True)
print(simplified)