uitnlp/vietnamese_students_feedback
Viewer • Updated • 16.2k • 594 • 31
How to use BaoNhan/xlm-roberta-base-UITVSFC-T with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="BaoNhan/xlm-roberta-base-UITVSFC-T") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("BaoNhan/xlm-roberta-base-UITVSFC-T")
model = AutoModelForSequenceClassification.from_pretrained("BaoNhan/xlm-roberta-base-UITVSFC-T", device_map="auto")This model is xlm-roberta-base fine-tuned for UITVSFC-T on UIT-VSFC.
Test metrics are reported as mean ± sample standard deviation over seeds [42, 22, 202].
| Metric | Mean ± std |
|---|---|
| Test Macro-F1 | 0.7771 ± 0.0062 |
| Test accuracy | 0.8834 ± 0.0025 |
| Test macro precision | 0.8169 ± 0.0204 |
| Test macro recall | 0.7558 ± 0.0140 |
| Development Macro-F1 | 0.7967 ± 0.0116 |
| seed | dev_macro_f1 | test_macro_f1 | test_accuracy | micro_batch_size | gradient_accumulation_steps |
|---|---|---|---|---|---|
| 22.000000 | 0.796667 | 0.781418 | 0.883807 | 8.000000 | 1.000000 |
| 42.000000 | 0.785164 | 0.779969 | 0.885661 | 8.000000 | 1.000000 |
| 202.000000 | 0.808409 | 0.770034 | 0.880717 | 8.000000 | 1.000000 |
{
"0": "lecturer",
"1": "training_program",
"2": "facility",
"3": "others"
}
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_id = "BaoNhan/xlm-roberta-base-UITVSFC-T"
tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=False)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
text = "Đây là nội dung tiếng Việt cần phân loại."
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
with torch.no_grad():
probabilities = model(**inputs).logits.softmax(dim=-1)[0]
predicted_id = int(probabilities.argmax())
print(model.config.id2label[predicted_id], probabilities.tolist())
aggregate_metrics.json: aggregate metrics and training manifest.artifacts/per_seed_results.csv: one row per fine-tuning seed.artifacts/seed_*_confusion_matrix.csv: confusion matrix for each seed.artifacts/seed_*_classification_report.json: per-class metrics.artifacts/seed_*_test_predictions.csv: IDs, gold/predicted labels and probabilities; raw text is excluded.UIT-VSFC contains student feedback from a specific educational context. Performance may not transfer to other institutions, domains, informal writing styles, or newly emerging vocabulary. Predictions should not be treated as explanations of student intent.
@InProceedings{8573337,
author={Nguyen, Kiet Van and Nguyen, Vu Duc and Nguyen, Phu X. V. and Truong, Tham T. H. and Nguyen, Ngan Luu-Thuy},
booktitle={2018 10th International Conference on Knowledge and Systems Engineering (KSE)},
title={UIT-VSFC: Vietnamese Students' Feedback Corpus for Sentiment Analysis},
year={2018},
pages={19--24},
doi={10.1109/KSE.2018.8573337}
}
Base model
FacebookAI/xlm-roberta-base