Downloads · 30 days
70
6% of all-time downloads
lizNguyen235/phobert-nli-vi
phobert-nli-vi is a zero-shot classification model from lizNguyen235. Use it when you need labels you did not train the model on. It is set up for transformers.
This model is a fine-tuned version of vinai/phobert-base-v2 for the Vietnamese Natural Language Inference (NLI) task. It determines whether a premise sentence entails, contradicts, or is neutral to a hypothesis sentence.
Downloads · 30 days
70
6% of all-time downloads
All-time downloads
1.1K
Public
Parameters
135M
42.7 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors540 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of vinai/phobert-base-v2 for the Vietnamese Natural Language Inference (NLI) task. It determines whether a premise sentence entails, contradicts, or is neutral to a hypothesis sentence.
# Install necessary libraries
# !pip install transformers torch
from transformers import pipeline
model_name = "lizNguyen235/phobert-nli-vi"
classifier = pipeline("zero-shot-classification", model=model_name)
sequence_to_classify = "Apple vừa ra mắt iPhone 15 với cổng sạc USB-C."
candidate_labels = ['công nghệ', 'ẩm thực', 'chính trị', 'thể thao']
vietnamese_template = "Chủ đề của câu này là {}."
result = classifier(
sequence_to_classify,
candidate_labels,
hypothesis_template=vietnamese_template
)