You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

m-e5-small-vlsp2018-restaurant

Overview

Vietnamese aspect-category sentiment classification model for restaurant reviews from the VLSP 2018 sentiment analysis benchmark.

Model Details

  • Base model: intfloat/multilingual-e5-small
  • Architecture: absa
  • Checkpoint source: vlsp-2018-restaurant-e5-small-best.pt
  • Sequence length used during training/inference pipeline: 256
  • Number of aspect categories: 12

Label Schema

  • 0: aspect not mentioned
  • 1: positive
  • 2: negative
  • 3: neutral

Aspect Categories

  • AMBIENCE#GENERAL
  • DRINKS#PRICES
  • DRINKS#QUALITY
  • DRINKS#STYLE&OPTIONS
  • FOOD#PRICES
  • FOOD#QUALITY
  • FOOD#STYLE&OPTIONS
  • LOCATION#GENERAL
  • RESTAURANT#GENERAL
  • RESTAURANT#MISCELLANEOUS
  • RESTAURANT#PRICES
  • SERVICE#GENERAL

Dataset

  • Dataset: VLSP 2018 Restaurant Reviews This model is trained on the restaurant subset of the VLSP 2018 aspect-based sentiment analysis benchmark.

Data Format

  • Review is the input text column.
  • Each aspect-category column is encoded as 0/1/2/3 for none, positive, negative, or neutral.

Splits

  • Train: 2961 samples
  • Validation: 1290 samples
  • Test: 500 samples

Checkpoint Metrics

  • loss: 0.3680
  • accuracy: 0.8747

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-restaurant"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForSequenceClassification.from_pretrained(
    repo_id,
    trust_remote_code=True,
)

texts = ["Đồ ăn ngon nhưng phục vụ hơi chậm."]
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_*.py and modeling_*.py files required by transformers AutoClasses.
  • outputs.logits has shape [batch_size, num_aspects, 4] and model.decode_predictions(...) maps logits back to aspect-level labels.
Downloads last month
27
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for NeoCyber/m-e5-small-vlsp2018-restaurant

Finetuned
(161)
this model