Update README.md
Browse files
README.md
CHANGED
@@ -30,7 +30,7 @@ You can use this model directly with a pipeline for masked language modeling:
|
|
30 |
|
31 |
```python
|
32 |
>>> from transformers import pipeline
|
33 |
-
>>> unmasker = pipeline('fill-mask', model='AI-Sweden-Models/roberta-large-
|
34 |
>>> unmasker("Huvudstaden i Sverige är <mask>.")
|
35 |
[{'score': 0.5841221213340759,
|
36 |
'token': 1945,
|
@@ -104,8 +104,8 @@ Here is how to use this model to get the features of a given text in PyTorch:
|
|
104 |
|
105 |
```python
|
106 |
from transformers import RobertaTokenizer, RobertaModel
|
107 |
-
tokenizer = RobertaTokenizer.from_pretrained('AI-Sweden-Models/roberta-large-
|
108 |
-
model = RobertaModel.from_pretrained('AI-Sweden-Models/roberta-large-
|
109 |
text = "Replace me by any text you'd like."
|
110 |
encoded_input = tokenizer(text, return_tensors='pt')
|
111 |
output = model(**encoded_input)
|
@@ -120,7 +120,7 @@ The model was trained with the [optimum-habana](https://github.com/huggingface/o
|
|
120 |
|
121 |
The weights from https://huggingface.co/FacebookAI/roberta-large are used as initialization, and the tokenizer is trained from scratch.
|
122 |
|
123 |
-
This model is a checkpoint (1 160 000 / 1 350 790). The final run is 5 epochs.
|
124 |
|
125 |
A batch size of 1536 was used.
|
126 |
|
|
|
30 |
|
31 |
```python
|
32 |
>>> from transformers import pipeline
|
33 |
+
>>> unmasker = pipeline('fill-mask', model='AI-Sweden-Models/roberta-large-1160k')
|
34 |
>>> unmasker("Huvudstaden i Sverige är <mask>.")
|
35 |
[{'score': 0.5841221213340759,
|
36 |
'token': 1945,
|
|
|
104 |
|
105 |
```python
|
106 |
from transformers import RobertaTokenizer, RobertaModel
|
107 |
+
tokenizer = RobertaTokenizer.from_pretrained('AI-Sweden-Models/roberta-large-1160k')
|
108 |
+
model = RobertaModel.from_pretrained('AI-Sweden-Models/roberta-large-1160k')
|
109 |
text = "Replace me by any text you'd like."
|
110 |
encoded_input = tokenizer(text, return_tensors='pt')
|
111 |
output = model(**encoded_input)
|
|
|
120 |
|
121 |
The weights from https://huggingface.co/FacebookAI/roberta-large are used as initialization, and the tokenizer is trained from scratch.
|
122 |
|
123 |
+
This model is a checkpoint (1 160 000 / 1 350 790). The final run is 5 epochs. This is epoch: 4.29.
|
124 |
|
125 |
A batch size of 1536 was used.
|
126 |
|