|
|
--- |
|
|
language: vi |
|
|
license: apache-2.0 |
|
|
tags: |
|
|
- text-classification |
|
|
- clickbait-detection |
|
|
- vietnamese |
|
|
- llama |
|
|
- fine-tuned |
|
|
datasets: |
|
|
- clickbait-dataset |
|
|
metrics: |
|
|
- accuracy |
|
|
- f1 |
|
|
pipeline_tag: text-classification |
|
|
--- |
|
|
|
|
|
# Vietnamese Clickbait Detection Model |
|
|
|
|
|
This model is a fine-tuned version of Llama for Vietnamese clickbait detection. |
|
|
|
|
|
## Model Description |
|
|
|
|
|
- **Model type:** Causal Language Model (Fine-tuned for Classification) |
|
|
- **Language:** Vietnamese |
|
|
- **Base model:** meta-llama/Llama-3.1-8B-Instruct |
|
|
- **Task:** Clickbait Detection |
|
|
- **Dataset:** Vietnamese clickbait dataset |
|
|
|
|
|
## Usage |
|
|
|
|
|
```python |
|
|
from transformers import AutoTokenizer, AutoModelForCausalLM |
|
|
import torch |
|
|
|
|
|
# Load model and tokenizer |
|
|
model_name = "PhaaNe/clickbait_KLTN" |
|
|
tokenizer = AutoTokenizer.from_pretrained(model_name) |
|
|
model = AutoModelForCausalLM.from_pretrained( |
|
|
model_name, |
|
|
torch_dtype=torch.float16, |
|
|
device_map="auto" |
|
|
) |
|
|
|
|
|
# Example usage |
|
|
text = "Bạn sẽ không tin được điều này xảy ra!" |
|
|
inputs = tokenizer(text, return_tensors="pt") |
|
|
outputs = model.generate(**inputs, max_new_tokens=10) |
|
|
result = tokenizer.decode(outputs[0], skip_special_tokens=True) |
|
|
print(result) |
|
|
``` |
|
|
|
|
|
## Training Details |
|
|
|
|
|
- Fine-tuned using LoRA (Low-Rank Adaptation) |
|
|
- Training framework: Transformers + PEFT |
|
|
- Hardware: GPU-enabled server |
|
|
|
|
|
## Performance |
|
|
|
|
|
The model achieves good performance on Vietnamese clickbait detection tasks. |
|
|
|
|
|
## Citation |
|
|
|
|
|
If you use this model, please cite: |
|
|
|
|
|
``` |
|
|
@misc{clickbait_kltn_2025, |
|
|
title={Vietnamese Clickbait Detection using Fine-tuned Llama}, |
|
|
author={PhaaNe}, |
|
|
year={2025}, |
|
|
url={https://huggingface.co/PhaaNe/clickbait_KLTN} |
|
|
} |
|
|
``` |
|
|
|