Instructions to use huggingface/CodeBERTa-small-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huggingface/CodeBERTa-small-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="huggingface/CodeBERTa-small-v1")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("huggingface/CodeBERTa-small-v1") model = AutoModelForMaskedLM.from_pretrained("huggingface/CodeBERTa-small-v1") - Inference
- Notebooks
- Google Colab
- Kaggle
Update config.json
Browse files- config.json +4 -1
config.json
CHANGED
|
@@ -3,6 +3,8 @@
|
|
| 3 |
"RobertaForMaskedLM"
|
| 4 |
],
|
| 5 |
"attention_probs_dropout_prob": 0.1,
|
|
|
|
|
|
|
| 6 |
"hidden_act": "gelu",
|
| 7 |
"hidden_dropout_prob": 0.1,
|
| 8 |
"hidden_size": 768,
|
|
@@ -13,6 +15,7 @@
|
|
| 13 |
"model_type": "roberta",
|
| 14 |
"num_attention_heads": 12,
|
| 15 |
"num_hidden_layers": 6,
|
|
|
|
| 16 |
"type_vocab_size": 1,
|
| 17 |
"vocab_size": 52000
|
| 18 |
-
}
|
|
|
|
| 3 |
"RobertaForMaskedLM"
|
| 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": 768,
|
|
|
|
| 15 |
"model_type": "roberta",
|
| 16 |
"num_attention_heads": 12,
|
| 17 |
"num_hidden_layers": 6,
|
| 18 |
+
"pad_token_id": 1,
|
| 19 |
"type_vocab_size": 1,
|
| 20 |
"vocab_size": 52000
|
| 21 |
+
}
|