Upload 10 files
Browse files- README (1).md +27 -0
- config (1).json +22 -0
- flax_model.msgpack +3 -0
- merges (1).txt +0 -0
- model.bin +3 -0
- rust_model.ot +3 -0
- special_tokens_map (1).json +1 -0
- tf_model.h5 +3 -0
- tokenizer_config (1).json +1 -0
- vocab (1).json +0 -0
README (1).md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## CodeBERT-base
|
| 2 |
+
Pretrained weights for [CodeBERT: A Pre-Trained Model for Programming and Natural Languages](https://arxiv.org/abs/2002.08155).
|
| 3 |
+
|
| 4 |
+
### Training Data
|
| 5 |
+
The model is trained on bi-modal data (documents & code) of [CodeSearchNet](https://github.com/github/CodeSearchNet)
|
| 6 |
+
|
| 7 |
+
### Training Objective
|
| 8 |
+
This model is initialized with Roberta-base and trained with MLM+RTD objective (cf. the paper).
|
| 9 |
+
|
| 10 |
+
### Usage
|
| 11 |
+
Please see [the official repository](https://github.com/microsoft/CodeBERT) for scripts that support "code search" and "code-to-document generation".
|
| 12 |
+
|
| 13 |
+
### Reference
|
| 14 |
+
1. [CodeBERT trained with Masked LM objective](https://huggingface.co/microsoft/codebert-base-mlm) (suitable for code completion)
|
| 15 |
+
2. 🤗 [Hugging Face's CodeBERTa](https://huggingface.co/huggingface/CodeBERTa-small-v1) (small size, 6 layers)
|
| 16 |
+
|
| 17 |
+
### Citation
|
| 18 |
+
```bibtex
|
| 19 |
+
@misc{feng2020codebert,
|
| 20 |
+
title={CodeBERT: A Pre-Trained Model for Programming and Natural Languages},
|
| 21 |
+
author={Zhangyin Feng and Daya Guo and Duyu Tang and Nan Duan and Xiaocheng Feng and Ming Gong and Linjun Shou and Bing Qin and Ting Liu and Daxin Jiang and Ming Zhou},
|
| 22 |
+
year={2020},
|
| 23 |
+
eprint={2002.08155},
|
| 24 |
+
archivePrefix={arXiv},
|
| 25 |
+
primaryClass={cs.CL}
|
| 26 |
+
}
|
| 27 |
+
```
|
config (1).json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"RobertaModel"
|
| 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,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 3072,
|
| 13 |
+
"layer_norm_eps": 1e-05,
|
| 14 |
+
"max_position_embeddings": 514,
|
| 15 |
+
"model_type": "roberta",
|
| 16 |
+
"num_attention_heads": 12,
|
| 17 |
+
"num_hidden_layers": 12,
|
| 18 |
+
"output_past": true,
|
| 19 |
+
"pad_token_id": 1,
|
| 20 |
+
"type_vocab_size": 1,
|
| 21 |
+
"vocab_size": 50265
|
| 22 |
+
}
|
flax_model.msgpack
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7b3070d54e9a6582a500785a53f40a838269d13cdf6a27711037580fed717bcd
|
| 3 |
+
size 498589677
|
merges (1).txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e7a569ae1c3e3dc07cd3552d7998e17ce4876b6b27fc060e7df1ede730f7693b
|
| 3 |
+
size 706909074
|
rust_model.ot
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a91362f5a5a4dd0b1f96c7c4d2ebc512c00b834d501a2612d1f12f6ab4ca5535
|
| 3 |
+
size 498644338
|
special_tokens_map (1).json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "cls_token": "<s>", "mask_token": "<mask>"}
|
tf_model.h5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:59cb3355c7c32f42e3d97b0a0dc5b73c944305b9ece419170ec62f78c525d8e0
|
| 3 |
+
size 498845224
|
tokenizer_config (1).json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"model_max_length": 512}
|
vocab (1).json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|