Downloads · 30 days
11
0% of all-time downloads
krotima1/mbart-at2h-cs
mbart-at2h-cs is a machine learning model from krotima1. 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. The card lists the license as apache-2.0.
This model is a fine-tuned checkpoint of facebook/mbart-large-cc25 on the Czech news dataset to produce Czech abstractive summaries. The model deals with the task Abstract + Text to Headline (AT2H) which consists in g…
Downloads · 30 days
11
0% of all-time downloads
All-time downloads
3.4K
Public
Repo size
4.9 GB
Likes
1
Public
Click a slice to open those files.
.bin2.4 GB · 100%
From the Hugging Face model README
This model is a fine-tuned checkpoint of facebook/mbart-large-cc25 on the Czech news dataset to produce Czech abstractive summaries.
The model deals with the task Abstract + Text to Headline (AT2H) which consists in generating a one- or two-sentence summary considered as a headline from a Czech news text.
The model has been trained on a large Czech news dataset developed by a concatenation of two datasets, the private CNC dataset provided by Czech News Center and SumeCzech dataset. The dataset includes around 1.75M Czech news-based documents consisting of a Headline, Abstract, and Full-text sections. Truncation and padding were set to 512 tokens for the encoder and 64 for the decoder.
The model has been trained on 1x NVIDIA Tesla A100 40GB for 40 hours, 1x NVIDIA Tesla V100 32GB for 20 hours, and 4x NVIDIA Tesla A100 40GB for 20 hours. During training, the model has seen 7936K documents corresponding to roughly 5 epochs.
Assuming that you are using the provided Summarizer.ipynb file.
def summ_config():
cfg = OrderedDict([
# summarization model - checkpoint from website
("model_name", "krotima1/mbart-at2h-cs"),
("inference_cfg", OrderedDict([
("num_beams", 4),
("top_k", 40),
("top_p", 0.92),
("do_sample", True),
("temperature", 0.89),
("repetition_penalty", 1.2),
("no_repeat_ngram_size", None),
("early_stopping", True),
("max_length", 64),
("min_length", 10),
])),
#texts to summarize
("text",
[
"Input your Czech text",
]
),
])
return cfg
cfg = summ_config()
#load model
model = AutoModelForSeq2SeqLM.from_pretrained(cfg["model_name"])
tokenizer = AutoTokenizer.from_pretrained(cfg["model_name"])
# init summarizer
summarize = Summarizer(model, tokenizer, cfg["inference_cfg"])
summarize(cfg["text"])