Gabriel/xsum_swe
Viewer • Updated • 227k • 132
How to use Gabriel/bart-base-cnn-xsum-swe with Transformers:
# 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="Gabriel/bart-base-cnn-xsum-swe") # Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("Gabriel/bart-base-cnn-xsum-swe")
model = AutoModelForSeq2SeqLM.from_pretrained("Gabriel/bart-base-cnn-xsum-swe")# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("Gabriel/bart-base-cnn-xsum-swe")
model = AutoModelForSeq2SeqLM.from_pretrained("Gabriel/bart-base-cnn-xsum-swe")This model is a fine-tuned version of Gabriel/bart-base-cnn-swe on the None dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Rouge1 | Rouge2 | Rougel | Rougelsum | Gen Len |
|---|---|---|---|---|---|---|---|---|
| 2.3076 | 1.0 | 6375 | 2.1986 | 29.7041 | 10.9883 | 24.2149 | 24.2406 | 19.7193 |
| 2.0733 | 2.0 | 12750 | 2.1246 | 30.4521 | 11.8107 | 24.9519 | 24.9745 | 19.6592 |
| 1.8933 | 3.0 | 19125 | 2.0989 | 30.9407 | 12.2682 | 25.4135 | 25.4378 | 19.7195 |
| 1.777 | 4.0 | 25500 | 2.1027 | 30.9467 | 12.2589 | 25.4487 | 25.4792 | 19.7379 |
# 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="Gabriel/bart-base-cnn-xsum-swe")