Downloads · 30 days
10
14% of all-time downloads
HoangQuocViet25/nlp-btl-wikilingua-x5plus2
nlp-btl-wikilingua-x5plus2 is a summarization model from HoangQuocViet25. Use it when you need a shorter version of a longer text. The card lists the license as mit.
Downloads · 30 days
10
14% of all-time downloads
All-time downloads
73
Public
Parameters
227M
910 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors910 MB · 99%
From the Hugging Face model README
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("HoangQuocViet25/nlp-btl-wikilingua-x5plus2")
net = AutoModelForSeq2SeqLM.from_pretrained("HoangQuocViet25/nlp-btl-wikilingua-x5plus2").eval()
# ViT5's own preprocessing: no task prefix, EOS appended to the raw string.
enc = tok(article.strip() + "</s>", return_tensors="pt", truncation=True, max_length=1024)
out = net.generate(**enc, num_beams=4, length_penalty=1.0, max_new_tokens=256,
early_stopping=True)
print(tok.decode(out[0], skip_special_tokens=True))