Text Classification
Transformers
Safetensors
Vietnamese
absa_transformer
vietnamese
custom-code
multilingual-e5
absa
vlsp2018
hotel
aspect-based-sentiment-analysis
custom_code
Instructions to use NeoCyber/m-e5-small-vlsp2018-hotel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NeoCyber/m-e5-small-vlsp2018-hotel with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="NeoCyber/m-e5-small-vlsp2018-hotel", trust_remote_code=True)# Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("NeoCyber/m-e5-small-vlsp2018-hotel", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
m-e5-small-vlsp2018-hotel
Overview
Vietnamese aspect-category sentiment classification model for hotel reviews from the VLSP 2018 sentiment analysis benchmark.
Model Details
- Base model:
intfloat/multilingual-e5-small - Architecture:
absa - Checkpoint source:
vlsp-2018-hotel-e5-small-best.pt - Sequence length used during training/inference pipeline:
256 - Number of aspect categories:
34
Label Schema
0: aspect not mentioned1: positive2: negative3: neutral
Aspect Categories
FACILITIES#CLEANLINESSFACILITIES#COMFORTFACILITIES#DESIGN&FEATURESFACILITIES#GENERALFACILITIES#MISCELLANEOUSFACILITIES#PRICESFACILITIES#QUALITYFOOD&DRINKS#MISCELLANEOUSFOOD&DRINKS#PRICESFOOD&DRINKS#QUALITYFOOD&DRINKS#STYLE&OPTIONSHOTEL#CLEANLINESSHOTEL#COMFORTHOTEL#DESIGN&FEATURESHOTEL#GENERALHOTEL#MISCELLANEOUSHOTEL#PRICESHOTEL#QUALITYLOCATION#GENERALROOMS#CLEANLINESSROOMS#COMFORTROOMS#DESIGN&FEATURESROOMS#GENERALROOMS#MISCELLANEOUSROOMS#PRICESROOMS#QUALITYROOM_AMENITIES#CLEANLINESSROOM_AMENITIES#COMFORTROOM_AMENITIES#DESIGN&FEATURESROOM_AMENITIES#GENERALROOM_AMENITIES#MISCELLANEOUSROOM_AMENITIES#PRICESROOM_AMENITIES#QUALITYSERVICE#GENERAL
Dataset
- Dataset:
VLSP 2018 Hotel ReviewsThis model is trained on the hotel subset of the VLSP 2018 aspect-based sentiment analysis benchmark.
Data Format
Reviewis the input text column.- Each aspect-category column is encoded as
0/1/2/3for none, positive, negative, or neutral.
Splits
- Train:
3000samples - Validation:
2000samples - Test:
600samples
Checkpoint Metrics
loss:0.2058accuracy:0.9387
Usage
Load the model with trust_remote_code=True because this repository contains custom modeling code.
from transformers import AutoModelForSequenceClassification, AutoTokenizer
repo_id = "NeoCyber/m-e5-small-vlsp2018-hotel"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForSequenceClassification.from_pretrained(
repo_id,
trust_remote_code=True,
)
texts = ["Khách sạn sạch sẽ và nhân viên rất nhiệt tình."]
inputs = tokenizer(texts, return_tensors="pt", truncation=True, padding=True)
outputs = model(**inputs)
predictions = model.decode_predictions(outputs.logits)
print(predictions)
Notes
- The repository includes custom
configuration_*.pyandmodeling_*.pyfiles required bytransformersAutoClasses. outputs.logitshas shape[batch_size, num_aspects, 4]andmodel.decode_predictions(...)maps logits back to aspect-level labels.
- Downloads last month
- 25
Model tree for NeoCyber/m-e5-small-vlsp2018-hotel
Base model
intfloat/multilingual-e5-small