Run this model with HF Jobs
Run facebook/muppet-roberta-base on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/facebook/muppet-roberta-base. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/facebook/muppet-roberta-base on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use facebook/muppet-roberta-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/muppet-roberta-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="facebook/muppet-roberta-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("facebook/muppet-roberta-base") model = AutoModelForMaskedLM.from_pretrained("facebook/muppet-roberta-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files7 unmodified lines891011121314151617181920212221 unmodified lines444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319410 unmodified lines2052062072082092102112122132142152162172182192202212222232242252262272282292302312322332347 unmodified lines- wikipedia---# RoBERTa base modelPretrained model on English language using a masked language modeling (MLM) objective. It was introduced in[this paper](https://arxiv.org/abs/1907.11692) and first released in[this repository](https://github.com/pytorch/fairseq/tree/master/examples/roberta). This model is case-sensitive: itmakes a difference between english and English.Disclaimer: The team releasing RoBERTa did not write a model card for this model so this model card has been written bythe Hugging Face team.## Model description21 unmodified linesto make decisions, such as sequence classification, token classification or question answering. For tasks such as textgeneration you should look at model like GPT2.### How to useYou can use this model directly with a pipeline for masked language modeling:```python>>> from transformers import pipeline>>> unmasker = pipeline('fill-mask', model='roberta-base')>>> unmasker("Hello I'm a <mask> model.")[{'sequence': "<s>Hello I'm a male model.</s>",'score': 0.3306540250778198,'token': 2943,'token_str': 'Ġmale'},{'sequence': "<s>Hello I'm a female model.</s>",'score': 0.04655390977859497,'token': 2182,'token_str': 'Ġfemale'},{'sequence': "<s>Hello I'm a professional model.</s>",'score': 0.04232972860336304,'token': 2038,'token_str': 'Ġprofessional'},{'sequence': "<s>Hello I'm a fashion model.</s>",'score': 0.037216778844594955,'token': 2734,'token_str': 'Ġfashion'},{'sequence': "<s>Hello I'm a Russian model.</s>",'score': 0.03253649175167084,'token': 1083,'token_str': 'ĠRussian'}]```Here is how to use this model to get the features of a given text in PyTorch:```pythonfrom transformers import RobertaTokenizer, RobertaModeltokenizer = RobertaTokenizer.from_pretrained('roberta-base')model = RobertaModel.from_pretrained('roberta-base')text = "Replace me by any text you'd like."encoded_input = tokenizer(text, return_tensors='pt')output = model(**encoded_input)```and in TensorFlow:```pythonfrom transformers import RobertaTokenizer, TFRobertaModeltokenizer = RobertaTokenizer.from_pretrained('roberta-base')model = TFRobertaModel.from_pretrained('roberta-base')text = "Replace me by any text you'd like."encoded_input = tokenizer(text, return_tensors='tf')output = model(encoded_input)```### Limitations and biasThe training data used for this model contains a lot of unfiltered content from the internet, which is far fromneutral. Therefore, the model can have biased predictions:```python>>> from transformers import pipeline>>> unmasker = pipeline('fill-mask', model='roberta-base')>>> unmasker("The man worked as a <mask>.")[{'sequence': '<s>The man worked as a mechanic.</s>','score': 0.08702439814805984,'token': 25682,'token_str': 'Ġmechanic'},{'sequence': '<s>The man worked as a waiter.</s>','score': 0.0819653645157814,'token': 38233,'token_str': 'Ġwaiter'},{'sequence': '<s>The man worked as a butcher.</s>','score': 0.073323555290699,'token': 32364,'token_str': 'Ġbutcher'},{'sequence': '<s>The man worked as a miner.</s>','score': 0.046322137117385864,'token': 18678,'token_str': 'Ġminer'},{'sequence': '<s>The man worked as a guard.</s>','score': 0.040150221437215805,'token': 2510,'token_str': 'Ġguard'}]>>> unmasker("The Black woman worked as a <mask>.")[{'sequence': '<s>The Black woman worked as a waitress.</s>','score': 0.22177888453006744,'token': 35698,'token_str': 'Ġwaitress'},{'sequence': '<s>The Black woman worked as a prostitute.</s>','score': 0.19288744032382965,'token': 36289,'token_str': 'Ġprostitute'},{'sequence': '<s>The Black woman worked as a maid.</s>','score': 0.06498628109693527,'token': 29754,'token_str': 'Ġmaid'},{'sequence': '<s>The Black woman worked as a secretary.</s>','score': 0.05375480651855469,'token': 2971,'token_str': 'Ġsecretary'},{'sequence': '<s>The Black woman worked as a nurse.</s>','score': 0.05245552211999893,'token': 9008,'token_str': 'Ġnurse'}]```This bias will also affect all fine-tuned versions of this model.## Training dataThe RoBERTa model was pretrained on the reunion of five datasets:- [BookCorpus](https://yknzhu.wixsite.com/mbweb), a dataset consisting of 11,038 unpublished books;- [English Wikipedia](https://en.wikipedia.org/wiki/English_Wikipedia) (excluding lists, tables and headers) ;- [CC-News](https://commoncrawl.org/2016/10/news-dataset-available/), a dataset containing 63 millions English newsarticles crawled between September 2016 and February 2019.- [OpenWebText](https://github.com/jcpeterson/openwebtext), an opensource recreation of the WebText dataset used totrain GPT-2,- [Stories](https://arxiv.org/abs/1806.02847) a dataset containing a subset of CommonCrawl data filtered to match thestory-like style of Winograd schemas.Together theses datasets weight 160GB of text.## Training procedure### PreprocessingThe texts are tokenized using a byte version of Byte-Pair Encoding (BPE) and a vocabulary size of 50,000. The inputs ofthe model take pieces of 512 contiguous token that may span over documents. The beginning of a new document is markedwith `<s>` and the end of one by `</s>`The details of the masking procedure for each sentence are the following:- 15% of the tokens are masked.- In 80% of the cases, the masked tokens are replaced by `<mask>`.- In 10% of the cases, the masked tokens are replaced by a random token (different) from the one they replace.- In the 10% remaining cases, the masked tokens are left as is.Contrary to BERT, the masking is done dynamically during pretraining (e.g., it changes at each epoch and is not fixed).### PretrainingThe model was trained on 1024 V100 GPUs for 500K steps with a batch size of 8K and a sequence length of 512. Theoptimizer used is Adam with a learning rate of 6e-4, \\(\beta_{1} = 0.9\\), \\(\beta_{2} = 0.98\\) and\\(\epsilon = 1e-6\\), a weight decay of 0.01, learning rate warmup for 24,000 steps and linear decay of the learningrate after.## Evaluation results10 unmodified lines### BibTeX entry and citation info```bibtex@article{DBLP:journals/corr/abs-1907-11692,author = {Yinhan Liu andMyle Ott andNaman Goyal andJingfei Du andMandar Joshi andDanqi Chen andOmer Levy andMike Lewis andLuke Zettlemoyer andVeselin Stoyanov},title = {RoBERTa: {A} Robustly Optimized {BERT} Pretraining Approach},journal = {CoRR},volume = {abs/1907.11692},year = {2019},url = {http://arxiv.org/abs/1907.11692},archivePrefix = {arXiv},eprint = {1907.11692},timestamp = {Thu, 01 Aug 2019 08:59:33 +0200},biburl = {https://dblp.org/rec/journals/corr/abs-1907-11692.bib},bibsource = {dblp computer science bibliography, https://dblp.org}}```<a href="https://huggingface.co/exbert/?model=roberta-base"><img width="300px" src="https://cdn-media.huggingface.co/exbert/button.png"></a>7 unmodified lines8910111213141516171819202121 unmodified lines434445464748495051525310 unmodified lines6465666768697071727374757677787980818283848586878889907 unmodified lines- wikipedia---# MUPPET RoBERTa base modelThis is a Massive Multi-task Pre-finetuned version of Roberta base. It was introduced in[this paper](https://arxiv.org/abs/2101.11038). The model improves over roberta-base in a wide range of GLUE, QA tasks (details can be found in the paper). The gains insmaller datasets are significant.Note: This checkpoint does not contain the classificaiton/MRC heads used during pre-finetuning due to compatibility issues and hence you might get slightly lower performance than that reported in the paper on some datasets## Model description21 unmodified linesto make decisions, such as sequence classification, token classification or question answering. For tasks such as textgeneration you should look at model like GPT2.### PretrainingThe model was trained on 1024 V100 GPUs for 500K steps with a batch size of 8K and a sequence length of 512. Theoptimizer used is Adam with a learning rate of 6e-4, \\\\(\\beta_{1} = 0.9\\\\), \\\\(\\beta_{2} = 0.98\\\\) and\\\\(\\epsilon = 1e-6\\\\), a weight decay of 0.01, learning rate warmup for 24,000 steps and linear decay of the learningrate after.## Evaluation results10 unmodified lines### BibTeX entry and citation info```bibtex@article{DBLP:journals/corr/abs-2101-11038,author = {Armen Aghajanyan andAnchit Gupta andAkshat Shrivastava andXilun Chen andLuke Zettlemoyer andSonal Gupta},title = {Muppet: Massive Multi-task Representations with Pre-Finetuning},journal = {CoRR},volume = {abs/2101.11038},year = {2021},url = {https://arxiv.org/abs/2101.11038},archivePrefix = {arXiv},eprint = {2101.11038},timestamp = {Sun, 31 Jan 2021 17:23:50 +0100},biburl = {https://dblp.org/rec/journals/corr/abs-2101-11038.bib},bibsource = {dblp computer science bibliography, https://dblp.org}}```<a href="https://huggingface.co/facebook/muppet-roberta-base">\t<img width="300px" src="https://cdn-media.huggingface.co/exbert/button.png"></a>
README.md+24-168