manred1997
commited on
Commit
•
9263959
1
Parent(s):
307328a
Update README.md
Browse files
README.md
CHANGED
@@ -79,8 +79,10 @@ from torch import nn
|
|
79 |
from torch.nn import CrossEntropyLoss
|
80 |
from transformers import AutoConfig, AutoTokenizer
|
81 |
from transformers.file_utils import ModelOutput
|
82 |
-
from transformers.models.
|
83 |
-
|
|
|
|
|
84 |
|
85 |
@dataclass
|
86 |
class XGECToROutput(ModelOutput):
|
@@ -203,7 +205,7 @@ class XGECToRRoberta(RobertaPreTrainedModel):
|
|
203 |
|
204 |
config = AutoConfig.from_pretrained("manred1997/roberta-large_lemon-spell_5k")
|
205 |
tokenizer = AutoTokenizer.from_pretrained("manred1997/roberta-large_lemon-spell_5k")
|
206 |
-
model =
|
207 |
"manred1997/roberta-large_lemon-spell_5k", config=config
|
208 |
)
|
209 |
```
|
|
|
79 |
from torch.nn import CrossEntropyLoss
|
80 |
from transformers import AutoConfig, AutoTokenizer
|
81 |
from transformers.file_utils import ModelOutput
|
82 |
+
from transformers.models.roberta.modeling_roberta import (
|
83 |
+
RobertaModel,
|
84 |
+
RobertaPreTrainedModel,
|
85 |
+
)
|
86 |
|
87 |
@dataclass
|
88 |
class XGECToROutput(ModelOutput):
|
|
|
205 |
|
206 |
config = AutoConfig.from_pretrained("manred1997/roberta-large_lemon-spell_5k")
|
207 |
tokenizer = AutoTokenizer.from_pretrained("manred1997/roberta-large_lemon-spell_5k")
|
208 |
+
model = XGECToRRoberta.from_pretrained(
|
209 |
"manred1997/roberta-large_lemon-spell_5k", config=config
|
210 |
)
|
211 |
```
|