ideasbyjin
commited on
Commit
•
db68279
1
Parent(s):
0dba3ad
Formatting
Browse files
README.md
CHANGED
@@ -21,14 +21,21 @@ non-commercial use. For any users seeking commercial use of our model and genera
|
|
21 |
## Example usage
|
22 |
|
23 |
```
|
24 |
-
>>> from transformers import
|
25 |
-
|
|
|
|
|
|
|
|
|
26 |
>>> tokenizer = RoFormerTokenizer.from_pretrained("alchemab/antiberta2")
|
27 |
>>> model = RoFormerForMaskedLM.from_pretrained("alchemab/antiberta2")
|
28 |
|
29 |
>>> filler = pipeline(model=model, tokenizer=tokenizer)
|
30 |
>>> filler("Ḣ Q V Q ... C A [MASK] D ... T V S S") # fill in the mask
|
31 |
|
32 |
-
>>> new_model = RoFormerForSequenceClassification.from_pretrained(
|
|
|
|
|
|
|
33 |
|
34 |
```
|
|
|
21 |
## Example usage
|
22 |
|
23 |
```
|
24 |
+
>>> from transformers import (
|
25 |
+
RoFormerForMaskedLM,
|
26 |
+
RoFormerTokenizer,
|
27 |
+
pipeline,
|
28 |
+
RoFormerForSequenceClassification
|
29 |
+
)
|
30 |
>>> tokenizer = RoFormerTokenizer.from_pretrained("alchemab/antiberta2")
|
31 |
>>> model = RoFormerForMaskedLM.from_pretrained("alchemab/antiberta2")
|
32 |
|
33 |
>>> filler = pipeline(model=model, tokenizer=tokenizer)
|
34 |
>>> filler("Ḣ Q V Q ... C A [MASK] D ... T V S S") # fill in the mask
|
35 |
|
36 |
+
>>> new_model = RoFormerForSequenceClassification.from_pretrained(
|
37 |
+
"alchemab/antiberta2") # this will of course raise warnings
|
38 |
+
# that a new linear layer will be added
|
39 |
+
# and randomly initialized
|
40 |
|
41 |
```
|