MarshallHo
commited on
Commit
•
f7e0c35
1
Parent(s):
c3cfbae
updated usage
Browse files
README.md
CHANGED
@@ -10,6 +10,14 @@ Based on Hugging Face's albert-base-v2, albertZero employs a novel method to spe
|
|
10 |
|
11 |
albertZero can be loaded like this:
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
```python
|
14 |
from transformers import AlbertModel, AlbertTokenizer, AlbertForQuestionAnswering, AlbertPreTrainedModel
|
15 |
|
@@ -19,7 +27,6 @@ model.load_state_dict(torch.load('albertZero-squad2-base-v2.bin'))
|
|
19 |
```
|
20 |
|
21 |
|
22 |
-
|
23 |
## References
|
24 |
|
25 |
The goal of [ALBERT](https://arxiv.org/abs/1909.11942) is to reduce the memory requirement of the groundbreaking
|
|
|
10 |
|
11 |
albertZero can be loaded like this:
|
12 |
|
13 |
+
```python
|
14 |
+
tokenizer = AutoTokenizer.from_pretrained('MarshallHo/albertZero-squad2-base-v2')
|
15 |
+
model = AutoModel.from_pretrained('MarshallHo/albertZero-squad2-base-v2')
|
16 |
+
|
17 |
+
```
|
18 |
+
|
19 |
+
or
|
20 |
+
|
21 |
```python
|
22 |
from transformers import AlbertModel, AlbertTokenizer, AlbertForQuestionAnswering, AlbertPreTrainedModel
|
23 |
|
|
|
27 |
```
|
28 |
|
29 |
|
|
|
30 |
## References
|
31 |
|
32 |
The goal of [ALBERT](https://arxiv.org/abs/1909.11942) is to reduce the memory requirement of the groundbreaking
|