CoolFace
Modelpublic

gplsi/Aitana-tourism-mb-encoder-1.0

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
0likes20downloads
Model Card

Aitana-Tourism-Encoder (Spanish & Valencian)

A ModernBERT-base model continually pretrained on tourism domain data in Spanish and Valencian. This specialized encoder model is optimized for understanding tourism-related texts, including hotel descriptions, destination guides, travel services, and cultural heritage content.

Table of Contents

Model Description

AttributeValue
Base ModelBSC-LT/MrBERT
ArchitectureFlexBERT (22 layers, 768 hidden, 12 heads)
Parameters~149M
Vocabulary Size256,000 tokens
Max Sequence Length8,192 tokens
LanguagesSpanish (es), Valencian (va)
DomainTourism

Training Data

This model was trained on the gplsi/alia_tourism dataset, filtered for Spanish and Valencian languages.

Dataset Statistics

MetricValue
Total Documents66,548
Spanish Documents49,644 (74.6%)
Valencian Documents16,904 (25.4%)
Raw Text Size1.2 GB
Training Samples80,839
Validation Samples8,862
Total Tokens (Train)~348 million
Tokens Seen (4 epochs)~1.39 billion

Data Processing Pipeline

  1. 1.Download: Extracted from gplsi/alia_tourism HuggingFace dataset
  2. 2.Filtering: Selected only language=["es", "va"] subsets
  3. 3.Tokenization: BPE tokenization with MrBERT tokenizer (256k vocab)
  4. 4.Chunking: Packed into 8,192-token sequences
  5. 5.Split: 90% train / 10% validation

Training Configuration

ParameterValue
Training Epochs4
Sequence Length8,192
MLM Probability30% (train), 15% (eval)
Batch Size32
Learning Rate5e-5 (cosine decay to 5e-6)
Warmup101 batches (1%)
OptimizerStableAdamW
Precisionbfloat16
Hardware1× NVIDIA RTX 4090

Training Results

EpochTraining LossMasked Accuracy
12.84 → 1.3080.64% → 84.39%
21.07 → 1.0585.67%
30.92 → 1.2686.11%
Final1.2686.11%

Key Achievements

  • —✅ 87% loss reduction (9.4 → 1.26)
  • —✅ +5.5 pp accuracy gain (80.6% → 86.1%)
  • —✅ No overfitting observed
  • —✅ Stable gradients throughout training

Intended Uses

Primary Use Cases

  • —Tourism NLP: Named entity recognition, text classification, sentiment analysis for tourism content
  • —Semantic Search: Document retrieval and similarity for travel-related queries
  • —Information Extraction: Extracting entities like hotels, destinations, amenities
  • —Multilingual Tourism: Processing Spanish and Valencian tourism texts

Out-of-Scope Uses

  • —General-purpose language understanding outside tourism domain
  • —Languages other than Spanish and Valencian
  • —Text generation (this is an encoder-only model)

Limitations

  • —Domain-specific: Performance may degrade on non-tourism texts
  • —Language coverage: Optimized for Spanish (es) and Valencian (va) only
  • —Encoder-only: Cannot generate text, only encode/understand

Ethical Considerations

The training data is automatically curated from tourism sources and may contain:

  • —Geographic and cultural biases toward specific regions
  • —Commercial content from tourism businesses
  • —Limited representation of certain destinations or services

Users should evaluate the model's outputs for fairness and bias in their specific applications.

How to Use

Transformers

python
from transformers import AutoModelForMaskedLM, AutoTokenizer

model = AutoModelForMaskedLM.from_pretrained("gplsi/Aitana-tourism-mb-encoder-1.0")
tokenizer = AutoTokenizer.from_pretrained("gplsi/Aitana-tourism-mb-encoder-1.0")

# Fill-mask example
text = "El hotel ofrece vistas [MASK] al mar Mediterráneo."
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)

# Get predictions
import torch
mask_token_index = (inputs.input_ids == tokenizer.mask_token_id).nonzero(as_tuple=True)[1]
predicted_token_id = outputs.logits[0, mask_token_index].argmax(axis=-1)
print(tokenizer.decode(predicted_token_id))

For Embeddings

python
from transformers import AutoModel, AutoTokenizer
import torch

model = AutoModel.from_pretrained("gplsi/Aitana-tourism-mb-encoder-1.0")
tokenizer = AutoTokenizer.from_pretrained("gplsi/Aitana-tourism-mb-encoder-1.0")

text = "Descubre las playas de la Costa Blanca"
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True)

with torch.no_grad():
    outputs = model(**inputs)
    embeddings = outputs.last_hidden_state.mean(dim=1)  # Mean pooling

Evaluation

This model was evaluated using the GLUE and SuperGLUE benchmarks.

SuiteTask/MetricSeedsScores by seedMean +/- std
GLUECoLA MCC419: 7.05, 8364: 8.50, 717: 12.39, 10536: 11.779.93 +/- 2.57
GLUEMNLI acc119: 65.2665.26
GLUEMNLI-mm acc119: 65.6965.69
GLUEMRPC F1519: 74.46, 8364: 73.59, 717: 70.83, 10536: 73.16, 90166: 73.7473.16 +/- 1.38
GLUEQNLI acc119: 63.4463.44
GLUEQQP F1119: 78.9778.97
GLUERTE acc519: 49.10, 8364: 48.38, 717: 52.71, 10536: 53.43, 90166: 50.1850.76 +/- 2.22
GLUESST-2 acc319: 80.39, 8364: 80.28, 717: 80.7380.47 +/- 0.24
GLUESTS-B Spearman519: 29.77, 8364: 24.73, 717: 28.84, 10536: 25.05, 90166: 29.5527.59 +/- 2.49
SuperGLUE partialMNLI acc119: 66.3966.39
SuperGLUE partialMNLI-mm acc119: 67.4867.48
SuperGLUE partialRTE acc519: 52.35, 8364: 48.01, 717: 53.79, 10536: 54.87, 90166: 50.5451.91 +/- 2.72
SuperGLUE partialBoolQ acc323: 64.80, 42: 64.68, 6033: 65.7565.08 +/- 0.59
SuperGLUE partialCB acc323: 71.43, 42: 71.43, 6033: 69.6470.83 +/- 1.03
SuperGLUE partialCB F1323: 59.05, 42: 49.89, 6033: 58.9255.95 +/- 5.25
SuperGLUE partialCOPA acc523: 54.00, 42: 48.00, 6033: 47.00, 1337: 53.00, 24: 49.0050.20 +/- 3.11
SuperGLUE partialSWAG acc119: 27.5527.55
SuperGLUE partialWiC acc323: 57.21, 42: 57.84, 6033: 57.3757.47 +/- 0.33

Additional Information

Author

The model has been developed by the Language and [Information Systems Group (GPLSI)](https://gplsi.dlsi.ua.es/) and the [Centro de Inteligencia Digital (CENID)](https://cenid.es), both part of the [University of Alicante (UA)](https://www.ua.es/es/), as part of their ongoing research in Natural Language Processing (NLP).

Funding

This work is funded by the Ministerio para la Transformación Digital y de la Función Pública, co-financed by the EU – NextGenerationEU, within the framework of the project Desarrollo de Modelos ALIA.

Acknowledgments

We would like to express our gratitude to all individuals and institutions that have contributed to the development of this work.

Special thanks to:

We also acknowledge the financial, technical, and scientific support of the Ministerio para la Transformación Digital y de la Función Pública - Funded by EU – NextGenerationEU within the framework of the project Desarrollo de Modelos ALIA, whose contribution has been essential to the completion of this research.

License

This model is released under the Apache License 2.0.

Disclaimer

This model is intended for general purposes and is available under a permissive Apache License 2.0. Be aware that the model may have biases and/or undesirable outputs. Users deploying systems based on this model are responsible for mitigating risks and complying with applicable AI regulations.

Reference

If you use this model, please cite:

bibtex
@misc{modernbert-tourism-2025,
  author = {Yáñez-Romero, Fabio and Sepúlveda-Torres, Robiert and Estevanell-Valladares, Ernesto L. and Galeano, Santiago and Martínez-Murillo, Iván and Grande, Eduardo and Canal-Esteve, Miquel and Miró Maestre, María and Bonora, Mar and Gutierrez, Yoan and Abreu Salas, José Ignacio and Consuegra-Ayala, Juan Pablo and Lloret, Elena and Montoyo, Andrés and Muñoz-Guillena and Palomar, Manuel},
  title = {Aitana Tourism Encoder: Domain-Adapted Language Model for Spanish and Valencian Tourism},
  year = {2025},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/gplsi/Aitana-tourism-mb-encoder-1.0}}
}

Copyright © 2025 Language and Information Systems Group (GPLSI) and Centro de Inteligencia Digital (CENID), University of Alicante (UA). Distributed under the Apache License 2.0.