File size: 1,625 Bytes
9ecd3b1
27c2b9e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9ecd3b1
 
27c2b9e
9ecd3b1
27c2b9e
9ecd3b1
 
 
27c2b9e
 
 
 
9ecd3b1
27c2b9e
9ecd3b1
27c2b9e
 
9ecd3b1
27c2b9e
 
 
 
9ecd3b1
27c2b9e
 
 
 
 
 
 
9ecd3b1
 
 
27c2b9e
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
language:
- vi
license: mit
tags:
- summarization
- vietnamese
- bartpho
- seq2seq
datasets:
- news-dataset-vietnameses
metrics:
- rouge
model-index:
- name: bartpho-vietnamese-summarization
  results:
  - task:
      type: summarization
    dataset:
      name: Vietnamese News Dataset
      type: news-dataset-vietnameses
    metrics:
    - type: rouge
      value: TBD
---

# BARTpho Vietnamese Summarization Model

This model is a fine-tuned version of [vinai/bartpho-syllable](https://huggingface.co/vinai/bartpho-syllable) for Vietnamese text summarization.

## Model Details

- **Base Model**: vinai/bartpho-syllable
- **Task**: Text Summarization
- **Language**: Vietnamese
- **Training Dataset**: Vietnamese News Dataset

## Usage

```python
from transformers import BartForConditionalGeneration, AutoTokenizer

model_name = "YOUR_USERNAME/bartpho-vietnamese-summarization"
# Use AutoTokenizer for BARTpho (automatically loads BartphoTokenizer)
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = BartForConditionalGeneration.from_pretrained(model_name)

# Example usage
text = "Your Vietnamese news article text here..."
inputs = tokenizer(text, return_tensors="pt", max_length=1024, truncation=True)
summary_ids = model.generate(inputs["input_ids"], max_length=128, num_beams=4, early_stopping=True)
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
print(summary)
```

## Training Details

- **Training Framework**: Hugging Face Transformers
- **GPU**: NVIDIA P100 16GB
- **Batch Size**: 8 per device
- **Gradient Accumulation**: 2 steps
- **Learning Rate**: 2e-5
- **Epochs**: 3