From 25895056937f5246bd81651e931b4f09211877af Mon Sep 17 00:00:00 2001 From: furunkel Date: Tue, 23 Jun 2020 00:39:22 +0200 Subject: [PATCH] Add model card for StackOBERTflow-comments-small (#5008) * Create README.md * Update README.md --- .../README.md | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 model_cards/giganticode/StackOBERTflow-comments-small-v1/README.md diff --git a/model_cards/giganticode/StackOBERTflow-comments-small-v1/README.md b/model_cards/giganticode/StackOBERTflow-comments-small-v1/README.md new file mode 100644 index 0000000000..739d3e3557 --- /dev/null +++ b/model_cards/giganticode/StackOBERTflow-comments-small-v1/README.md @@ -0,0 +1,39 @@ +# StackOBERTflow-comments-small + +StackOBERTflow is a RoBERTa model trained on StackOverflow comments. +A Byte-level BPE tokenizer with dropout was used (using the `tokenizers` package). + +The model is *small*, i.e. has only 6-layers and the maximum sequence length was restricted to 256 tokens. +The model was trained for 6 epochs on several GBs of comments from the StackOverflow corpus. + +## Quick start: masked language modeling prediction + +```python +from transformers import pipeline +from pprint import pprint + +COMMENT = "You really should not do it this way, I would use instead." + +fill_mask = pipeline( + "fill-mask", + model="giganticode/StackOBERTflow-comments-small-v1", + tokenizer="giganticode/StackOBERTflow-comments-small-v1" +) + +pprint(fill_mask(COMMENT)) +# [{'score': 0.019997311756014824, +# 'sequence': ' You really should not do it this way, I would use jQuery instead.', +# 'token': 1738}, +# {'score': 0.01693696901202202, +# 'sequence': ' You really should not do it this way, I would use arrays instead.', +# 'token': 2844}, +# {'score': 0.013411642983555794, +# 'sequence': ' You really should not do it this way, I would use CSS instead.', +# 'token': 2254}, +# {'score': 0.013224546797573566, +# 'sequence': ' You really should not do it this way, I would use it instead.', +# 'token': 300}, +# {'score': 0.011984303593635559, +# 'sequence': ' You really should not do it this way, I would use classes instead.', +# 'token': 1779}] +```