Instructions to use NoobMoran/swedish-correctness-modernbert-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NoobMoran/swedish-correctness-modernbert-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="NoobMoran/swedish-correctness-modernbert-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("NoobMoran/swedish-correctness-modernbert-base") model = AutoModelForSequenceClassification.from_pretrained("NoobMoran/swedish-correctness-modernbert-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Swedish grammaticality scorer
This 149.6M-parameter model scores written Swedish on a scale from 0 to 1. It fine-tunes AI Sweden's ModernBERT-base with score and error-position supervision and distills the passage-level probabilities of a ModernBERT-large teacher. The LoRA weights are merged into the checkpoint.
The model emits a single logit. Apply sigmoid to obtain the score. The submission's predictor uses 128-token windows with overlap for longer passages and aggregates the mean and minimum window scores. The token auxiliary head was used in training and is separate from the released inference weights.
| Test | Samples | Spearman | ROC-AUC |
|---|---|---|---|
| Assignment public test | 120 | 0.824 | 0.958 |
| DaLAJ held-out test | 4,363 | 0.741 | 0.934 |
The model is intended for research on Swedish grammaticality. Its numerical scores are approximate, especially for isolated spelling or punctuation errors. The training scores are heuristic targets derived from labels and error types.
The released weights modify the AI Sweden ModernBERT-base checkpoint. The teacher uses AI Sweden ModernBERT-large. Both upstream models are released under Apache 2.0. This repository includes the Apache license.
- Downloads last month
- 21
Model tree for NoobMoran/swedish-correctness-modernbert-base
Base model
answerdotai/ModernBERT-base