kz-transformers commited on
Commit
453b01e
1 Parent(s): bb3fdef

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -41
README.md CHANGED
@@ -7,27 +7,11 @@ language:
7
  pipeline_tag: fill-mask
8
  library_name: transformers
9
  ---
10
- # XLM-RoBERTa (base-sized model)
11
-
12
- 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).
13
-
14
- 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.
15
 
16
  ## Model description
17
 
18
- XLM-RoBERTa is a multilingual version of RoBERTa. It is pre-trained on 2.5TB of filtered CommonCrawl data containing 100 languages.
19
-
20
- 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.
21
-
22
- 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.
23
-
24
- 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.
25
 
26
- ## Intended uses & limitations
27
-
28
- 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.
29
-
30
- 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.
31
 
32
  ## Usage
33
 
@@ -35,38 +19,18 @@ You can use this model directly with a pipeline for masked language modeling:
35
 
36
  ```python
37
  >>> from transformers import pipeline
38
- >>> unmasker = pipeline('fill-mask', model='xlm-roberta-base')
39
  >>> unmasker("Hello I'm a <mask> model.")
40
 
41
- [{'score': 0.10563907772302628,
42
- 'sequence': "Hello I'm a fashion model.",
43
- 'token': 54543,
44
- 'token_str': 'fashion'},
45
- {'score': 0.08015287667512894,
46
- 'sequence': "Hello I'm a new model.",
47
- 'token': 3525,
48
- 'token_str': 'new'},
49
- {'score': 0.033413201570510864,
50
- 'sequence': "Hello I'm a model model.",
51
- 'token': 3299,
52
- 'token_str': 'model'},
53
- {'score': 0.030217764899134636,
54
- 'sequence': "Hello I'm a French model.",
55
- 'token': 92265,
56
- 'token_str': 'French'},
57
- {'score': 0.026436051353812218,
58
- 'sequence': "Hello I'm a sexy model.",
59
- 'token': 17473,
60
- 'token_str': 'sexy'}]
61
- ```
62
 
63
  Here is how to use this model to get the features of a given text in PyTorch:
64
 
65
  ```python
66
  from transformers import AutoTokenizer, AutoModelForMaskedLM
67
 
68
- tokenizer = AutoTokenizer.from_pretrained('xlm-roberta-base')
69
- model = AutoModelForMaskedLM.from_pretrained("xlm-roberta-base")
70
 
71
  # prepare input
72
  text = "Replace me by any text you'd like."
 
7
  pipeline_tag: fill-mask
8
  library_name: transformers
9
  ---
10
+ # Kaz-RoBERTa (base-sized model)
 
 
 
 
11
 
12
  ## Model description
13
 
 
 
 
 
 
 
 
14
 
 
 
 
 
 
15
 
16
  ## Usage
17
 
 
19
 
20
  ```python
21
  >>> from transformers import pipeline
22
+ >>> unmasker = pipeline('fill-mask', model='kz-transformers/kaz-roberta-conversational')
23
  >>> unmasker("Hello I'm a <mask> model.")
24
 
25
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  Here is how to use this model to get the features of a given text in PyTorch:
28
 
29
  ```python
30
  from transformers import AutoTokenizer, AutoModelForMaskedLM
31
 
32
+ tokenizer = AutoTokenizer.from_pretrained("kz-transformers/kaz-roberta-conversational")
33
+ model = AutoModelForMaskedLM.from_pretrained("kz-transformers/kaz-roberta-conversational")
34
 
35
  # prepare input
36
  text = "Replace me by any text you'd like."