Run this model with HF Jobs
Run Flaglab/SciBETO-base on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Flaglab/SciBETO-base. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Flaglab/SciBETO-base on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Flaglab/SciBETO-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Flaglab/SciBETO-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="Flaglab/SciBETO-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("Flaglab/SciBETO-base") model = AutoModelForMaskedLM.from_pretrained("Flaglab/SciBETO-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
SciBETO-base
SciBETO is a family of RoBERTa encoders pre-trained from scratch on Spanish scientific text, with a byte-level BPE tokenizer learned on the same corpus. To our knowledge it is the first multidisciplinary Spanish scientific encoder: previous Spanish domain encoders cover single disciplines such as biomedicine or law.
SciBETO-base is the smaller variant. At matched size (125M parameters, RoBERTa-base) it outperforms BERTIN on all three scientific benchmarks (+0.83 on Academic Knowledge, +1.56 on Banrep, +2.44 on Econ-IE; intervals separate on Banrep and Econ-IE), and it recovers most of SciBETO-large's scientific-domain performance at 35% of the parameters. General-domain performance is below SciBETO-large, especially on SQAC and ESNLIR.
- Paper: SciBETO: A Domain-Specific RoBERTa Model Trained on Spanish Scientific Texts (EACL 2027)
- Models: SciBETO-base · SciBETO-large · SciBETO-continual (ablation)
- Benchmarks: Spanish Scientific NLP Datasets
- Code: pre-training · fine-tuning and evaluation
Model details
| SciBETO-base | |
|---|---|
| Architecture | RoBERTa-base (12 layers, hidden size 768, 12 attention heads) |
| Parameters | 125M |
| Tokenizer | Byte-level BPE trained on the SciBETO corpus, 50,262 tokens (min. frequency 2) |
| Max sequence length | 512 tokens |
| Objective | Masked language modeling only (15% dynamic masking, no NSP) |
| Batch size | 2,112 sequences |
| Training steps | 140k (two stages) |
| Peak learning rate / warmup | 9e-5 / 6,250 steps, linear schedule |
| Optimizer | AdamW (β1 = 0.9, β2 = 0.98, ε = 1e-6), weight decay 0.01 |
| Hardware | 4 × NVIDIA A40 (48 GB), DDP, BF16, 11 days |
| Language | Spanish |
| Developed by | Universidad de los Andes (Bogotá, Colombia) |
See also SciBETO-large.
Pre-training data
A corpus of Spanish scientific documents from Colombian institutional repositories (CC BY-NC 4.0 documents only), the CORE open-access aggregator (filtered to Spanish), and Colombian legal collections (1.51% of words):
| Source | Documents (raw) | Documents (clean) | Words (deduplicated) | % |
|---|---|---|---|---|
| CORE API | 2,181,689 | 1,812,557 | 16,576,783,513 | 90.77 |
| Universidad Nacional de Colombia | 44,686 | 32,059 | 537,022,975 | 2.94 |
| Universidad de los Andes | 33,858 | 23,744 | 365,752,780 | 2.00 |
| Pontificia Universidad Javeriana | 25,624 | 18,760 | 323,918,445 | 1.77 |
| Colombian Constitutional Court decisions (1992–2021) | 1 | 1 | 260,947,680 | 1.43 |
| Universidad del Rosario | 22,404 | 16,031 | 183,356,109 | 1.00 |
| Colombian municipal tax statutes | 392 | 379 | 13,924,060 | 0.08 |
| Health and pension system documents | 1 | 1 | 183,773 | 0.001 |
| Total | 2,308,655 | 1,903,532 | 18,261,889,335 | 100 |
After document-level deduplication, 1.43M documents remain (18.2B words, 24.3B BPE tokens under the SciBETO tokenizer). Documents from the Colombian repositories were converted from PDF with Apache Tika and cleaned (ftfy normalization, math-symbol normalization, fastText language identification, removal of English abstracts, length filtering). Because of its size, the corpus is not hosted publicly; it is available from the authors upon request.
Tokenizer efficiency. On this corpus the SciBETO tokenizer has a fertility of 1.36 tokens per word versus 1.43 for BERTIN's (5.0% fewer tokens), and on 15,288 documents from the scientific benchmarks it produces 3.16% fewer tokens than BETO's.
Usage
from transformers import pipeline
fill = pipeline("fill-mask", model="Flaglab/SciBETO-base")
fill("La política <mask> expansiva redujo las tasas de interés.")
For fine-tuning, load it with the usual AutoModelFor... classes:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Flaglab/SciBETO-base")
model = AutoModelForSequenceClassification.from_pretrained("Flaglab/SciBETO-base", num_labels=5)
inputs = tokenizer("Texto científico en español...", truncation=True, max_length=512, return_tensors="pt")
Pass max_length=512 explicitly when truncating.
Evaluation
All encoders were fine-tuned with the same protocol: hyperparameter search on the development set (learning rate {1e-5, 2e-5, 3e-5}, batch size {16, 32}, up to 10 epochs; a single fixed configuration for ESNLIR), then five fine-tuning seeds with the selected configuration.
Scientific benchmarks (introduced with SciBETO, available here):
| Model | Params | Academic Knowledge | Banrep (EM) | Econ-IE |
|---|---|---|---|---|
| BETO | 110M | 90.06 ± 1.12 | 58.44 ± 1.09 | 51.51 ± 0.46 |
| BERTIN | 125M | 90.12 ± 0.61 | 57.39 ± 0.95 | 48.81 ± 1.15 |
| XLM-R-base | 278M | 88.51 ± 0.35 | 52.12 ± 1.73 | 51.31 ± 0.48 |
| XLM-R-large | 560M | 90.77 ± 1.06 | 58.55 ± 1.79 | 53.70 ± 0.56 |
| RigoBERTa-2.0 | 560M | 90.68 ± 0.89 | 59.27 ± 1.13 | 54.08 ± 0.80 |
| SciBETO-base | 125M | 90.95 ± 0.56 | 58.95 ± 0.33 | 51.25 ± 0.24 |
| SciBETO-large | 355M | 91.71 ± 0.41 | 59.85 ± 1.44 | 51.72 ± 1.31 |
| SciBETO-continual | 125M | 90.32 ± 0.30 | 57.79 ± 1.39 | 49.73 ± 0.80 |
General-domain Spanish benchmarks:
| Model | Params | WikiCAT | PAWS-X | SQAC | ESNLIR |
|---|---|---|---|---|---|
| BETO | 110M | 76.32 ± 0.85 | 89.61 ± 0.87 | 77.06 ± 0.84 | 68.78 ± 0.14 |
| BERTIN | 125M | 74.46 ± 0.83 | 88.44 ± 0.47 | 75.63 ± 0.58 | 66.55 ± 0.27 |
| XLM-R-base | 278M | 74.86 ± 1.28 | 90.33 ± 0.33 | 75.34 ± 0.30 | 67.85 ± 0.09 |
| XLM-R-large | 560M | 77.16 ± 0.94 | 92.13 ± 0.47 | 82.13 ± 0.43 | 72.57 ± 0.11 |
| RigoBERTa-2.0 | 560M | 78.09 ± 0.69 | 92.41 ± 0.24 | 83.73 ± 0.69 | 73.80 ± 0.05 |
| SciBETO-base | 125M | 75.34 ± 0.39 | 88.58 ± 0.52 | 71.35 ± 0.96 | 65.89 ± 0.14 |
| SciBETO-large | 355M | 76.99 ± 1.22 | 91.46 ± 0.24 | 78.26 ± 1.30 | 70.07 ± 0.13 |
| SciBETO-continual | 125M | 74.25 ± 0.59 | 88.83 ± 0.99 | 75.87 ± 0.85 | 67.48 ± 0.32 |
Mean over five fine-tuning seeds (42, 123, 456, 789, 1024) ± half-width of the 95% confidence interval (Student's t, n = 5). Metrics: macro-F1 for WikiCAT, PAWS-X, ESNLIR and Academic Knowledge; SQuAD-style F1 for SQAC; exact match for Banrep (multilabel JEL classification); entity-level micro-F1 (seqeval) for Econ-IE. Parameter counts include token embeddings. Two systems are distinguishable only when their intervals do not overlap.
Overlap note. The Universidad del Rosario repository, the source of Academic Knowledge, is part of the pre-training corpus, and 838 of its 1,253 test abstracts share at least one 13-gram with it. On the 415 test abstracts with no overlap, SciBETO-large (88.68 macro-F1) and SciBETO-base (88.40) are on par with XLM-R-large (89.23) and RigoBERTa-2.0 (87.85). All models, including those never exposed to the corpus, score about 5 points higher on the overlapping abstracts, which indicates that those abstracts are easier rather than memorized. The dataset includes the clean/overlapping flag.
Intended use and limitations
Intended use: fine-tuning for discriminative tasks on Spanish scientific and academic text, such as document classification, multilabel topic classification, NER and other token classification, and extractive QA.
Limitations:
- It is an encoder: it does not generate text.
- It is monolingual Spanish and was not evaluated on English.
- On Econ-IE, which was translated from English, it falls behind the multilingual 560M encoders, so the gains are bounded to natively Spanish scientific text.
- The corpus over-represents Colombian institutional writing (9.23% of words) and fields with strong open-access presence. CORE provides no structured discipline metadata, so the disciplinary balance of the corpus is unknown.
- Reported intervals capture fine-tuning variance only (a single pre-training run).
License
Apache 2.0.
Citation
@inproceedings{prieto2027scibeto,
title = {{SciBETO}: A Domain-Specific {RoBERTa} Model Trained on {Spanish} Scientific Texts},
author = {Prieto, Juan Camilo and Mart{\'i}nez Novoa, Santiago and Gomez, Lina and Manrique, Ruben},
booktitle = {Proceedings of the Conference of the European Chapter of the Association for Computational Linguistics (EACL 2027)},
year = {2027}
}
- Downloads last month
- 58