dejanseo commited on
Commit
85814d1
1 Parent(s): d4b032c

Upload 5 files

Browse files
Files changed (5) hide show
  1. README.md +203 -1
  2. config.json +25 -0
  3. sentencepiece.bpe.model +3 -0
  4. tokenizer.json +0 -0
  5. tokenizer_config.json +1 -0
README.md CHANGED
@@ -1,3 +1,205 @@
1
  ---
2
- license: bigscience-openrail-m
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ tags:
3
+ - exbert
4
+ language:
5
+ - multilingual
6
+ - af
7
+ - am
8
+ - ar
9
+ - as
10
+ - az
11
+ - be
12
+ - bg
13
+ - bn
14
+ - br
15
+ - bs
16
+ - ca
17
+ - cs
18
+ - cy
19
+ - da
20
+ - de
21
+ - el
22
+ - en
23
+ - eo
24
+ - es
25
+ - et
26
+ - eu
27
+ - fa
28
+ - fi
29
+ - fr
30
+ - fy
31
+ - ga
32
+ - gd
33
+ - gl
34
+ - gu
35
+ - ha
36
+ - he
37
+ - hi
38
+ - hr
39
+ - hu
40
+ - hy
41
+ - id
42
+ - is
43
+ - it
44
+ - ja
45
+ - jv
46
+ - ka
47
+ - kk
48
+ - km
49
+ - kn
50
+ - ko
51
+ - ku
52
+ - ky
53
+ - la
54
+ - lo
55
+ - lt
56
+ - lv
57
+ - mg
58
+ - mk
59
+ - ml
60
+ - mn
61
+ - mr
62
+ - ms
63
+ - my
64
+ - ne
65
+ - nl
66
+ - no
67
+ - om
68
+ - or
69
+ - pa
70
+ - pl
71
+ - ps
72
+ - pt
73
+ - ro
74
+ - ru
75
+ - sa
76
+ - sd
77
+ - si
78
+ - sk
79
+ - sl
80
+ - so
81
+ - sq
82
+ - sr
83
+ - su
84
+ - sv
85
+ - sw
86
+ - ta
87
+ - te
88
+ - th
89
+ - tl
90
+ - tr
91
+ - ug
92
+ - uk
93
+ - ur
94
+ - uz
95
+ - vi
96
+ - xh
97
+ - yi
98
+ - zh
99
+ license: mit
100
  ---
101
+
102
+ # LinkBERT-XL
103
+ A fine-tuned version of XLM-RoBERTa Large specialising in binary token classification for the purpose of link (anchor text) prediction in plain text. This model was trained by: https://dejanmarketing.com/
104
+
105
+ # ORIGINAL MODEL
106
+
107
+ # XLM-RoBERTa (large-sized model)
108
+
109
+ XLM-RoBERTa model pre-trained on 2.5TB of filtered CommonCrawl data containing 100 languages. It was introduced in the paper [Unsupervised Cross-lingual Representation Learning at Scale](https://arxiv.org/abs/1911.02116) by Conneau et al. and first released in [this repository](https://github.com/pytorch/fairseq/tree/master/examples/xlmr).
110
+
111
+ Disclaimer: The team releasing XLM-RoBERTa did not write a model card for this model so this model card has been written by the Hugging Face team.
112
+
113
+ ## Model description
114
+
115
+ XLM-RoBERTa is a multilingual version of RoBERTa. It is pre-trained on 2.5TB of filtered CommonCrawl data containing 100 languages.
116
+
117
+ RoBERTa is a transformers model pretrained on a large corpus in a self-supervised fashion. This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an automatic process to generate inputs and labels from those texts.
118
+
119
+ More precisely, it was pretrained with the Masked language modeling (MLM) objective. Taking a sentence, the model randomly masks 15% of the words in the input then run the entire masked sentence through the model and has to predict the masked words. This is different from traditional recurrent neural networks (RNNs) that usually see the words one after the other, or from autoregressive models like GPT which internally mask the future tokens. It allows the model to learn a bidirectional representation of the sentence.
120
+
121
+ This way, the model learns an inner representation of 100 languages that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled sentences for instance, you can train a standard classifier using the features produced by the XLM-RoBERTa model as inputs.
122
+
123
+ ## Intended uses & limitations
124
+
125
+ You can use the raw model for masked language modeling, but it's mostly intended to be fine-tuned on a downstream task. See the [model hub](https://huggingface.co/models?search=xlm-roberta) to look for fine-tuned versions on a task that interests you.
126
+
127
+ Note that this model is primarily aimed at being fine-tuned on tasks that use the whole sentence (potentially masked) to make decisions, such as sequence classification, token classification or question answering. For tasks such as text generation, you should look at models like GPT2.
128
+
129
+ ## Usage
130
+
131
+ You can use this model directly with a pipeline for masked language modeling:
132
+
133
+ ```python
134
+ >>> from transformers import pipeline
135
+ >>> unmasker = pipeline('fill-mask', model='xlm-roberta-large')
136
+ >>> unmasker("Hello I'm a <mask> model.")
137
+
138
+ [{'score': 0.10563907772302628,
139
+ 'sequence': "Hello I'm a fashion model.",
140
+ 'token': 54543,
141
+ 'token_str': 'fashion'},
142
+ {'score': 0.08015287667512894,
143
+ 'sequence': "Hello I'm a new model.",
144
+ 'token': 3525,
145
+ 'token_str': 'new'},
146
+ {'score': 0.033413201570510864,
147
+ 'sequence': "Hello I'm a model model.",
148
+ 'token': 3299,
149
+ 'token_str': 'model'},
150
+ {'score': 0.030217764899134636,
151
+ 'sequence': "Hello I'm a French model.",
152
+ 'token': 92265,
153
+ 'token_str': 'French'},
154
+ {'score': 0.026436051353812218,
155
+ 'sequence': "Hello I'm a sexy model.",
156
+ 'token': 17473,
157
+ 'token_str': 'sexy'}]
158
+ ```
159
+
160
+ Here is how to use this model to get the features of a given text in PyTorch:
161
+
162
+ ```python
163
+ from transformers import AutoTokenizer, AutoModelForMaskedLM
164
+
165
+ tokenizer = AutoTokenizer.from_pretrained('xlm-roberta-large')
166
+ model = AutoModelForMaskedLM.from_pretrained("xlm-roberta-large")
167
+
168
+ # prepare input
169
+ text = "Replace me by any text you'd like."
170
+ encoded_input = tokenizer(text, return_tensors='pt')
171
+
172
+ # forward pass
173
+ output = model(**encoded_input)
174
+ ```
175
+
176
+ ### BibTeX entry and citation info
177
+
178
+ ```bibtex
179
+ @article{DBLP:journals/corr/abs-1911-02116,
180
+ author = {Alexis Conneau and
181
+ Kartikay Khandelwal and
182
+ Naman Goyal and
183
+ Vishrav Chaudhary and
184
+ Guillaume Wenzek and
185
+ Francisco Guzm{\'{a}}n and
186
+ Edouard Grave and
187
+ Myle Ott and
188
+ Luke Zettlemoyer and
189
+ Veselin Stoyanov},
190
+ title = {Unsupervised Cross-lingual Representation Learning at Scale},
191
+ journal = {CoRR},
192
+ volume = {abs/1911.02116},
193
+ year = {2019},
194
+ url = {http://arxiv.org/abs/1911.02116},
195
+ eprinttype = {arXiv},
196
+ eprint = {1911.02116},
197
+ timestamp = {Mon, 11 Nov 2019 18:38:09 +0100},
198
+ biburl = {https://dblp.org/rec/journals/corr/abs-1911-02116.bib},
199
+ bibsource = {dblp computer science bibliography, https://dblp.org}
200
+ }
201
+ ```
202
+
203
+ <a href="https://huggingface.co/exbert/?model=xlm-roberta-base">
204
+ <img width="300px" src="https://cdn-media.huggingface.co/exbert/button.png">
205
+ </a>
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "XLMRobertaForMaskedLM"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "bos_token_id": 0,
7
+ "eos_token_id": 2,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 1024,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 4096,
13
+ "layer_norm_eps": 1e-05,
14
+ "max_position_embeddings": 514,
15
+ "model_type": "xlm-roberta",
16
+ "num_attention_heads": 16,
17
+ "num_hidden_layers": 24,
18
+ "output_past": true,
19
+ "pad_token_id": 1,
20
+ "position_embedding_type": "absolute",
21
+ "transformers_version": "4.17.0.dev0",
22
+ "type_vocab_size": 1,
23
+ "use_cache": true,
24
+ "vocab_size": 250002
25
+ }
sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
3
+ size 5069051
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"model_max_length": 512}