How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
# Warning: Pipeline type "summarization" is no longer supported in transformers v5.
# You must load the model directly (see below) or downgrade to v4.x with:
# 'pip install "transformers<5.0.0'
from transformers import pipeline

pipe = pipeline("summarization", model="m3hrdadfi/bert2bert-fa-wiki-summary")
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("m3hrdadfi/bert2bert-fa-wiki-summary")
model = AutoModelForSeq2SeqLM.from_pretrained("m3hrdadfi/bert2bert-fa-wiki-summary")
Quick Links

A Bert2Bert model on the Wiki Summary dataset to summarize articles. The model achieved an 8.47 ROUGE-2 score.

For more detail, please follow the Wiki Summary repo.

Eval results

The following table summarizes the ROUGE scores obtained by the Bert2Bert model.

% Precision Recall FMeasure
ROUGE-1 28.14 30.86 27.34
ROUGE-2 07.12 08.47* 07.10
ROUGE-L 28.49 25.87 25.50

Questions?

Post a Github issue on the Wiki Summary repo.

Downloads last month
7
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support