Downloads · 30 days
22
9% of all-time downloads
vatsal18/multi-lang_summay
multi-lang_summay is a summarization model from vatsal18. Use it when you need a shorter version of a longer text. It is set up for transformers. The card lists the license as apache-2.0.
Fine-tuned seq2seq model for multilingual abstractive summarization.
Downloads · 30 days
22
9% of all-time downloads
All-time downloads
255
Public
Parameters
582M
2.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.3 GB · 99%
From the Hugging Face model README
Fine-tuned seq2seq model for multilingual abstractive summarization.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
import torch
repo_id = "vatsal18/multi-lang_summay"
tok = AutoTokenizer.from_pretrained(repo_id)
mdl = AutoModelForSeq2SeqLM.from_pretrained(repo_id).eval()
text = "Paste any article (any supported language) here."
enc = tok(text, return_tensors="pt", truncation=True, max_length=1024)
with torch.no_grad():
out = mdl.generate(**enc, max_new_tokens=128, num_beams=4, length_penalty=0.8)
print(tok.decode(out[0], skip_special_tokens=True))