File size: 2,053 Bytes
1a3891e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# 🧠 Mô hình multi-task
## 📝 Giới thiệu
Mô hình DeBERTa‑v3‑base được fine‑tune theo multi-task learning trên hơn 600 tác vụ thuộc bộ TaskSource, bao gồm Natural Language Inference (NLI), Zero-Shot Classification, token classification và multiple-choice.
Mô hình được đánh giá mạnh trong zero-shot và đạt thành tích hàng đầu trong các benchmark do IBM tổ chức.

## 📌 Khả năng chính
Zero-Shot Classification
Natural Language Inference (NLI)
Multiple-choice & Token classification
TaskSource-adapters – Gọi hàng trăm tác vụ chỉ với 1 dòng lệnh

## 📥 Đầu vào & 📤 Đầu ra
### 🔍 Zero-Shot Classification
```python
from transformers import pipeline
classifier = pipeline("zero-shot-classification", model="zhaospei/Model_17")
classifier("I love programming.", ["tech", "politics", "sports"])
```
### 🔎 NLI (Natural Language Inference)
```python
from transformers import pipeline
pipe = pipeline("text-classification", model="zhaospei/Model_17")
pipe([{"text": "A cat is on the mat.", "text_pair": "An animal is lying down."}])
```
### 🔌 [TA] Tasksource-adapters: Truy cập hàng trăm tác vụ với 1 dòng
```python
# !pip install tasknet
import tasknet as tn

pipe = tn.load_pipeline('zhaospei/Model_17', 'glue/sst2')  # hoạt động với 500+ tác vụ TaskSource
pipe(['That movie was great!', 'Awful movie.'])
# [{'label': 'positive', 'score': 0.9956}, {'label': 'negative', 'score': 0.9967}]
Hỗ trợ các tập như: GLUE, SuperGLUE, ANLI, BIG-Bench, BoolQ, COPA...
```

### 🔧 Fine-tuning nhanh với TaskNet
```python
import tasknet as tn

model, trainer = tn.Model_Trainer(
    [tn.AutoTask("glue/rte")],
    hparams={"model_name": "zhaospei/Model_17", "learning_rate": 2e-5}
)
trainer.train()
```

## ⚙️ Cài đặt
```bash
pip install torch transformers tasknet
```
## 📊 Huấn luyện & Hiệu năng
Dataset: 600+ tác vụ
Epochs: 200k steps
Batch size: 384
Peak learning rate: 2e-5
Thiết bị: A30 24GB x2 trong 15 ngày