1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4name = "Flaglab/ESNLIR-AL-BERTIN-NegE"
5tok = AutoTokenizer.from_pretrained(name)
6model = AutoModelForSequenceClassification.from_pretrained(name)
7
8inputs = tok("se pueden retener 10 pasaportes alemanes al mismo tiempo",
9 "estos pasaportes son válidos por solo 6 años",
10 return_tensors="pt", truncation=True, max_length=256)
11with torch.no_grad():
12 logits = model(**inputs).logits
13print(model.config.id2label[int(logits.argmax(-1))])
The bundled tokenizer is an unmodified copy of the one from
bertin-project/bertin-roberta-base-spanish; its vocabulary matches this model's embedding
table exactly.
Full round-by-round metrics and the exact pool indices acquired at each step are published at
Flaglab/esnlir-al-trajectories.
1@InProceedings{ortiz2026activelearningspanishnli,
2 author = {Ortiz, Diego and Portela, Johan R. and Manrique, Ruben},
3 title = {Active Learning for Spanish Natural Language Inference
4 on a Heterogeneous Multi-Domain Corpus},
5 booktitle = {Advances in Artificial Intelligence -- IBERAMIA 2026},
6 year = {2026},
7 publisher = {Springer Nature Switzerland},
8 address = {Cham},
9 note = {To appear},
10}
The corpus is ESNLIR (
Portela, Pérez-Terán & Manrique, 2026),
a separate project with its own code and paper.