Views
No views yet
xlm-roberta-base fine-tuned for 10-way Vietnamese news topic classification on VNTC-10.| Metric | Mean ± std |
|---|---|
| Test Macro-F1 | 0.9123 ± 0.0022 |
| Test accuracy | 0.9216 ± 0.0020 |
| Test macro precision | 0.9143 ± 0.0025 |
| Test macro recall | 0.9116 ± 0.0019 |
| Development Macro-F1 | 0.9133 ± 0.0010 |
| seed | dev_macro_f1 | test_macro_f1 | test_accuracy |
|---|---|---|---|
| 22.000000 | 0.914360 | 0.910550 | 0.920371 |
| 42.000000 | 0.912349 | 0.914851 | 0.923936 |
| 202.000000 | 0.913209 | 0.911614 | 0.920490 |
1{
2 "0": "chinh_tri_xa_hoi",
3 "1": "doi_song",
4 "2": "khoa_hoc",
5 "3": "kinh_doanh",
6 "4": "phap_luat",
7 "5": "suc_khoe",
8 "6": "the_gioi",
9 "7": "the_thao",
10 "8": "van_hoa",
11 "9": "vi_tinh"
12}1import torch
2from transformers import AutoModelForSequenceClassification, AutoTokenizer
3
4model_id = "BaoNhan/xlm-roberta-base-VNTC-10"
5tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=False)
6model = AutoModelForSequenceClassification.from_pretrained(model_id)
7
8text = "Đội tuyển Việt Nam giành chiến thắng trong trận đấu bóng đá quốc tế."
9inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
10with torch.no_grad():
11 probabilities = model(**inputs).logits.softmax(dim=-1)[0]
12predicted_id = int(probabilities.argmax())
13print(model.config.id2label[predicted_id], probabilities.tolist())aggregate_metrics.json: aggregate metrics and protocol 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, labels and probabilities; raw articles are excluded.1@inproceedings{vu2007comparative,
2 title={A Comparative Study on Vietnamese Text Classification Methods},
3 author={Vu, Hoang Cong Duy and Dien, Dinh and Nguyen, Le Nguyen and Ngo, Quoc Hung},
4 booktitle={2007 IEEE International Conference on Research, Innovation and Vision for the Future},
5 pages={267--273},
6 year={2007},
7 organization={IEEE}
8}