Instructions to use Rahvusarhiiv/fi_summariser with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rahvusarhiiv/fi_summariser 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="Rahvusarhiiv/fi_summariser")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Rahvusarhiiv/fi_summariser") model = AutoModelForSeq2SeqLM.from_pretrained("Rahvusarhiiv/fi_summariser", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download README.md from Rahvusarhiiv/fi_summariser: direct link, hf CLI and curl.
- Browser
- Download file 7.5 kB
-
https://huggingface.co/Rahvusarhiiv/fi_summariser/resolve/main/README.md
- Command line
-
hf download hf://Rahvusarhiiv/fi_summariser/README.md
-
curl -L -o README.md https://huggingface.co/Rahvusarhiiv/fi_summariser/resolve/main/README.md
language:
- fi
license: other
license_name: research-use-mixed-upstream-data
library_name: transformers
pipeline_tag: summarization
base_model: facebook/mbart-large-50-many-to-many-mmt
base_model_relation: finetune
tags:
- summarization
- mbart50
- low-resource
- research
- rahvusarhiiv
datasets:
- MultiSynt/finepdfs-summaries
widget:
- text: >-
Tampereen yliopistollinen sairaala on ottanut käyttöön uuden
toimintatavan, jossa osa lapsipotilaista voi saada antibioottihoitoa
kotona pumpun avulla. Hoitajan käynti kotona riittää vaihtamaan liuoksen
kerran päivässä.
example_title: Finnish example
model-index:
- name: fi_summariser
results:
- task:
type: summarization
name: Summarization
dataset:
name: News-supported v2 automatic (news_supported_fi)
type: news_supported_fi
metrics:
- name: ROUGE-L F1
type: rougeL
value: 0.220905
- name: ROUGE-1 F1
type: rouge1
value: 0.247424
- name: ROUGE-2 F1
type: rouge2
value: 0.140372
- name: Reference content-token coverage
type: reference_content_token_coverage
value: 0.251355
- name: Prediction source-token precision
type: prediction_source_content_token_precision
value: 0.856321
- task:
type: summarization
name: Summarization
dataset:
name: Wiki4 final automatic (wiki4_fi)
type: wiki4_fi
metrics:
- name: ROUGE-L F1
type: rougeL
value: 0.366326
- name: ROUGE-1 F1
type: rouge1
value: 0.406531
- name: ROUGE-2 F1
type: rouge2
value: 0.287837
- name: Reference content-token coverage
type: reference_content_token_coverage
value: 0.393669
- name: Prediction source-token precision
type: prediction_source_content_token_precision
value: 0.882327
- task:
type: summarization
name: Summarization
dataset:
name: GDELT final automatic (gdelt_fi)
type: gdelt_fi
metrics:
- name: ROUGE-L F1
type: rougeL
value: 0.115699
- name: ROUGE-1 F1
type: rouge1
value: 0.134681
- name: ROUGE-2 F1
type: rouge2
value: 0.044392
- name: Reference content-token coverage
type: reference_content_token_coverage
value: 0.123194
- name: Prediction source-token precision
type: prediction_source_content_token_precision
value: 0.83086
Finnish summariser
Rahvusarhiiv/fi_summariser is an experimental Finnish summarization model fine-tuned from facebook/mbart-large-50-many-to-many-mmt.
This is a research release. It is not claimed to be state of the art; the model should be evaluated for the target domain before production use.
Intended Use
- Summarization of Finnish news, legal/administrative, encyclopedic, or academic-style text.
- Batch/offline summarization, evaluation, and retrieval-assisted workflows where outputs can be checked.
- Not intended as a sole source of factual truth, legal advice, medical advice, or archival description without human review.
How to Use
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
repo_id = "Rahvusarhiiv/fi_summariser"
text = "Tampereen yliopistollinen sairaala on ottanut käyttöön uuden toimintatavan, jossa osa lapsipotilaista voi saada antibioottihoitoa kotona pumpun avulla. Hoitajan käynti kotona riittää vaihtamaan liuoksen kerran päivässä."
tokenizer = AutoTokenizer.from_pretrained(repo_id, src_lang="fi_FI")
model = AutoModelForSeq2SeqLM.from_pretrained(repo_id)
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=768)
language_token_id = tokenizer.convert_tokens_to_ids("fi_FI")
summary_ids = model.generate(
**inputs,
forced_bos_token_id=language_token_id,
max_new_tokens=512, num_beams=4, no_repeat_ngram_size=3,
)
print(tokenizer.batch_decode(summary_ids, skip_special_tokens=True)[0])
Recommended Generation Settings
max_new_tokens:512num_beams:4no_repeat_ngram_size:3
Training Data
Fine-tuned from mBART-50 on a rebalanced Finnish mix: Yle news/RSS/archive rows, Theseus theses, filtered synthetic FinePDFs summaries, and downweighted EurLex/legal data. The Yle archive benchmark rows were explicitly removed from training before this checkpoint was trained.
- Yle RSS and archive articles collected locally; held-out Yle archive benchmark rows excluded from training.
- Theseus thesis metadata/abstract examples.
- Filtered subset of MultiSynt/finepdfs-summaries.
- Finnish EurLex/legal examples after summary-section extraction and boilerplate filtering.
Known public Hub datasets used or partially used where applicable:
Training metadata:
- Base/initial model recorded by trainer:
facebook/mbart-large-50-many-to-many-mmt - Train rows:
2741 - Validation rows:
246 - Max source tokens:
768 - Max target tokens:
512 - Seed:
20260611
Evaluation
| benchmark | n | ROUGE-L | ROUGE-1 | ROUGE-2 | ref coverage | src precision | judge factuality | judge coverage | judge overall | words | repeat 4g | legalese | max hit |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| News-supported v2 automatic | 253 | 0.221 | 0.247 | 0.140 | 0.251 | 0.856 | 26.1 | 0.0000 | 0.0000 | 0.0000 | |||
| Wiki4 final automatic | 100 | 0.366 | 0.407 | 0.288 | 0.394 | 0.882 | 53.9 | 0.0000 | 0.0000 | 0.0000 | |||
| GDELT final automatic | 100 | 0.116 | 0.135 | 0.044 | 0.123 | 0.831 | 23.4 | 0.0000 | 0.0000 | 0.0000 |
The automatic metrics include ROUGE, coverage proxies, repetition and artifact checks. The judge metrics use a local Ollama LLM judge on sampled examples and should be treated as comparative, not absolute.
Limitations and Failure Modes
- The model can hallucinate or over-generalize details, especially when the input is long or under-specified.
- Named entities, numbers, dates, and legal references should be verified against the source.
- Some evaluation datasets reward lead-like summaries; performance may differ on non-news or conversational text.
- The training data mixes sources with different writing styles and upstream terms; users are responsible for checking suitability for their use case.
- This is the no-leak Finnish archive-balanced checkpoint; the earlier archive-v1 benchmark score should not be used because it had held-out benchmark leakage.
Bias, Risks, and Ethical Considerations
The model reflects the distributions and editorial choices of its source corpora. It may reproduce biases present in news, legal, academic, or synthetic summaries. Human review is recommended for public-facing summaries and high-impact decisions.
CO2 Emissions
Training emissions were not instrumented with CodeCarbon or an equivalent tracker. No numeric CO2 estimate is reported. Training was local fine-tuning of an mBART-50 checkpoint rather than pretraining from scratch.
Model Tree
- Base model:
facebook/mbart-large-50-many-to-many-mmt - Relationship: fine-tuned sequence-to-sequence summarization checkpoint.
License
The model card uses license: other because the training mix contains multiple upstream data sources with different terms. Treat this as a research-use release and verify upstream data/license constraints before redistribution or commercial use.