Update README.md
Browse files
README.md
CHANGED
@@ -9,7 +9,15 @@ language:
|
|
9 |
</summary>
|
10 |
|
11 |
### Fetching the model
|
|
|
12 |
```python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
# Load the TinyBERT tokenizer and model
|
14 |
tokenizer = AutoTokenizer.from_pretrained('huawei-noah/TinyBERT_General_4L_312D')
|
15 |
model = AutoModelForSequenceClassification.from_pretrained('huawei-noah/TinyBERT_General_4L_312D', num_labels=2)
|
|
|
9 |
</summary>
|
10 |
|
11 |
### Fetching the model
|
12 |
+
|
13 |
```python
|
14 |
+
import torch
|
15 |
+
from torch.utils.data import DataLoader, Dataset
|
16 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification, AdamW
|
17 |
+
from sklearn.model_selection import train_test_split
|
18 |
+
import pandas as pd
|
19 |
+
from tqdm import tqdm
|
20 |
+
|
21 |
# Load the TinyBERT tokenizer and model
|
22 |
tokenizer = AutoTokenizer.from_pretrained('huawei-noah/TinyBERT_General_4L_312D')
|
23 |
model = AutoModelForSequenceClassification.from_pretrained('huawei-noah/TinyBERT_General_4L_312D', num_labels=2)
|