visolex / xlm-roberta-absa-hotel

huggingface.co
Total runs: 11
24-hour runs: 0
7-day runs: -4
30-day runs: -1
Model's Last Updated: November 02 2025

Introduction of xlm-roberta-absa-hotel

Model Details of xlm-roberta-absa-hotel

xlm-roberta-absa-hotel: Aspect-based Sentiment Analysis for Vietnamese Reviews

This model is a fine-tuned version of xlm-roberta-base on the VLSP2018-ABSA-Hotel dataset for aspect-based sentiment analysis in Vietnamese reviews.

Model Details
  • Base Model : xlm-roberta-base
  • Description : XLM-RoBERTa base fine-tuned
  • Dataset : VLSP2018-ABSA-Hotel
  • Fine-tuning Framework : HuggingFace Transformers
  • Task : Aspect-based Sentiment Classification (3 classes)
Hyperparameters
  • Batch size: 32
  • Learning rate: 3e-5
  • Epochs: 100
  • Max sequence length: 256
  • Weight decay: 0.01
  • Warmup steps: 500
  • Optimizer: AdamW
Dataset

Model was trained on VLSP2018 ABSA Hotel dataset for aspect-based sentiment analysis.

Sentiment Labels:
  • 0 - Negative (Tiêu cực): Negative opinions
  • 1 - Neutral (Trung lập): Neutral, objective opinions
  • 2 - Positive (Tích cực): Positive opinions
Aspect Categories:

Model được train để phân tích sentiment cho các aspects sau:

  • FACILITIES#CLEANLINESS
  • FACILITIES#COMFORT
  • FACILITIES#DESIGN&FEATURES
  • FACILITIES#GENERAL
  • FACILITIES#MISCELLANEOUS
  • FACILITIES#PRICES
  • FACILITIES#QUALITY
  • FOOD&DRINKS#MISCELLANEOUS
  • FOOD&DRINKS#PRICES
  • FOOD&DRINKS#QUALITY
  • FOOD&DRINKS#STYLE&OPTIONS
  • HOTEL#CLEANLINESS
  • HOTEL#COMFORT
  • HOTEL#DESIGN&FEATURES
  • HOTEL#GENERAL
  • HOTEL#MISCELLANEOUS
  • HOTEL#PRICES
  • HOTEL#QUALITY
  • LOCATION#GENERAL
  • ROOMS#CLEANLINESS
  • ROOMS#COMFORT
  • ROOMS#DESIGN&FEATURES
  • ROOMS#GENERAL
  • ROOMS#MISCELLANEOUS
  • ROOMS#PRICES
  • ROOMS#QUALITY
  • ROOM_AMENITIES#CLEANLINESS
  • ROOM_AMENITIES#COMFORT
  • ROOM_AMENITIES#DESIGN&FEATURES
  • ROOM_AMENITIES#GENERAL
  • ROOM_AMENITIES#MISCELLANEOUS
  • ROOM_AMENITIES#PRICES
  • ROOM_AMENITIES#QUALITY
  • SERVICE#GENERAL
Evaluation Results

The model was evaluated on test set with the following metrics:

  • Accuracy : 0.9529
  • Macro-F1 : 0.5375
  • Weighted-F1 : 0.7708
  • Macro-Precision : 0.7690
  • Macro-Recall : 0.4444
Usage Example
import torch
from transformers import AutoTokenizer, AutoModel

# Load model and tokenizer
repo = "visolex/xlm-roberta-absa-hotel"
tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModel.from_pretrained(repo, trust_remote_code=True)
model.eval()

# Aspect labels for VLSP2018-ABSA-Hotel
aspect_labels = [
    "FACILITIES#CLEANLINESS",
    "FACILITIES#COMFORT",
    "FACILITIES#DESIGN&FEATURES",
    "FACILITIES#GENERAL",
    "FACILITIES#MISCELLANEOUS",
    "FACILITIES#PRICES",
    "FACILITIES#QUALITY",
    "FOOD&DRINKS#MISCELLANEOUS",
    "FOOD&DRINKS#PRICES",
    "FOOD&DRINKS#QUALITY",
    "FOOD&DRINKS#STYLE&OPTIONS",
    "HOTEL#CLEANLINESS",
    "HOTEL#COMFORT",
    "HOTEL#DESIGN&FEATURES",
    "HOTEL#GENERAL",
    "HOTEL#MISCELLANEOUS",
    "HOTEL#PRICES",
    "HOTEL#QUALITY",
    "LOCATION#GENERAL",
    "ROOMS#CLEANLINESS",
    "ROOMS#COMFORT",
    "ROOMS#DESIGN&FEATURES",
    "ROOMS#GENERAL",
    "ROOMS#MISCELLANEOUS",
    "ROOMS#PRICES",
    "ROOMS#QUALITY",
    "ROOM_AMENITIES#CLEANLINESS",
    "ROOM_AMENITIES#COMFORT",
    "ROOM_AMENITIES#DESIGN&FEATURES",
    "ROOM_AMENITIES#GENERAL",
    "ROOM_AMENITIES#MISCELLANEOUS",
    "ROOM_AMENITIES#PRICES",
    "ROOM_AMENITIES#QUALITY",
    "SERVICE#GENERAL"
]

# Sentiment labels
sentiment_labels = ["POSITIVE", "NEGATIVE", "NEUTRAL"]

# Example review text
text = "Khách sạn rất sạch sẽ, phòng ốc thoải mái nhưng giá hơi cao."

# Tokenize
inputs = tokenizer(
    text,
    return_tensors="pt",
    padding=True,
    truncation=True,
    max_length=256
)
inputs.pop("token_type_ids", None)

# Predict
with torch.no_grad():
    outputs = model(**inputs)

# Get logits: shape [1, num_aspects, num_sentiments + 1]
logits = outputs.logits.squeeze(0)  # [num_aspects, num_sentiments + 1]
probs = torch.softmax(logits, dim=-1)

# Predict for each aspect
none_id = probs.size(-1) - 1  # Index of "none" class
results = []

for i, aspect in enumerate(aspect_labels):
    prob_i = probs[i]
    pred_id = int(prob_i.argmax().item())
    
    if pred_id != none_id and pred_id < len(sentiment_labels):
        score = prob_i[pred_id].item()
        if score >= 0.5:  # threshold
            results.append((aspect, sentiment_labels[pred_id].lower()))

print(f"Text: {text}")
print(f"Predicted aspects: {results}")
# Output example: [('aspects', 'positive'), ('aspects', 'positive'), ('aspects', 'negative')]
Citation

If you use this model, please cite:

@misc{visolex_absa_xlm_roberta_absa_hotel,
  title={XLM-RoBERTa base fine-tuned for Vietnamese Aspect-based Sentiment Analysis},
  author={ViSoLex Team},
  year={2025},
  url={https://huggingface.co/visolex/xlm-roberta-absa-hotel}
}
License

This model is released under the Apache-2.0 license.

Acknowledgments

Runs of visolex xlm-roberta-absa-hotel on huggingface.co

11
Total runs
0
24-hour runs
0
3-day runs
-4
7-day runs
-1
30-day runs

More Information About xlm-roberta-absa-hotel huggingface.co Model

More xlm-roberta-absa-hotel license Visit here:

https://choosealicense.com/licenses/apache-2.0

xlm-roberta-absa-hotel huggingface.co

xlm-roberta-absa-hotel huggingface.co is an AI model on huggingface.co that provides xlm-roberta-absa-hotel's model effect (), which can be used instantly with this visolex xlm-roberta-absa-hotel model. huggingface.co supports a free trial of the xlm-roberta-absa-hotel model, and also provides paid use of the xlm-roberta-absa-hotel. Support call xlm-roberta-absa-hotel model through api, including Node.js, Python, http.

xlm-roberta-absa-hotel huggingface.co Url

https://huggingface.co/visolex/xlm-roberta-absa-hotel

visolex xlm-roberta-absa-hotel online free

xlm-roberta-absa-hotel huggingface.co is an online trial and call api platform, which integrates xlm-roberta-absa-hotel's modeling effects, including api services, and provides a free online trial of xlm-roberta-absa-hotel, you can try xlm-roberta-absa-hotel online for free by clicking the link below.

visolex xlm-roberta-absa-hotel online free url in huggingface.co:

https://huggingface.co/visolex/xlm-roberta-absa-hotel

xlm-roberta-absa-hotel install

xlm-roberta-absa-hotel is an open source model from GitHub that offers a free installation service, and any user can find xlm-roberta-absa-hotel on GitHub to install. At the same time, huggingface.co provides the effect of xlm-roberta-absa-hotel install, users can directly use xlm-roberta-absa-hotel installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

xlm-roberta-absa-hotel install url in huggingface.co:

https://huggingface.co/visolex/xlm-roberta-absa-hotel

Url of xlm-roberta-absa-hotel

xlm-roberta-absa-hotel huggingface.co Url

Provider of xlm-roberta-absa-hotel huggingface.co

visolex
ORGANIZATIONS

Other API from visolex

huggingface.co

Total runs: 56
Run Growth: 20
Growth Rate: 35.09%
Updated:January 05 2026
huggingface.co

Total runs: 49
Run Growth: 24
Growth Rate: 46.15%
Updated:January 05 2026
huggingface.co

Total runs: 32
Run Growth: 17
Growth Rate: 53.13%
Updated:January 05 2026
huggingface.co

Total runs: 19
Run Growth: 8
Growth Rate: 42.11%
Updated:June 20 2025
huggingface.co

Total runs: 18
Run Growth: -18
Growth Rate: -94.74%
Updated:January 05 2026
huggingface.co

Total runs: 12
Run Growth: -2
Growth Rate: -15.38%
Updated:January 05 2026
huggingface.co

Total runs: 9
Run Growth: -2
Growth Rate: -25.00%
Updated:January 05 2026
huggingface.co

Total runs: 3
Run Growth: 0
Growth Rate: 0.00%
Updated:January 05 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 17 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 29 2025